Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 639
user1645365 Avatar asked May 22 '14 03:05

user1645365


3 Answers

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.

like image 107
Levent Tümen Avatar answered Nov 09 '22 10:11

Levent Tümen


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

like image 25
codingknob Avatar answered Nov 09 '22 11:11

codingknob


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.

like image 1
shawno Avatar answered Nov 09 '22 11:11

shawno