The server principal is not able to access the database under the current security context (NETIQKB72512)

  • 7772512
  • 06-Aug-2010
  • 06-Aug-2010

Environment

NetIQ AppManager 7.0.x
NetIQ AppManager Control Center 7.0.x

Situation

The server principal is not able to access the database under the current security context
The cache manager and command queue service report a security context error when when attempting to sync with the QDB database.

Control Center fails to sync with the QDB due to the following error:

NetIQ.CQS.NQSyncQDB.SyncThread.Start()
Line Number: 1 : Message The server principal "" is not able to access the database "QDB" under the current security context. : Procedure : Server
Line Number: 46 : Message SyncQDBComputers: exec [].[QDB].dbo.CC_SyncComputersMode @mode output execution failed

Resolution

The solution is to move the conflicting database to its own instance, remove the linked server, and reset the @LOCAL name of the server so that the 'select @@servername' query pulls up the actual name of the server. This allows the CQS service to talk to the NQCCDB and QDB and removed all the Cache Manager issues.

Conduct the following steps to resolve this issue:

  1. Delete the linked server by using SQL Server Management Studio and navigating to Server Objects> Linked Servers> Right click on the conflicting server name and click delete.
  2. Once the linked server has been successfully deleted run the following query:

    sp_addserver '<servername>', 'local'

  3. Restart the SQL services.
  4. Run the 'select @@servername' query to verify that the value is now the server name and no longer NULL.
  5. Restart the NetIQ services and verify that the CQS and Cache Manager errors are gone and that the Control Center is syncing properly with the QDB.

Cause

A linked database has been created with the same name as the server and the @LOCAL variable was set to 'NULL', you can verify this by running the 'select @@servername' SQL query.

If the above query returns NULL, this causes the CQS service to reference the linked server that has the same name as the server. When this occurs, all the CQS can see are the databases that are available through the link, which may not include the NetIQ databases. This leaves the CQS service unable to find the QDB or NQCCDB and failing to sync the two.

 

Additional Information

Formerly known as NETIQKB72512

See the following link for additional syntax of the sp_addserver variable: http://msdn.microsoft.com/en-us/library/aa259599(v=SQL.80).aspx