CPM - Issues when attempting to manage SQL Windows services
166
Created On 11/10/26 10:58 AM - Last Modified 11/10/26 12:58 PM
Symptom
After configuring a Microsoft SQL Server Windows service to be managed by the Windows Service CPM plugin, the plugin successfully replaces the password but does not restart the service even though RestartService is set to yes.
Additionally, even though HandleServiceDependencies is set to Yes on the platform (by default), dependent SQL Windows services are not managed at all.
Environment
Privileged Access Manager (PAM, self-hosted);Privilege Cloud Windows Service usage/dependency platform, managing a Microsoft SQL Server Windows service.
Cause
SQL Server components are executable programs that run as Windows services. The more recent versions of the Windows Service CPM plugin use WMI (Windows Management Instrumentation) methods to replace passwords in SQL services. Using this method, there is no need to restart the SQL services which is why the CPM is skipping them (even when RestartService is set to yes).
However, there is still an existing issue with the plugin that causes SQL services which are dependencies of other SQL services not to be managed. This occurs even when HandleServiceDependencies is set to yes.
For example, in a standard SQL Server configuration, the SQL Server Agent service (SQLSERVERAGENT) is dependent upon the SQL Server service (MSSQLSERVER). When HandleServiceDependencies is set to yes, only the SQL Server service should be directly managed by the CPM (that is, added to the Windows Service tab for a given target account in PVWA). The CPM should replace the password for the SQL Server Agent service; however, as described above, it does not do so.
Resolution
To alleviate the issue with managing dependent SQL services, follow these steps:
- In PVWA, go to Administration -> Platform Management -> Dependents (v10 UI) / Service Account Platforms (Classic UI) -> Windows Service
- Edit the platform:
- v10 UI - click on the ellipsis button (three horizontal dots) next to Windows Service and select Edit
- Classic UI - click on Windows Service
- Expand Automatic Password Management -> Additional Policy Settings
- Note: If you don't see Additional Policy Settings, right-click on Automatic Password Management -> Add Additional Policy Settings.
- Expand Additional Policy Settings -> Parameters
- Note: If you don't see Parameters, right-click on Additional Policy Settings -> Add Parameters.
- Right-click on Parameters -> Add Parameter
- Name this new parameter "MSSQLServicesNamesPattern" and set the Value to "-1".
- Click Apply -> OK
Additional Information
Details
SYMPTOM:After configuring MS SQL Services to be managed by the CPM, the CPM successfully replaces the password but does not restart the service even though RestartService is set to yes.
PROBLEM:
In the latest version of CPM, the CPM uses WMI methods to change passwords in SQL services.
Using this method, there is actually no need to restart the SQL services which is why the CPM is skipping them.
The method used to change Microsoft SQL service passwords is described as best practice by Microsoft.
SOLUTION:
As this is best practice, Cyber-Ark recommends using the process above which does not require restarting the MS SQL service.
If restarting the SQL service is required, this can be enforced.
In order to control what services are considered MSSQL related, configure the windows services (WinService) policy and add the parameter "MSSQLServicesNamesPattern" in the "Additional Policy Settings" section.
In order to control what services are considered MSSQL related, configure the windows services (WinService) policy and add the parameter "MSSQLServicesNamesPattern" in the "Additional Policy Settings" section.
The default value is: SQLSERVERAGENT;SQLBrowser;SQLWriter;MSSQLFDLauncher;MSSQLServerADHelper;msftesql;MSSQL
1234
1234