sp_helpdb error

  • I tried to run sp_helpdb and got the following error. It happened on all dbs for this one server. I wonder if any of you have seen this and would suggest a solution for it.

    Thank you.

    ----------

    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.

  • I saw it once in one of my servers, but checkdb didn't report any errors.

    The server and the db worked without any problems.

    Later I had ro reinstall SQL and it didn't happend any more.

  • I believe this error occurs when one or more databases are owned by server's login which doesn't exist anymore. Try to run this query:

    SELECT dbid, SUSER_SNAME(sid) FROM sysdatabases

    and see if there any NULLs in the second column.

  • quote:


    I believe this error occurs when one or more databases are owned by server's login which doesn't exist anymore. Try to run this query:

    SELECT dbid, SUSER_SNAME(sid) FROM sysdatabases

    and see if there any NULLs in the second column.


    There are two NULLs in the second column.

  • Thank you, guys. I changed the two Nulls to 'sa' and it solved the problem.

    Thanks again!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply