Missing Login Name within a database

  • When I look at the users list in a table, it shows name as dbo, login = blank and database access = permit. When I go to security and try to change things, it shows me the table is owned by dbo, but sa still doesn't show up. Would it be safe to dbo and recreate it?

    Thanks

  • Not sure I get everything you are saying but the login sa usually translates to database user dbo.

    I would not delete dbo as a user from the database. Not sure what will happen but I wouldn't do it without testing first.

    If this doesn't help please provide additional information about what table you are looking in to get the details you described in your post.

    Thanks!

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • What is looks like when you expand a db and the highlight users is:

    name login name database access

    dbo permit

    jdoakes jdoakes permit

    glenn glenn permit

    What I'm trying to do is fix the blank login name for dbo. I tried deleting it from a test db, but was told by SQL Server I can't do that.

  • Ahhh. dbo is a standard user in every database. If you were to go to the security, logins view and double click on sa you would see that under the "database access" tab sa would look like the dbo user in every database. So, to delete dbo from the user collection in any given database would be to remove sa access to that database (I think).

    I have not messed around with it to see for sure but I am pretty confident that it can't be done. Not sure I would want to anyway.

    Is the dbo user causing you problems or are you just trying to understand why it is there?

    Anyway, hope this helps.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • Not causing a problem at this point. Just wondering how that could have happened.

  • Run sp_helpdb to see who is database owner.

  • It shows the owner as: serverName\Nt loginID.

    Indiviudal is a member of built in administrators group.

  • Change the database owner to 'sa using sp_changedbowner. Make sure database objects owned by DBO before you change it.

  • That did the trick. Thanks Allen!

Viewing 9 posts - 1 through 8 (of 8 total)

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