JDBC Connectivity to Microsoft SQL Azure

Posted by Greg Stasko on 25-Mar-2015 16:20

Just an FYI. 

Should you need to connect to Microsoft SQL Azure via JDBC, here are some things that I've learned. 

1. There are numerous posts about the difficulty in getting Microsoft's JDBC driver or the jTDS JDBC driver connecting reliably to SQL Azure. There are more options that you seem to be required to configure - Unfortunately, I was never able to get either to work. I gave up on jTDS and concentrated on the Microsoft driver, and still ended up with this:

An error occurred while establishing the connection:

Long Message:

Login failed for user 'adobesa'. ClientConnectionId:b28043b7-82c6-4cd3-98fa-ae803ee5bbe0 

Details:

   Type: com.microsoft.sqlserver.jdbc.SQLServerException

   Error Code: 18456

   SQL State: S0001

With our driver, I connected on the first try.

2. You don't use your Azure login ID to connect to the SQL service. You use the new credentials that are specific to the SQL database you've created via the Azure SQL Data Service console. Also, you must specify "encryptionMethod=SSL". Required for all communications with SQL Azure.

3. I haven't seen a way to create/define tables and to load data from within the Azure portal. That seems to require Windows-specific tools. So coming to this on a Mac, I saw that I could use this JDBC connectivity and use a tool like DbVisualizer to run SQL scripts, but you can also do much of the same via the Datadirect Cloud console, signing into your Azure SQL service through it.

Any questions...

All Replies

Posted by Prasanna Anireddy on 28-Jan-2016 10:25

Thanks Greg.

This thread is closed