The change report from Netwrix Auditor for SQL Server contains the following warning:
Collect ‘Database’ information warning on server: MSSQLSERVER DB: master.
Cannot insert the value NULL into column ‘owner’, table ‘tempdb.dbo’
Netwrix Auditor for SQL Server uses the ‘sp_helpdb’ stored procedure. This stored procedure will fail if any database on the SQL Server does not have an owner.
Perform the following steps to find the database(s) with the ‘NULL’ owner:
1. Connect to the ‘MSSQLSERVER’ server.
2. Run the following statement:
select name, suser_sname(sid) from sysdatabases
3. Look for database without username in second field.
4. Please run the following script to change the owner of the database:
exec sp_changedbowner ‘user name’
Note: Replace ‘user name’ with the user name of the account for the database
exec sp_changedbowner ‘sa’