CPM - SQL service is being managed as a Windows service and may receive the error "This usage is a dependent service and will be handled by the service it depends on"

CPM - SQL service is being managed as a Windows service and may receive the error "This usage is a dependent service and will be handled by the service it depends on"

103
Created On 11/10/26 11:03 AM - Last Modified 11/10/26 16:07 PM


Symptom


When trying to manage the password of an SQL service on an SQL server, the service is being managed as a normal Windows service and may receive the error "This usage is a dependent service and will be handled by the service it depends on."  We want to manage it as an SQL service and not a normal Windows service.

For example, the Windows service debug log would show:
18/11/2021 13:17:58 [1c18] Starting Windows service plugin debug.
18/11/2021 13:17:58 [1c18] Searching service name SQLAgent$MES in pattern (SQLSERVERAGENT|SQLBrowser|SQLWriter|MSSQLFDLauncher|MSSQLServerADHelper|msftesql|MSSQL)
18/11/2021 13:17:58 [1c18] Finished checking if service SQLAgent$MES is mssql service with result: 0
18/11/2021 13:17:58 [1c18] Handling Windows service SQLAgent$MES.

As the service "SQLAgent$MES" did not match the default Regex string (SQLSERVERAGENT|SQLBrowser|SQLWriter|MSSQLFDLauncher|MSSQLServerADHelper|msftesql|MSSQL), it was not seen as an MS SQL service but as a normal Windows Service.  We need to add the instance of the SQLAgent service to the Regex string so it would be this:
SQLSERVERAGENT|SQLBrowser|SQLWriter|MSSQLFDLauncher|MSSQLServerADHelper|msftesql|MSSQL|SQLAgent

After adding SQLAgent to the Regex string, the debug log would now show:
18/11/2021 13:18:57 [1ea8] Starting Windows service plugin debug.
18/11/2021 13:18:57 [1ea8] Searching service name SQLAgent$MES in pattern (SQLSERVERAGENT|SQLBrowser|SQLWriter|MSSQLFDLauncher|MSSQLServerADHelper|msftesql|MSSQL|SQLAgent)
18/11/2021 13:18:57 [1ea8] Finished checking if service SQLAgent$MES is mssql service with result: 1
18/11/2021 13:18:57 [1ea8] Checking service name SQLAgent$MES is allowed
18/11/2021 13:18:57 [1ea8] Finished checking service name SQLAgent$MES is allowed with result: 1
18/11/2021 13:18:57 [1ea8] Handling sql service SQLAgent$MES

The CPM now picks up the SQL service as a proper MSSQL service this time.


Environment


9.5;9.6;9.7;9.8;9.9;9.10;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;12.4;12.3;12.5;12.6 Privileged Access Manager (PAM, self-hosted) Central Policy Manager (CPM) Central Policy Manager (CPM)
Microsoft SQL services


Cause


The CPM is trying to manage the SQL service as a normal Windows service (using Microsoft API's) instead of an SQL service. The latest version of the CPM can use WMI methods (rather than Microsoft API's) to change passwords of SQL services and Idira recommends using the WMI methods.  To achieve this, we need to add the SQL service into a Regex as shown in the resolution steps below.

Resolution


1) Login to the PVWA and browse to > Administration > Platform Management > Service Account Platforms > Windows Service > Click Edit 
2) Right click “Automatic Password Management” and click “Add Additional Policy Settings” 
3) Right click “Additional Policy Settings” > Click “Add Parameters” > Right click “Parameters” > Click “Add Parameter” 
4) Set the parameter name to be “MSSQLServicesNamesPattern” and then the value to be this Regex string:
SQLSERVERAGENT|SQLBrowser|SQLWriter|MSSQLFDLauncher|MSSQLServerADHelper|msftesql|MSSQL|SQLAgent

Notes:
  • Use | to separate multiple services in the Regex string. 
  • You cannot specify wildcards in the string.  However, it does partial matches so you can use just MSSQL instead MSSQL$<instanceName>.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001PAyCAM&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail