Jump to content

Lesson Learned #236: What? .... How much time you said? (CloudShell version)


Recommended Posts

Guest Jose_Manuel_Jurado
Posted

We usually have service requests when our customers, using different drivers, need to know the connection latency, execution time spent or validate the connection, in this article you could find an example code to perform this operation.

 

 

 

We received feedback to test using directly in CloudShell without deploying or having Virtual Machine on Azure. In this URL you could find the version for CloudShell.

 

 

 

Unfortunately, this CloudShell. version only supports SQLCLIENT and ODBC but the remaining features are the same.

 

 

 

To execute the PowerShell script CloudShell:

 

 

 

  • Upload the file in your $home folder using the upload/download file in CloudShell
  • Run this PowerShell script
  • This script will create a log file in the same folder with the results of the execution. There is not needed to modify the PowerShell script, basically, you need to execute this as follows:

 

 

 

 

 

./SQLConnectivityTestCloudShell.ps1 -DatabaseServer servername.database.windows.net -Database databasename -UserName username -Driver SQLCLIENT -NumberExecutions 20 -Password password

 

 

 

 

 

Example how to execute the PowerShell Script

 

 

 

645x278vv2.png.e3daeaf73a78be6abcec6a5ca588c298.png

 

 

 

Example how to edit the file if needed.

 

 

 

645x274vv2.png.edd88a0e96befde9ff64c3706c9d865f.png

 

 

 

 

 

Enjoy!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...