Dbeaver Azure Sql Server



  1. Dbeaver Azure Sql Server
  2. Dbeaver Azure Sql Server Connection
  3. Dbeaver Azure Sql Server Express
  1. Azure SQL is a cloud-based database service built similar to SQL server. Should you use SQL Azure or stick with on-premises SQL server.
  2. The best SQL Server Management Studio alternatives are DBeaver, Azure Data Studio and HeidiSQL. Our crowd-sourced lists contains more than 25 apps similar to SQL Server Management Studio for.
  3. SQL Client for Mac OS X that works with MS SQL Server How can I connect to a remote SQL server using Mac OS X? I don't really need a GUI, but it would be.

SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse: More Examples. Add two months to a date, then return the date: SELECT DATEADD(month, 2, '2017/08/25') AS DateAdd.

-->

This article discusses issues when using the Microsoft JDBC Driver for SQL Server to connect to an Azure SQL Database. For more information about connecting to an Azure SQL Database, see:

Details

When connecting to an Azure SQL Database, you should connect to the master database to call SQLServerDatabaseMetaData.getCatalogs.
Azure SQL Database doesn't support returning the entire set of catalogs from a user database. SQLServerDatabaseMetaData.getCatalogs use the sys.databases view to get the catalogs. Refer to the discussion of permissions in sys.databases (Transact-SQL) to understand SQLServerDatabaseMetaData.getCatalogs behavior on an Azure SQL Database.

Connections dropped

When connecting to an Azure SQL Database, idle connections may be terminated by a network component (such as a firewall) after a period of inactivity. There are two types of idle connections, in this context:

  • Idle at the TCP layer, where connections can be dropped by any number of network devices.

  • Idle by the Azure SQL Gateway, where TCP keepalive messages might be occurring (making the connection not idle from a TCP perspective), but not had an active query in 30 minutes. In this scenario, the Gateway will determine that the TDS connection is idle at 30 minutes and terminate the connection.

Dbeaver azure sql server express

To address the second point and avoid the Gateway terminating idle connections, you can:

  • Use the Redirectconnection policy when configuring your Azure SQL data source.

  • Keep connections active via lightweight activity. This method is not recommended and should only be used if there are no other possible options.

To address the first point and avoid dropping idle connections by a network component, the following registry settings (or their non-Windows equivalents) should be set on the operating system where the driver is loaded:

Registry SettingRecommended Value
HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters KeepAliveTime30000
HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters KeepAliveInterval1000
HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters TcpMaxDataRetransmissions10

Restart the computer for the registry settings to take effect.

Dbeaver

The KeepAliveTime and KeepAliveInterval values are in milliseconds. These settings will have the effect of disconnecting an unresponsive connection within 10 to 40 seconds. After a keep alive packet is sent, if no response is received, it will be retried every second up to 10 times. If no response is received during that time, the client-side socket is disconnected. Depending on your environment, you may want to increase the KeepAliveInterval to accommodate known disruptions (like virtual machine migrations) that might cause a server to be unresponsive for longer than 10 seconds.

Note

TcpMaxDataRetransmissions is not controllable on Windows Vista or Windows 2008 and higher.

Dbeaver Azure Sql Server

To perform this configuration when running in Azure, create a startup task to add the registry keys. For example, add the following Startup task to the service definition file:

Dbeaver Azure Sql Server Connection

Then add a AddKeepAlive.cmd file to your project. Set the 'Copy to Output Directory' setting to Copy always. The following script is a sample AddKeepAlive.cmd file:

Appending the server name to the userId in the connection string

Dbeaver Azure Sql Server Express

Prior to the 4.0 version of the Microsoft JDBC Driver for SQL Server, when connecting to an Azure SQL Database, you were required to append the server name to the UserId in the connection string. For example, user@servername. Beginning in version 4.0 of the Microsoft JDBC Driver for SQL Server, it's no longer necessary to append @servername to the UserId in the connection string.

Using encryption requires setting hostNameInCertificate

Prior to the 7.2 version of the Microsoft JDBC Driver for SQL Server, when connecting to an Azure SQL Database, you should specify hostNameInCertificate if you specify encrypt=true (If the server name in the connection string is shortName.domainName, set the hostNameInCertificate property to *.domainName.). This property is optional as of version 7.2 of the driver.

For example:

See also