When i restore a database from server1 to server2 as stand by/read-only mode the database restores with a database owner "domainrmartinez". How can i restore a database from server1 to server2 and the database owner as "sa"?
Software/Hardware used:
SQL Server 2005
ASKED:
August 24, 2009 9:21 PM
UPDATED:
September 4, 2009 7:31 PM
the owner is sa before i backup the database.
It might be changing the owner to the person restoring the database. It’s been a while since I’ve had to restore a database.
I assume that you have sysadmin rights on the server you are restoring the database to?
You won’t be able to change the owner until you bring the database online.
a job is scheduled to restore the database on the second server. I set the job to run as sa.
Can you check the owner_sid column in the sys.databases DMV as see what it shows for the database owner?