sp_help DB error: Msg 16916

  • I try to run sp_helpdb on a SQL SERVER (WINDOWS 2003 Server and SQL Server, SP3) and i get the following error:

    Server: Msg 16916, Level 16, State 1, Line 1

    A cursor with the name 'ms_crs_c1' does not exist.

    The statement has been terminated.

    However, I get the results.

     

    Anybody knows what is this?

    Thanks.

  • The database owner for some of your database is not a valid login. Try running the following query and change the ownership of all the databases which have null as the owner

    select name,suser_sname(sid) as database_owner from sysdatabases

     

  • The above is the most likely cause. The stored procedure creates a cursor in each database and uses that to gather information.

  • If running the sp_helpdb in master it is fine. If running it in the user DB then i get the same error.

    I have run the suggested query from earlier but it shows that all of the dbowners are 'sa'

    I do not get this on other servers of the same build

    Any help is appreciated

    MCT
    MCITP Database Admin 2008
    MCITP Database Admin 2008
    MCITP Database Dev 2008
    www.jnrit.com.au/Blog.aspx

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

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