2

I have earlier used Microsoft SQL Server Management Studio here with Azure SQL here but I want to try DbVis (a platform independent alternative). I am trying DbVis in OSX. I could find JDBC driver for SQL Server here but not sure whether this required to use DbVis with Azure SQL in OSX.

Which driver do I need to select to connect to the Azure SQL in DbVis?

enter image description here

enter image description here

Trial 1. Error with admin credentials

The settings are

  • Server name myDB.database.windows.net as Database URL
  • Azure SQL admin as Database userid
  • Azure SQL password as Database Password

by which the error such that

An error occurred while establishing the connection:
The selected Driver cannot handle the specified Database URL.
The most common reason for this error is that the database URL
contains a syntax error preventing the driver from accepting it.
The error also occurs when trying to connect to a database
with the wrong driver. Correct this and try again.

enter image description here

Potentially related

  1. Connecting to Azure SQL in DB Vis under Ubuntu here (Q&A thread)

  2. Connect to Azure Management Data in Db Vis here (some article)

  3. Ticket in Db Vis asking for instructions to connect to Azure SQL dbs in Db Vis here.

hhh
  • 50,788
  • 62
  • 179
  • 282
  • 1
    What happened when you tried this driver? Did you get an error? – Nick.Mc May 14 '17 at 22:46
  • @Nick.McDermaid added the error output of trial 1 above with admin credentials and server name as `Database URL` in Db Vis. – hhh May 14 '17 at 22:53
  • 1
    Have you managed to connect to this Azure server using other means? Can you ping the server? Have you opened Azure firewalls as per this article: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure – Nick.Mc May 14 '17 at 23:07
  • @Nick.McDermaid added an error report to Q about pinging. I am able to access the database in MMSM, the client IP is open in the firewall, this is probably some issue with the url of jTDS driver, `myDB.database.windows.net` format apparently not correct, some prefix perhaps missing? LIke [here](http://stackoverflow.com/questions/27903345/how-to-connect-neo4j-jdbc-driver-with-dbvisualizer) with different driver. – hhh May 14 '17 at 23:35
  • So... what JDBC connection string is it generating? If it doesn't tell you, try a manual one from here: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-connect-query-java – Nick.Mc May 15 '17 at 01:17
  • I guess that ping error is from the db tool? I meant from the command line (sorry I wasn't very specific). But if you are your firewall is set up properly don't worry about it – Nick.Mc May 15 '17 at 01:19

2 Answers2

1

I have no issue with DBVisualizer/jTDS driver though. enter image description hereenter image description here

From what i see, the first error simply indicates you have error in your connection string, i'd suggest you open Azure Management Portal and copy the corresponding jdbc connection string from there. enter image description here The second error indicates you cannot ping server in database URL mode, switch to server info mode and you are good to go then.

Hello
  • 632
  • 7
  • 14
0

According to this here, Azure is not officially supported in Db Vis:

Note that Azure is not an officially supported Database in DbVisualizer. Having said that we do have customers running DbVisualizer against Azure.

You can connect using the Jtds bundled driver or the bundled SQL Server (Microsoft) driver.

You might need to connect using SSH as described in http://confluence.dbvis.com/display/UG95/Using+an+SSH+Tunnel

where the op has already tried the JTDS driver but apparently it is somehow different to JTDS bundled driver? This is being further discussed with the support.

It is not clear here why the SSH tunneling is required here.

hhh
  • 50,788
  • 62
  • 179
  • 282
  • 1
    I suppose the reason why you need SSH tunneling here is the firewall rule. Image the scenario that you have only exposed SQL database to your office(Ip address), you'd have to SSH back to office before you could connect to SQL database. – Hello May 16 '17 at 07:54
  • 1
    I noticed DBVisualizer has a hook for SQL Server (DataDirect) which does support [SQL Server Azure JDBC connections](https://www.progress.com/jdbc/microsoft-sql-azure). – Sumit Sarkar May 16 '17 at 14:15
  • @Sumit Sarkar what is The difference btw jDTS and JDBC? – hhh May 16 '17 at 19:24
  • 1
    @hhh JTDS is the name of an open source JDBC driver whereas DataDirect is a commercial JDBC driver. – Sumit Sarkar May 23 '17 at 01:10