Configuration of CMA policy


This topic provides best practices for configuring a CMA policy by using macros. 

Warning

Note

The MSSQL Server KM v9.6.10 and above versions supports the features listed below.

Possible credential use cases

This section provides you the possible credential use cases for the user name fields of Windows user and MS SQL Server login. 

To know how to configure CMA policy, click Configuring CMA policy.

This figure shows the Credentials section in the Environments configuration window of the CMA.

image2016-5-5 13:53:56.png

The following table lists all possible credential use cases:

Windows user

MS SQL Server login

Result

Entered

Entered

Windows user – the user entered.

MS SQL Server login - the user entered.

Entered

Empty

Windows user – the user entered.          

MS SQL Server login - the windows user (as integrated user).

Empty

Entered

Windows user – patrol defaultAccount user.

MS SQL Server login - the user entered.

Empty

Empty

Windows user – patrol defaultAccount user.

MS SQL Server login - patrol defaultAccount user (as integrated user).

Warning

Note

You should use the credentials that complies with the requirements of Windows and MSSQL user requirements. For more details on this click here.

CMA fields that supports usage of macros

The following fields in the CMA environment configuration window supports usage of macros:


    • Windows user
    • MS SQL Server login
    • Hostname      

image2016-5-5 14:25:40.png

Information

In order to use macros you need to put sign before the macro you enter.

For example, $HOSTNAME, $DOMAIN_NAME

When the macro is used, the KM tries to fetch its value by using the following order: 

  1. From the PATROL agent namespace. 
  2. From the machine environment variables. 

Warning

Note

If no value is returned from step 1 and 2, then the KM annotates an error about it.

Configuring single policy to monitor multiple SQL Servers in local monitoring by using macros

  1. Hostname field:
    Set $HOSTNAME (or any other macro which redirect to machine name)The KM uses the macro to fetch the host name as described in the above section.
  2. Using local user:
    Set ‘$HOSTNAME\<LOCAL_USER>’ OR just ‘\<LOCAL_USER>’ in the windows user field.The value of $HOSTNAME is replaced with the 'hostFQDN' PATROL variable value from the PATROL Agent namespace. 

    Warning

    Note

    This method works, if the same user is defined on all machines as a local user with the same password.

  3. Using domain user:
    Set ‘$DOMAIN_NAME\<USER_NAME>’You should define the "DOMAIN_NAME" by setting an environment variable as shown below or by adding "DOMAIN_NAME" variable to the PATROL namespace.
    image2016-4-20 17:7:38.png

    For example,
    i. In the figure shown below the local windows user named ‘localUser’ is used as the Windows user and the MS SQL Server user ‘sa’ is used as the MS SQL Server login.

    The value of the macro $HOSTNAME is fetched as described in the above section. 
    image2016-4-20 17:10:38.png

    ii. In the figure shown below the local windows user named ‘localUser’ is used as the Windows user and as the MS SQL Server login (as integrated user).
    image2016-4-20 17:11:30.png

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC PATROL for Microsoft SQL Server 9.6