Using SQL Developer to connect to SQL Server databases

Apparently, being able to use Oracle’s SQL Developer to connect to SQL Server databases has been around for a while (via third party drivers), but I only started using it today for the first time, with SQL Developer 4 EA2 after my colleague mentioned it to me this afternoon 🙂

First of all, thanks to DJ’s blog here as a base for the instructions that follow.  Here’s how you can set this up:

  1. Download the jTDS 3rd party JDBC driver, version 1.2.8 from here (I’ve not personally tested with other versions).
  2. Save and extract the contents of the jtds-1.2.8-dist.zip file somewhere safe (I extracted mine under “C:\oracle\sqldeveloper\add-ons\jtds-1.2.8-dist\”).
  3. Start SQL Developer go to Tools > Preferences > Database > Third Party JDBC Drivers.
  4. Click “Add Entry”, point to the ‘jtds-1.2.8.jar’ file location, then select it and click OK.
  5. Create a new connection, and choose the “SQLServer” tab.
  6. Enter the following details: Connection Name (required for database retrieval), Username, Password, Hostname, and Port.
  7. Click “Retrieve database” and select the appropriate database, then Save/Test/Connect as you would do normally.

SQL Server connection in SQL Developer

You’ll notice from the screen shot above that you can also use this to connect to Sybase databases, although I’ve not tried this out myself.

UPDATE: If you at any point decide to use Windows authentication to connect (like I just did), then you might hit this error:

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

…I quickly found a work around, which involved copying the “..\jtds-1.2\x64\SSO\ntlmauth.dll” file from the jTDS directory to the “%JAVA_HOME%\jre\bin” folder.  Then I restarted SQL Developer and it all worked fine 😉

22 thoughts on “Using SQL Developer to connect to SQL Server databases

  1. Thanks a ZILLIONNNNNN,, this helped a lot… bloody even ORacle guys on their website havnt mentioned these things, I was struggling so many hours to connect to SQL server through this sql developer with no success.. but your article did help me great…
    cheers
    keep it up

  2. This works, but unfortunately there are a number of shortcomings. Some key words used in T-SQL and SQL Server scripts like ‘GO’ and ‘EXEC’ don’t play nicely with Oracle SQL Developer. Also issues with Stored procs that return multiple result sets etc. It really depends on your environment, but if you’re dealing with a lot of large scripts that were written in T-SQL you’ll find issues.

    • Thanks for the heads up – I never really spent too much time using SQL Developer for managing SQL Server (defaulted to using SSMS), so that’s good to know. Hopefully the development team will pick up on such issues and fix in later releases though 🙂

      Cheers,
      Garth

  3. Below steps worked for me to enable you to create and connect to SQL server connection instance in SQL developer.

    1. Download the jTDS(jtds-1.2-dist) 3rd party JDBC driver.
    2. Save and extract the contents of the jtds-1.2-dist.zip file
    3. Start SQL Developer go to Tools > Preferences > Database > Third Party JDBC Drivers.
    4. Click “Add Entry”, point to the ‘jtds-1.2.jar’ file location, then select it and click OK.
    5. Copy the “..\jtds-1.2\x64\SSO\ntlmauth.dll” file from the jTDS directory to following folders:
    i. “%JAVA_HOME%\jre\bin” folder.
    ii. “%JAVA_HOME%\jre\lib” folder.
    6. Open SQL Server Configuration Manager.
    7. Click on the SQL Server Services. In the details pane, restart the SQL SERVER(SQLEXPRESS) instance.
    8. Expand SQL Server Network Configuration. Click on the Protocols for SQLEXPRESS. In the details pane, right-click TCP/IP, and then click Enable.
    9. Select and Right click the “TCP/IP”, go to Properties. Select IP Address tab.
    10. Mention port number “1433” in all “TCP Port” fields.
    11. Restart the system.
    12. Open SQL developer
    13. Create a new connection, and choose the “SQLServer” tab. Provide Connection name, SQL server user name and Password.
    14. Give Host name as your SQL SERVER host name.
    15. Provide port details as : 1433/;instance=SQLEXPRESS
    16. Click on Retrieve database, select DB.
    17. Click on Save and Connect.

Leave a comment

Your email address will not be published.