In most cases, the AccountServer is installed on the same box as MS SQL. After a reboot, it sometimes happens that the AccountServer does not start up because MS SQL is not yet running.
To resolve the issue, set the AccountServer service to be dependent on the MS SQL service. This ensures that the AccountServer service only starts up after MS SQL has successfully started up.
- Determine the exact service name for the SQL service.
- Open the Services manager and locate the MSSQL service. The name listed is usually 'SQL Server (xxxx)'.
- Double-click the service and note the service name at the top, typically MSSQLSERVER or MSSQL$SQLEXPRESS.
- Now follow Option 1 or Option 2 below.
- Run regedit to open your registry.
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and locate the AS_Service service.
- Create a DependOnService key by right-clicking and selecting New > Multi-String Value.
- In the value field, enter the service name for MSSQL as determined in the first step.
- Click OK and close your registry.
In the Command Prompt, run
sc config AS_Service depend= MSSQL$SQLEXPRESS
where MSSQL$SQLEXPRESS is the exact name of the SQL service as determined in the first step.
Note: There is a space after the "=".
If everything is working properly, when you try to stop the SQL service, you should get a warning saying that the AccountServer service will also be stopped. Also, if both the AccountServer and SQL service have been stopped, and you restart the AccountServer service, the SQL service will be started automatically. A reboot may be required to ensure that the dependencies are active.