Error "System Data SqlClient SqlError: Cannot insert the value NULL into column ‘owner’, table ‘tempdb dbo. #spdbdesc. Column does not allow nulls"

Article:TECH40090  |  Created: 2008-06-04  |  Updated: 2011-11-08  |  Article URL http://www.symantec.com/docs/TECH40090
Article Type
Technical Solution


Issue



When running Symantec Endpoint Protection Integration reports, the following error is displayed:

System Data SqlClient SqlError: Cannot insert the value NULL into column ‘owner’, table ‘tempdb dbo. #spdbdesc. Column does not allow nulls.


Environment



Notification Server 6.0.6074 (SP3 R6)
Symantec Endpoint Protection (SEP) 11 MR2
Microsoft Windows* 2003 SP1
SQL 2000 on Altiris Server
SQL 2005 on the Symantec Endpoint Protection Manager (SEPM) database
SEP IC 6.x


Cause



This seems to be a Microsoft SQL Server issue with a database having an invalid owner. Also, the following error is displayed when running:

 exec sp_helpdb against the master database:
Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53
Cannot insert the value NULL into column  ' ',  table ' '; column does not allow nulls. INSERT fails.
The statement has been terminated.

 

A database will get a NULL owner value if the original owner of the database was an Active Directory account that is no longer valid.


Solution



On the SQL server that houses the Altiris database perform the following steps inside Query Analyzer:

  •  

    In a Query window run sp_helpdb. This will provide a list of all the database names on the server and their owner.
  • Record the database names of those listed as having a NULL owner
  • Run sp_changedbowner 'owner name' against each database that has a NULL owner. Where owner name is the name of the account you wish to assign as the new owner of the database. To specify which database this command will be performed on you simply change the drop down box above the query window listing the currently active database.
NOTE: Most SQL databases have the owner of sa.


Legacy ID



41937


Article URL http://www.symantec.com/docs/TECH40090


Terms of use for this information are found in Legal Notices