Add Audit Store Database wizard of Audit Manager fails with an error indicating that the database owner SID recorded in the master database differs from the database owner SID recorded in the newly created database.
Applies to: Centrify Direct AuditĀ Audit Manager
Problem: Add Audit Store Database wizard of Audit Manager fails with an error indicating that the database owner SID recorded in the master database differs from the database owner SID recorded in the newly created database.
Error in Wizard: [2015-12-11 11:45:44.961 +0200] mmc.exe[59372,5] Verbose: WorkerThread`2.RunOuter: Unexpected exception from worker thread 'Commit the add Audit Store database wizard thread' [2015-12-11 11:45:44.961 +0200] mmc.exe[59372,5] Verbose: WorkerThread`2.RunOuter: Centrify.DirectAudit.Common.Logic.UnexpectedException: A database operation error occurred. Please contact your administrator to make sure the remote database is accessible and working properly. ---> System.Data.SqlClient.SqlException: The database owner SID recorded in the master database differs from the database owner SID recorded in database 'AuditStore-2015-12-11-new'. You should correct this situation by resetting the owner of database 'AuditStore-2015-12-11-new' using the ALTER AUTHORIZATION statement.
Root cause - You may see this error if the user who is rotating the Audit Store database is a member of db_owner role of model database. Since the user principals of model database are copied whenever a new database is created, it results into mismatched owner SID records.
Workaround - Remove this user from the role members list of db_owner database role of model database and retry.