Lesson Learned #154: JAVA Console Script for Testing connection in Azure SQL

This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.

To connect to Azure SQL Database we could use multiple tools or coding languages like C#, PHP, Java, etc.. In some situations, we need to test our application, for example, how much time take a single connection, review my retry-logic, review the connection, etc.. 


In this URL you could find an example about several operations that you could use using JAVA. 


This application has been designed with a main idea: how to obtain information about the elapsed time in the connectivity process and the query execution to a database of Azure SQL Database using JAVA (Microsoft JDBC Driver for SQL Server). This JAVA console script runs in Windows and Linux.


This JAVA console script has the main features:

  • Connect using Microsoft JDBC Driver for SQL Server measuring the time spent.
  • Once you have established the connection runs multiple times the query SELECT 1 measuring the time spent.

You could find the instrucctions in readme file.


As always, all feedback and contributions are very welcome.



REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.