Ask the Expert

Restoring a database with a different name

I have an existing SQL Server database (DB1) in my server (server01), and a database update was sent to me, which was backed-up from a different server (server02), but with the same database name (DB1). Now I want to restore that database update into my server (server01), but with a different database name (DB2), because I don't want to lose my existing data.

    Requires Free Membership to View

If you are using Enterprise Manager to restore this database then simply specify a NEW database name within "Restore database as" field in the restore database dialog box. On the Options tab enter new file locations for the database data files that will be created when you restore this database. Do NOT tick the force over existing database option, if you do NOT select this then SQL Server should not be able to overwrite any of your existing databases.

If you are using the RESTORE DATABASE command from T-SQL then once again specify a NEW database name. Also specify MOVE options to specify where you your current severs disk subsystems you want to located the new data files. See Books Online for more information on this (see the RESTORE DATABASE command).

 

For More Information

This was first published in April 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

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
Sort by: OldestNewest

Forgot Password?

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

Your password has been sent to: