SQL Server Database Restore

585 pts.
Tags:
SQL Server
SQL Server 2005
SQL Server administration
SQL Server database
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

You would need to change the owner on the source system before you backup the database. You can’t make any changes to the database when it is in stand by /readonly mode.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Rick Martinez
    the owner is sa before i backup the database.
    585 pointsBadges:
    report
  • Denny Cherry
    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.
    66,130 pointsBadges:
    report
  • Rick Martinez
    a job is scheduled to restore the database on the second server. I set the job to run as sa.
    585 pointsBadges:
    report
  • Denny Cherry
    Can you check the owner_sid column in the sys.databases DMV as see what it shows for the database owner?
    66,130 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following