user1645365
user1645365

Reputation: 321

Oracle SQL Developer connection to Microsoft SQL Server

I have been trying without any success to get the latest version of Oracle SQL Developer (4.0.2) to connect to Microsoft SQL server using Windows authentication. I have downloaded and copied the ntmlauth.dll (and also JtdsXA.dll) file from jtds-1.3.1-dist to every location I can think of that developer would be looking for it but when I try and set up a new connection via the SQLServer tab clicking on the "Use Windows Authentication" option, all I get is the message "Status: Failure -I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property." I can however connect to the database using Toad for SQL Server or SSMS without any problems, but would prefer if possible to use SQL Developer.

Upvotes: 8

Views: 16713

Answers (4)

Néstor Waldyd
Néstor Waldyd

Reputation: 1024

After adding jTDS drivers (jtds-1.3.1) to Oracle SQL Developer (Tools->Preferences->Database->Third Party JDBC Drivers), I located the SQL Developer's ide.conf file and added the following lines:

#jTDS
Add64VMOption -Djava.library.path=../../drivers/jtds-1.3.1-dist/x64/SSO
Add32VMOption -Djava.library.path=../../drivers/jtds-1.3.1-dist/x86/SSO

enter image description here

This adds to JVM Library Path the location of ntlmauth.dll library

Upvotes: 0

Levent Tümen
Levent Tümen

Reputation: 61

Just copy ..\jtds-1.3.1-dist\x64\SSO\ntlmauth.dll to -> ..\sqldeveloper\jdk\jre\bin folder for x64 systems. Copy-paste similar folder contents for x86 systems as well.

Upvotes: 6

shawno
shawno

Reputation: 343

The reason is pretty simple; SQLDEVELOPER doesn't know about the system level jre that was installed. Oracle bundles SQLDEVELOPER with and without JAVA. If you downloaded the one without java then when you first start the app you will be prompted for the location of the java_home. If you install the SQLDEVELOPER version that already has java installed then it just works -- no prompt. In your case, you installed the version with java already packaged with the app.

So the root of the question then is the system level jre is not used by SQLDEVELOPER (in your particular installation) so the ntlmauth.dll that you placed in that directory is never used.

Upvotes: 1

codingknob
codingknob

Reputation: 11660

I had the exact same problem. I eventually got it to work by placing the ntlmauth.dll in the jdk\jre\bin folder under the sql-developer directory itself. For some reason sql-developer ships with its own jdk, which I found by browsing around. I spent hours trying to figure out why the placement of the aforementioned DLL in the various system level jre directories (i.e. C:\Program Files\Java\jre7\bin) didn't work.

If anyone here knows why placement of ntlmauth.dll in the sql-developer\jdk\jre\bin folder worked while placement in the system level jre folders did not I would be interested.

My OS = Windows 2007 64-bit

jtds = jtds-1.2.7

Upvotes: 3

Related Questions