1

I have a database where the owner is Login1 but the username dbo is assigned to Login - login2. I understand in order to change the login name for the username dbo to sa I will have to use the below EXEC sp_changedbowner 'sa' but the problem here is that this will change the databasowner from Login1 to sa. How do I only change the dbo login name to sa and keep the database owner to Login1

0

To the best of my knowledge you can't change the dbo user without changing the entry in sys.databases. This is a case where the same piece of data (the owner of the database) is set it in two places. While they do occasionally become out of sync they mean the same thing.

If you need someone to have database owner access then just add them to the db_owner role. Really the main difference between dbo and members of db_owner is that members of db_owner can be denied permissions while the actual dbo can't.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.