Add a Microsoft SQL database to the Database Hub (preview)

This article covers the configuration needed for Microsoft SQL databases to appear in Database Hub and participate in supported performance monitoring.

Important

This feature is in preview.

You can view Microsoft SQL resources in the Database Hub from Azure, Fabric, and on-premises, including Azure SQL Database, SQL database in Fabric, Azure SQL Elastic pools, Azure SQL Managed Instance, SQL Server enabled by Azure Arc, and SQL Server instances in Azure VMs.

Currently, the following database resource types are visible in the Database Hub but aren't currently supported in the Performance tab: Azure SQL Elastic pools, Azure SQL Managed Instance, SQL database in Fabric, and SQL Server instances in Azure VMs.

Add an Azure resource provider to enable the Database Hub

Register the Microsoft.AzureArcData resource provider in each subscription that contains resources you want to monitor. Database Hub requires this resource provider to view the performance monitoring data. For more information, see az provider register. Use Azure CLI:

az provider register --namespace Microsoft.AzureArcData

Add metadata to a user database to enable Azure SQL Database in the Performance page of the Database Hub

  1. For Azure SQL Database, add the MS_EnablePerformanceMonitoringPreview extended property to each user database you want to monitor.

    Tip

    Run the script on each user database you want to monitor. Don't run it on the master database.

     IF EXISTS ( 
         SELECT 1 
         FROM sys.extended_properties 
         WHERE class = 0 
           AND name = N'MS_EnablePerformanceMonitoringPreview' 
     ) 
     BEGIN 
         EXEC sys.sp_updateextendedproperty 
             @name = N'MS_EnablePerformanceMonitoringPreview', 
             @value = N'true'; 
     END 
     ELSE 
     BEGIN 
         EXEC sys.sp_addextendedproperty 
             @name = N'MS_EnablePerformanceMonitoringPreview', 
             @value = N'true'; 
     END; 
     GO 
    

To stop performance data collection for a user database, change @value = N'true' to @value = N'false' in both procedure calls, and then rerun the T-SQL script.

Next step