Microsoft SQL Database

This page explains how to prepare a Microsoft SQL database for the connectivity to SAP Focused Run.

Currently the following monitoring application are supported for Microsoft SQL databases:

Preparations in the Managed Database

TaskActions
Install Database
Install MS-SQL 2008 or higher
You need at least MS-SQL 2008, optionally install the latest MS SQL DB and latest Patches from support.sap.com/swdc -> Databases -> MS SQL Server

Create DB monitoring user and provide connection credentials

SAP Focused Run uses SAP Host Agent Web methods to get DB monitoring data. For MSSQL DB, the connection credentials are part of windows authorizations.

Check that your MSSQL installation follows the recommendations in SAP Note 1877727 and SAP Note 1564275.

Be aware the hostname interpreted as DB Hostname by Outside Discovery discovery is the hostname as set in Windows registry as BackConnectionHostNames described in SAP Note 1564275 and should be the same as SLDSYSTEMHOME set in SAP NetWeaver ABAP or j2ee/dbhost in SAP NetWeaver JAVA (see also SAP Note 1052122).

Note: Can be automated by os script.

Run Outside Discovery on the HostAs prerequisites, you shall install the SAP Host Agent and run Outside Discovery as described in page Preparing Outside Discovery.
Get DB metrics from the OS

Optional operation to test the metric collection on OS level:

/usr/sap/hostctrl/exe/saphostctrl -function ListDatabaseMetrics -dbname <DBname> -dbinstance <Instname> -dbtype mss 

Support of MSSQL Always On scenario

Prerequisites: 

  • Listener configuration (1772688 - SQL Server Always On Availability Groups and SAP NetWeaver based applications)
  • SAP Focused Run 4.0 FP01 or higher
  • SAP Host Agent 7.22 PL62 or higher

Configuration steps on OS:

  • Create the http.server.settings file under C:\Program Files\SAP\hostctrl\exe\config.d folder on every replication host. 
  • Add following entry:

    OutsideDiscovery {​​​​​​
      DatabaseDiscoveryMethod : databasesystem
    }​​​​​​
  • Restart the Host Agent or execute C:\Program Files\SAP\hostctrl\exe\saphostctrl.exe -function ReloadConfiguration
  • Execute the Outside Discovery
  • Create  a sapdbctrl user on all AlwaysOn nodes by calling

     saphostctrl.exe -function SetDatabaseCredential -dbtype mss -dbname databasename Password="some password"

    For a named SQL instance, add the dbinstance, i.e.:
    saphostctrl.exe -function SetDatabaseCredential -dbtype mss -dbname databasename -dbinstance instancename Password="some password"
    Background: this command will create the default credential (SAPDBCTRL) in the credential vault and SQL, and it is used by the primary node to connect to secondaries to retrieve metrics.

    Remark: at the moment, if a failover occurs there will be no automatic detection triggered by the Outside Discovery. Means, in worst case, it could take up to 12 hours to detect and to reflect it in SAP Focused Run. In order to ensure that the monitoring getting reconfigured on a new primary as soon as possible, either set the Outside Discovery frequency to the highest supported - 60 minutes (by passing additional parameter "- frequency <minutes>" while executing the ConfigureOutsideDiscovery) or perform the ExecuteOutsideDiscovery manually.
    In the near future, in one of the upcoming SAP Host Agent patch levels, it is planned to introduce the failover detection mechanism.
  • To ensure the creation of virtual database entry for the MSSQL replication scenario in LMDB, either wait for the next run of the ABAP/J2EE data supplier or simply trigger it manually. Please note, that for the databases running without ABAP/J2EE system the creation of virtual database in the LMDB as well as assigning it to the primary database has to be performed manually via Technical System Editor.