Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53
Cannot insert the value NULL into column 'owner', table 'tempdb.dbo.#spdbdesc___ ... __000100004AA1'; column does not allow nulls. INSERT fails.The statement has been terminated.
I narrowed this down to the statement [select name, suser_sname(sid), convert(nvarchar(11), crdate), dbid, cmptlevel from master.dbo.sysdatabases] within the sp_helpdb stored procedure. The database owner sid was not a valid user on the server, but a valid user on a different server from which the database had been restored
sp_changedbowner 'insert_valid_user_here' quickly corrected the problem.
No comments:
Post a Comment