Monday, October 4, 2021

Profiling Azure SQL Database

In this post, let's have a look at how to profile an Azure SQL Database

If it's a database in an Azure SQL Managed Instance, we can use  SQL Server Management Studio (SSMS) Profiler which I believe most of us are comfortable with. but if it's Azure SQL Database, unfortunately we can't use SQL Server Management Studio (SSMS) Profiler. We are going to get an error like this.
SQL Server Profiler: Not Supported
But not to worry. There is still a way to profile an Azure SQL Database.

First, we need to download and install Azure Data Studio. Once that's done, then you need to install SQL Server Profiler extension (currently it's in Preview, but works great).
SQL Server Profile extension
Hint: instead you can install the Admin Pack for SQL Server extension, which will give you a couple of nice extensions (such as SQL Server dacpac, SQL Server Import etc) along with SQL Server Profiler.

Once the SQL Server Profiler extension is installed, first make a connection to the target server.

  • Open Profiler by pressing Alt+P on Windows, and Ctrl+Alt+P on macOS.
  • To Start/Stop Profiler, click the Start button or press Alt+S on Windows, or Ctrl+Alt+S on macOS.
  • Otherwise, open the command palette and type 'Profiler.'
Profiling Session
I just love this!

Hope this helps.

Happy Coding.


No comments:

Post a Comment