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?
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,
- Download and Install Azure Data Studio. click here
- 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.
- 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
- After installed the extension, make a connection to a server in Servers tab
- After you make a connection, type Alt + P to launch Profiler.
- You may need to create one Profiler Session in the first time run.
- Select “Standard_Azure” in Session Template and entering a meaningful name in the Session Name. Click Create button.
- To start Profiler, type Alt + S.
- Now you can start seeing the Extended Events.
- To stop Profiler, type Alt + S again.