SQL Profiler to Azure SQL Database

For almost all .NET developers, I am sure that they may having the same questions after moving the database from on-prem SQL into Azure SQL. Where is the SQL Profiler? If you tried SQL Profiler that comes with SSMS, you will found that you cannot execute the profiling.

If you google it, you will find someone talk about using SQL Azure DMVs to profile queries. i.e.,

OR you may also found out that MSSQLGirl also blog about using Extened Events,

Is there any Microsoft built tool?
YES.
Actually Microsoft is trying to build the Azure SQL Profiler. It also collecting the information from the Extened Events. Although it is still in Preview, but I tried and it actually can work and can show me what SQL queries are running on the Azure SQL Database.

Common Azure SQL Profiler use-cases:

  • Stepping through problem queries to find the cause of the problem.
  • Finding and diagnosing slow-running queries.
  • Capturing the series of Transact-SQL statements that lead to a problem.
  • Monitoring the performance of SQL Server to tune workloads.
  • Correlating performance counters to diagnose problems.

You could follow these steps to get and run this tool,

    1. Download and Install Azure Data Studio. click here
    2. After installed Azure Data Studio, execute it and then click “Extensions” tab on the left menu (in version 1.2.4, it is the last second icon.
    3. You will find a lot of different extensions available, you could then install SQL Server Profiler here (at this moment, its version is v0.3.0
    4. After installed the extension, make a connection to a server in Servers tab
    5. After you make a connection, type Alt + P to launch Profiler.
    6. You may need to create one Profiler Session in the first time run.
    7. Select “Standard_Azure” in Session Template and entering a meaningful name in the Session Name. Click Create button.
    8. To start Profiler, type Alt + S.
    9. Now you can start seeing the Extended Events.
    10. To stop Profiler, type Alt + S again.

2 Replies to “SQL Profiler to Azure SQL Database”

Leave a Reply

Your email address will not be published. Required fields are marked *

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