The issue may occur because one of the database owner might be null.
SELECT name, suser_sname(sid), dbid, cmptlevel FROM master.dbo.sysdatabases
To get around the issue we need to figure out which database do not have a valid owner by using the above command. If owner is null the sp_helpdb throws error.
USE KalyanDB
EXEC sp_changedbowner 'sa';
No comments: