How to have a Login Name associated with "dbo"

  • Sorry this might be a fairly basic question, but I recently cloned a SQL/SERV 2000 database and noticed that in the original copy the user "dbo" has a login name "PRSDEV" associated to it. When I look at the Logins screen I see that the user "dbo" is associated with "PRSDEV"

    I assume this gived all access to the PRSDEV user.

    .

    I tried to do the same in my Cloned database but was not able to.

    How do I achieve this ?

    Thanks

  • was the db cloned onto a new server?In which case user may not be synched with login.

    Run exec sp_change_users_login 'report' in the new database, if PRSDEV is listed run

    exec sp_change_users_login 'update_one','PRSDEV','PRSDEV'

    (presuming login name same as dbuser name)

    The new dbo of the database will be the user of whoever created it. To change it to PRSDEV run

    exec sp_changedbowner 'PRSDEV'

    whilst connected to the database

    ---------------------------------------------------------------------

  • dbo is not a specific user. When a user is a member of the System Administrator Server role (sysadmin) or the db_owner database role, any table they create is assigned to dbo as the creator.

    Steve

  • exec sp_changedbowner 'PRSDEV' did the trick

    Thanks

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

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