1 Reply Latest reply: Oct 16, 2013 9:53 AM by Jim Smith RSS

    SQL Developer 3.2.2 - Connecting to SQL Azure using 3rd party JDBC (JTDS)

    J_Morgan

      Hi All

       

      I'll probably be shot down for asking this as it's not Oracle specific...but here goes....

       

      My organisation is trialling SQL Azure as an alternative to Oracle (yes I know! ) and our developers (who are all PL/SQL/Oracle/Java/Apex devs and have to start from scratch with C#/.net etc) would like to be able to connect to the SQL Azure database using Oracle SQLDeveloper seeing as it's such an excellent tool - and much easier to use compared with SSMS.   At first, I laughed in their faces and said that there's no way this is gonna happen but after a bit of research I've realised that some nice bloke knocked up a 3rd party driver for just this sort of thing - it's called JTDS and is linked from Oracle's own page here:

       

      http://www.oracle.com/technetwork/developer-tools/sql-developer/thirdparty-095608.html

       

      I've unzipped the jtds-1.2.2-dist, moved the jtds-1.2.2.jar file into C:\Program Files\Oracle\sqldeveloper\jlib  and also moved ntlmauth.dll into C:\Program Files\Oracle\sqldeveloper\jdk\jre\bin.

       

      When I test the connection to the database I get the following error:

       

      Status : Failure -Test failed: I/O Error: DB server closed connection.

       

       

      My SQL developer connection xml for this entry is as follows:

       

      <?xml version = '1.0' encoding = 'UTF-8'?>

      <References xmlns="http://xmlns.oracle.com/adf/jndi">

         <Reference name="SQLAzure" className="oracle.jdeveloper.db.adapter.DatabaseProvider" xmlns="">

            <Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>

            <RefAddresses>

               <StringRefAddr addrType="port">

                  <Contents>1433</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="user">

                  <Contents>DEVSQLUSER</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="subtype">

                  <Contents>SQLServer</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="RaptorConnectionType">

                  <Contents>Microsoft SQL Server</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="ConnName">

                  <Contents>SQLAzure</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="hostname">

                  <Contents>********.database.windows.net</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="customUrl">

                  <Contents>jdbc:jtds:sqlserver://********.database.windows.net:1433;database=******;ssl=require</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="password">

                  <Contents>********</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="SavePassword">

                  <Contents>true</Contents>

               </StringRefAddr>

               <StringRefAddr addrType="driver">

                  <Contents>net.sourceforge.jtds.jdbc.Driver</Contents>

               </StringRefAddr>

            </RefAddresses>

         </Reference>

      </References>

       

      I've read some useful info here:

      http://www.sqlservercentral.com/Forums/Topic597144-146-2.aspx

      and tried the steps listed

      and also here

      http://stackoverflow.com/questions/10669030/azure-oracle-sql-developer-and-jdbc-driver

      modifying the jdbc string to include ssl=require

      but nothing seems to help - I'm still getting the DB server slosed connection.

       

       

      Any ideas?

      TIA.

        • 1. Re: SQL Developer 3.2.2 - Connecting to SQL Azure using 3rd party JDBC (JTDS)
          Jim Smith

          I can't help with the connection issue except to say that SQL Developer will only work with jtds 1.2. If asuze mssql requires 1.4 you are probably out of luck.

           

          However, I think you are at risk of heading down a dead-end.  SQL Developer's functionality against SQL Server is intended to support migration and as such is limited compared to a native MSSQL tool.    Your developers will never adapt to mssql if they have to use a limited tool.   SSMS will let you do everything necesssary on MSSQL databases.