copy a database

How do I copy a SQL server database?  This is SQL server 2000.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

bitrefConnect With a Mentor Commented:
The best way is to Backup the database at source then restore at distination.
The backup restore is the best because:
It saves storage space
Can be performed while database is online and running
Anthony PerkinsCommented:
You can either:
1. Backup and restore or
2. Detach, copy data files and attach.
You want to copy the database from SQL 2000 to SQL 2008?

There are several methods.
Detach the database
Copy the database files to the SQL 2008 server.
Re-Attach the database.
Setup the logins on the SQL 2008 Server.
Change Compatibility mode to SQL 2008 for the database and Page Verify option to "CheckSum"

Another method is to backup the SQL 2000 database.
Restore the backup file to the SQL 2008 server
Complete the last three steps described above.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Here is a MS article describing the attach/detach method.
HLRosenbergerAuthor Commented:
No I want to make a copy of the 2000 database within the same server, with a different name of course.
lundnakConnect With a Mentor Commented:
Either method will work.

If you use Attach/Detach then you will need to detach the source database..
Copy the files to new file names.
Reattach the source database
Attach the copied files with a new database name.

If you use Backup/Restore, you will restore the database with a new name.  SSMS restore wizard will walk you through it.  Select the backup file and then change database name.
HLRosenbergerAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.