Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy database to same server with new name

Status
Not open for further replies.

nikky

Programmer
Feb 7, 2002
80
US
I want to copy a production database on my sql2000 server and add it to the server under a new name, so I can use it for testing.

If I create a .BAK file, how do I add the backup in as a new database with a different name using Enterprise Manager ?
 
you could create a new database with a different name and restore the old one on to it. make sure you choose force restore over existing database and change the log and datafile locations from the original database to the new database names/locations.

You can also use tsql to do it. look under RESTORE, RESTORE (described) in bol. tells you all about it with examples. good stuff to know.
 
After backing up the database, you may also right click on 'Databases'and then select 'All tasks' and then restore database. Make sure to enter the name that you want the database to be known as and then select your location where the backup is located. This will then make your database with the name that you want.

And don't forget the login account either.

Administratorx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top