SRM 6.x is installed using external Database, Services fail to start: Unable to start Site Recovery Manager Service.
After a long time I encountered an error message which seemed to be quite interesting while troubleshooting under SRM.
Customer installed an external sql database, created an sql user and configured the ODBC accordingly. Generally it’s recommended to provide the sysadmin privileges during installation. Once installation is completed we went ahead and removed the sysadmin privileges.
Once server was rebooted SRM services failed to start. As a part troubleshooting steps I went through the DR logs to analyze the cause of the service failure. DR logs can be found in the below location.
C:\ProgramData\VMware\VMware vCenter Site Recovery Manager\Logs\vmware-dr.log
warning ‘Persistence’] Rolling back OPEN transaction context: txn_id=0
warning ‘DrServiceInstance’] Initializing service content: std::exception ‘class VdbError’ “VdbError: Column db_id does not exist in table pd_localsite”
warning ‘DrServiceInstance’] Backtrace:
backtrace eip 0x007da6e0 ?AbortProcess@System@Vmacore@@YAXXZ
backtrace eip 0x007dae57 ?CreateBacktrace@SystemFactoryImpl@System@Vmacore@@UAEXAAV?$Ref
Now based on this error message we already have a KB article that explains this issue to be with permissions for the required sql user on the SQL DB. But validating the article the user had the required permissions as per the article. Except Sysadmin which is not mandate if Bulk user and DBcreate authorizations are provided.
In order to rectify the issue we managed to find two different alternatives.
- Provide the SQL user with sysadmin privileges
- Execute the below sql script to create a DB with required parameters
CREATE DATABASE [Database_Name];
CREATE LOGIN [SQL_Username] WITH PASSWORD=N’User_Pasword’, DEFAULT_DATABASE=[Database_Name], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
EXEC sp_changedbowner ‘SQL_Username’
EXEC sp_executesql N’CREATE SCHEMA SQL_Username’
If you are not willing to provide the sysadmin privileges. Execute above script and once executed you can proceed configuring the ODBC and installing the SRM installer accordingly.