Before you add an Azure SQL Database into monitoring, make sure you have given SQL Governor the permissions to access it.
To add an Azure SQL Database, open SQL Server Management Studio and execute the following script:
USE DB_GOVERNOR
GO
EXEC [usp_AZ_AZURE_RESOURCE_INSERT]
@FRIENDLY_NAME = 'GovernorAzureDB1', -- USED AS AN IDENTIFIER
@SOURCE_TYPE = 'AZURE_DB', -- AZURE DB
@SERVER_NAME = 'governormisource.21f54c597882.database.windows.net', -- FULLY QUALIFIED SERVER NAME
@PORT = 3342,
@LOGIN_NAME = 'gov_azure_collector', -- SQL LOGIN
@PASSWORD = 'xxxxxxxxxxxxxxxxx',
@DATABASE = 'AzureDatabaseName'
To update the connection string later, run the following script:
USE DB_GOVERNOR
GO
EXEC [dbo].[usp_AZ_AZURE_RESOURCE_UPDATE]
@FRIENDLY_NAME = 'GovernorAzureDB1',
@PORT = 3342
The changeable settings are @SERVER_NAME, @PORT, @LOGIN_NAME, @PASSWORD, @DATABASE.
To remove an Azure SQL Database from monitoring, run the following script:
USE DB_GOVERNOR
GO
EXEC [usp_AZ_AZURE_RESOURCE_DELETE]
@FRIENDLY_NAME = 'GovernorAzureDB1'