An error is returned stating that you have problems executing UPDATE/INSERT/DELETE operations in an audited database
With the Audit Data Changes (Database Content Audit in Netwrix Auditor 8.5 and below) option enabled in Netwrix Auditor for SQL Server, when you try to perform UPDATE/INSERT/DELETE operations in the audited database, an error is returned stating that the statements cannot be executed because the database owner SID cannot be resolved or SIDs do not match.
Example 1: Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.
Example 2: The database owner SID recorded in the master database differs from the database owner SID recorded in database <database_name>.
|Cause||This can happen as a result of one of the following:
|Resolution||To prevent the issue, it is recommended to:
To resolve the issue, in SQL Server Management Studio, execute the following command:
ALTER AUTHORIZATION ON DATABASE::db_name TO sa
where “db_name” is a name of the corrupted database.
In the example above, the database system administrator (sa) account is used, but you can also use another account that has the required rights and permissions.
For a detailed explanation of the "alter authorization" command, refer to the following Microsoft article: Alter Authorization (Transact-SQL)