Solved

copy a database

Posted on 2011-03-25
7
221 Views
Last Modified: 2012-05-11
How do I copy a SQL server database?  This is SQL server 2000.
0
Comment
Question by:HLRosenberger
7 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 35215165
You can either:
1. Backup and restore or
2. Detach, copy data files and attach.
0
 
LVL 7

Expert Comment

by:lundnak
ID: 35215185
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.
   http://support.microsoft.com/kb/246133
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.
0
 
LVL 7

Expert Comment

by:lundnak
ID: 35215194
Here is a MS article describing the attach/detach method.
http://support.microsoft.com/kb/224071
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 1

Author Comment

by:HLRosenberger
ID: 35215313
No I want to make a copy of the 2000 database within the same server, with a different name of course.
0
 
LVL 5

Accepted Solution

by:
bitref earned 250 total points
ID: 35215387
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
0
 
LVL 7

Assisted Solution

by:lundnak
lundnak earned 250 total points
ID: 35215490
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.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 35216266
Thanks
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question