4

I searched through all threads on the web available, but none could help me.

I am trying to connect to SQL Server engine from SQL Developer. In order to do that I enabled Named Pipes and TCP/IP from SQL Configuration Manager.

Then I tried different drivers:

  • I tried Microsoft JDBC driver for SQL Server - I cannot choose in connection manager SQL Server database type, so it does not work..
  • I tried jTDS driver instead, and it worked - I can choose SQL Server database type, but then all I get is an error informing that it cannot connect to Microsoft SQL Server on localhost (I tried localhost, name of my computer, none of which worked).

Is there anything more I can do?

EDIT

This is what I have so far:

enter image description here

SECOND EDIT

I had more problems:

  1. With error saying

    Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property

  2. Using windows authentication, I still got asked for username and password.

(All details and solutions in my answer below)

9
  • is SQL Server running on your computer, hence the 'localhost' ? And is port 1433 correct? Commented May 30, 2019 at 14:35
  • @thatjeffsmith Yes, it's running on my computer. I am pretty sure 1433 is correct, but I am trying to ensure that though.. Commented May 30, 2019 at 14:37
  • that's set in the configuration manager (the port) learn.microsoft.com/en-us/sql/database-engine/configure-windows/… Commented May 30, 2019 at 14:42
  • @thatjeffsmith That actually helped, but niw I am getting error about native driver... Please expand you answer with your comment and I will accept it as soon as I get it to work :) Commented May 30, 2019 at 15:51
  • Happy to Michal, but please share your actual error message first. Commented May 30, 2019 at 16:04

2 Answers 2

5

We only support the jTDS driver for SQL Server and Sybase ASE connections, so that's the way to go.

After that, it's up to you to get a correct connection string to your SQL Server system.

Make sure you have the right port in addition to your 'localhost' network location for your SQL Server instance.

This is using version 19.1 of SQL Developer to connect to a SQL2012 instance overseas..

enter image description here

Sign up to request clarification or add additional context in comments.

7 Comments

is this still true?
@zielot yes, no changes
I have followed this post, but I cannot connect to SQL Server. Everything seems to work fine while configuring the connectio, that means I can get a list of all the available databases pressing the "Retrieve database" button, I got a "Success" message when pressing the "Test" button, but I got this error when pressing "Connect": An error was encountered performing the requested operation: Login failed for user 'sa'. Vendor code 18456
all of the things this overloaded MSFT error message can indicate learn.microsoft.com/en-us/sql/relational-databases/…
Thanks Jeff, the only thing I do not understand is why the credentials are OK while clicking the "Test" button and they no longer are just half a second later while clicking the "Connect" button. I just press the two buttons one after the other without changing anything in the connction form.
|
2

Actually there were more problems, which I'll post here along with solutions:

  1. In order to ba able to connect SQL Server database type from SQL developer it is needed to install jTDS driver, as already mentioned. Other types are not supported by SQL Developer.

  2. Next thing was to configure with SQL Configuration Manager (the easiest way IMO) SQL Server to listen on IP port 1433, not dynamic, as was previously set. In order to do that in configuration manager I had to go to SQL Server Network Configuration and make appropriate changes. More here.

  3. Next I had problem:

    Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property

    Which was the fault of missing file, solution was placing file ntlmauth.dll to the /jdk/bin in SQL Developer directory.

  4. I chose Windows authentication, which apparently is not supported by jTDS, so I needed to create user in SQL Server, which I use to connect SQL Server from SQL Developer.

After all that, I had it working.

1 Comment

I had this same experience, but I did get Windows Authentication to work after copying the DLL to \jdk\jre\bin\. And then noticed a bug in SQL Developer where it thinks it needs to prompt for a password when it doesn't... To get past it I entered a nonsense user and password in the connection, close the 'Save Password' option, then swapped it to Windows Authentication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.