Posted on Leave a comment

restored database owner

Ran into an interesting problem with a SQL2005 database being restored to a SQL2008R2 instance.

Turned out the database owner was correctly represented as the login that restored the database, however the login mapped to the “dbo” user was still mapped to the old login on the source server.

To fix this, ran the following:

alter authorization on database::[database_name] to [login_name]
go

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.