Configure SQL Server for Azure Monitor for SAP solutions (preview)
In this how-to guide, you'll learn to configure a Microsoft SQL Server provider for Azure Monitor for SAP solutions through the Azure portal.
- An Azure subscription.
- An existing Azure Monitor for SAP solutions resource. To create an Azure Monitor for SAP solutions resource, see the quickstart for the Azure portal or the quickstart for PowerShell.
Open Windows port
Open the Windows port in the local firewall of SQL Server and the network security group (NSG) where SQL Server and Azure Monitor for SAP solutions exist. The default port is 1433.
Configure SQL server
Configure SQL Server to accept logins from Windows and SQL Server:
- Open SQL Server Management Studio (SSMS).
- Open Server Properties > Security > Authentication
- Select SQL Server and Windows authentication mode.
- Select OK to save your changes.
- Restart SQL Server to complete the changes.
Create Azure Monitor for SAP solutions user for SQL Server
Create a user for Azure Monitor for SAP solutions to log in to SQL Server using the following script. Make sure to replace:
<Database to monitor>with your SAP database's name
<password>with the password for your user
You can replace the example information for the Azure Monitor for SAP solutions user with any other SQL username.
USE [<Database to monitor>] DROP USER [AMS] GO USE [master] DROP USER [AMS] DROP LOGIN [AMS] GO CREATE LOGIN [AMS] WITH PASSWORD=N'<password>', DEFAULT_DATABASE=[<Database to monitor>], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF CREATE USER AMS FOR LOGIN AMS ALTER ROLE [db_datareader] ADD MEMBER [AMS] ALTER ROLE [db_denydatawriter] ADD MEMBER [AMS] GRANT CONNECT TO AMS GRANT VIEW SERVER STATE TO AMS GRANT VIEW ANY DEFINITION TO AMS GRANT EXEC ON xp_readerrorlog TO AMS GO USE [<Database to monitor>] CREATE USER [AMS] FOR LOGIN [AMS] ALTER ROLE [db_datareader] ADD MEMBER [AMS] ALTER ROLE [db_denydatawriter] ADD MEMBER [AMS] GO
Install Azure Monitor for SAP solutions provider
To install the provider from Azure Monitor for SAP solutions:
- Open the Azure Monitor for SAP solutions resource in the Azure portal.
- In the resource menu, under Settings, select Providers.
- On the provider page, select Add to add a new provider.
- On the Add provider page, enter all required information:
- For Type, select Microsoft SQL Server.
- For Name, enter a name for the provider.
- For Host name, enter the IP address of the hostname.
- For Port, enter the port on which SQL Server is listening. The default is 1433.
- For SQL username, enter a username for the SQL Server account.
- For Password, enter a password for the account.
- For SID, enter the SAP system identifier (SID).
- Select Create to create the provider
- Repeat the previous step as needed to create more providers.
- Select Review + create to complete the deployment.