Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Important
Azure Data Studio is retiring on February 28, 2026. We recommend that you use Visual Studio Code. For more information about migrating to Visual Studio Code, visit What's happening to Azure Data Studio?
The Azure Monitor Logs extension for Azure Data Studio enables you to connect and query a Log Analytics workspace.
This extension is currently in preview.
If you don't have an Azure subscription, create a free Azure account before you begin.
The following prerequisites are also required:
To install the Azure Monitor Logs extension in Azure Data Studio, follow the steps below.
Open the extensions manager in Azure Data Studio. You can either select the extensions icon or select Extensions in the View menu.
Type in Monitor logs in the search bar.
Select the Azure Monitor Logs extension and view its details.
Select Install.
Find your Log Analytics Workspace in the Azure portal, then find the Workspace ID.
To set up an Azure Monitor Log workspace, follow the steps below.
Select New connection from the Connections pane.
Fill in the Connection Details information.
Now that you have set up a connection to your Log analytics workspace, you can query the workspace using Kusto (KQL).
To create a new query tab, you can either select File > New Query, use Ctrl + N, or right-click the database and select New Query.
Once you have your new query tab open, then enter your Kusto query.
There are two main tables in Azure Log Analytics (Azure Monitor Logs) workspace that capture Azure SQL events for an Azure SQL database:
To execute the samples below, you must be logged in to an Azure SQL database.
Here are some samples of KQL queries:
AzureDiagnostics
| summarize count() by OperationName
AzureDiagnostics
| where LogicalServerName_s == "<servername>"
| summarize count() by Category
Note
Allow about 15 minutes before the log results appear.
For more information about writing Azure Monitor Logs, visit Azure Monitor documentation
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayTraining
Module
Guided project - Analyze logs in Azure Monitor with KQL - Training
Write log queries to gain insights into your business, IT operations, and performance. Use Kusto Query Language (KQL) to extract log data in Azure Monitor Log Analytics.
Certification
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.