Muokkaa

Jaa


Configure SQL Server for Azure Monitor for SAP solutions

In this how-to guide, you learn how to configure a SQL Server provider for Azure Monitor for SAP solutions through the Azure portal.

Prerequisites

Open a Windows port

Open the Windows port in the local firewall of SQL Server and the network security group where SQL Server and Azure Monitor for SAP solutions exist. The default port is 1433.

Configure SQL Server

Configure SQL Server to accept sign-ins from Windows and SQL Server:

  1. Open SQL Server Management Studio.
  2. Open Server Properties > Security > Authentication.
  3. Select SQL Server and Windows authentication mode.
  4. Select OK to save your changes.
  5. 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 sign in to SQL Server by 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

Prerequisites to enable secure communication

To enable TLS 1.2 or higher, follow the steps in this article.

Install an Azure Monitor for SAP solutions provider

To install the provider from Azure Monitor for SAP solutions:

  1. Open the Azure Monitor for SAP solutions resource in the Azure portal.
  2. On the resource menu, under Settings, select Providers.
  3. On the provider page, select Add to add a new provider.
  4. On the Add provider page, enter all required information:
    1. For Type, select Microsoft SQL Server.
    2. For Name, enter a name for the provider.
    3. (Optional) Select Enable secure communication and choose a certificate type from the dropdown list.
    4. For Host name, enter the IP address of the hostname.
    5. For Port, enter the port on which SQL Server is listening. The default is 1433.
    6. For SQL username, enter a username for the SQL Server account.
    7. For Password, enter a password for the account.
    8. For SID, enter the SAP system identifier.
    9. Select Create to create the provider.
  5. Repeat the previous step as needed to create more providers.
  6. Select Review + create to complete the deployment.

Next steps