[KBA-01061] Directory role stops and restarts with "Unable to take the Database lock" error in Event Viewer - Security Center 5.4 - 5.9

series
Security Center 5.4 - 5.9
revised_modified
2014-02-18

[KBA-01061] Directory role stops and restarts with "Unable to take the Database lock" error in Event Viewer

This article explains why the Directory role might continuously stop and restart and you receive an "Unable to take the database lock" error in the Event Viewer.

Symptoms

The Directory role continuously stops and restarts, and the following error is received every few minutes in the Event Viewer:

Event Source: GenetecDirectory.exe
Description: Unable to take the database lock, another Master Directory may be running on this database, restarting Directory service

Cause

This issue can occur when the Genetec™ Server service is set to log on with an account other than Local System.

Workaround

To avoid this issue, apply the View Server State SQL privilege to the service account that launches the Genetec™ Server service. This procedure is useful when the Genetec™ Server service account cannot be given system administrator (sysadmin) rights.
To apply the View Server State SQL privilege manually:
  1. Open Windows Services, find the Genetec™ Server service, and identify the user with which it logs on.

  2. Open Microsoft SQL Server Management Studio.
  3. Navigate to Security > Logins and find the user.

  4. Right-click the user and click Properties.
  5. In the Login Properties window, click Securables > Search.

  6. In the Add Objects window, select the server you are logged into and click OK.

    The server is added to the Securables list in the Login Properties window.

  7. In the Permissions list below, select the Grant option for the View server state permission.

  8. Click OK and close SQL Server Management Studio.
To apply the View Server State SQL privilege using a command line:
  1. Open Windows Services, find the Genetec™ Server service, and identify the user with which it logs on.

  2. Open Microsoft SQL Server Management Studio.
  3. Click New Query and execute the following command lines:
    use [master]
    GO
    GRANT VIEW SERVER STATE TO [DOMAIN\USER]
    GO

    Example command: