Powered by Zoomin Software. For more details please contactZoomin

Cannot insert the value NULL into column 'owner', table 'tempdb.dbo'

Sources
Netwrix Products
Content Types
Formerly a Product of

Cannot insert the value NULL into column 'owner', table 'tempdb.dbo'

HomeCannot insert the value NULL into column 'owner', table 'tempdb.dbo'Current page

Cannot insert the value NULL into column 'owner', table 'tempdb.dbo'

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: use master 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: use problematic_database_name exec sp_changedbowner 'user name' Note: Replace 'user name' with the user name of the account for the database Example: use problematic_database exec sp_changedbowner 'sa'
Was this topic helpful?
TitleResults for “How to create a CRG?”Also Available inAlert