can''t run sp_helpdb

  • hi i am trying to run this

    USE master

         GO

     EXEC sp_helpdb

     

    in my sql server master database but i keep getting this error message...

     

    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.

     

    any ideas why?

  • Odd error.

    What happens if you run the select at line 53?

    DECLARE @dbname sysname

    SET @dbname=NULL

    select name, suser_sname(sid), convert(nvarchar(11), crdate),

    dbid, cmptlevel from master.dbo.sysdatabases

    where (@dbname is null or name = @dbname)

    Which servicepack does the server have?

  • thank you for your help!!! ok so i run your code and for some databases in the columns that saays (no column name) only for a couple i have null. we recently changed the domain, so we recreated all our logins in sql server... humm maybe this is the problem?

    so i used this code to add owners to all my databases...

    sp_changedbowner 'new owner'

    and now when i right click on the database, the owner does come out.

    question when i changed the owner , when i go to security in em , logings and go to the user i added as owner and i check in the databases tab , in the tab it says dbo as the name of the user instead of the user's name. when i click on the row then i get the error message 15405:cannot use the reserved user or role name 'dbo'... then i changed the owner to sa and it works fine. .. but i don't want the owner to be sa... am i missing something i run the code sp_changedowner?

     

     

  • The securitydescriptors in master can be out of sync with a restored database. If you look in a database the login for a certain user is Null instead of user...

    I don't have the url at hand, will try to post it later.

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

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