dbo with no login

  • Hi

    My dbo user as no associated login. How can this happen and how can I fix it? The dbo user owns all objects in the database.

    The database appears to be working correctly.

    Thanks

    Andy

  • you could change dbo to sa for a moment and then clean out the other user.

     

    sp_changedbowner 'sa'

    after this is done, check your user by querying sysusers table.

    You could delete that user from your sysusers table and then run sp_changedbowner 'username' so that this user become the new owner of that database.

     

    mom

  • Why not leave the dbo as sa?

    The problem with creating databases via Windows Authentication logins arises when the user leaves the company and has their NT access removed.

    Carl

  • Any ideas why this may have happened in the first place?

  • I've seen it happened when you restore, attach a database on a different server and the user that is mapped to dbo in sysusers doesn't exist (or sids don't match) in sysxlogins on the server. MS describes it here:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;314546

     

  • This is happening because Window Login user who owned the database being removed from windows domain account.

     This is a bug as Database withour any ownere being assigned.

     

     

     

    Sivaprasad S - [ SIVA ][/url]http://sivasql.blogspot.com/[/url]

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

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