How SQL Server 2008 Copy database:
Method One: Use the Copy Database Wizard in Microsoft SQL Server Management Studio to assist with completion. (very easy to fail)
Method Two: Adopt the way of Backup/restore (recommended)
A. Backing up a database to disk
BACKUP DATABASE source_database to DISK = ' D:\Backup\Source_Database.bak ' with FORMAT;
B. Viewing a logical file for a backup file
RESTORE filelistonlyfrom DISK = ' D:\Backup\Source_Database.bak ';
C. Creating a Target database
CREATE DATABASE target_database;
D. Copying a database from disk
/* Recover database with BAK, Force restore (REPLACE) STATS = 10 Each completion 10% shows a record source_database and Source_database_log are above D:\Backup\Source_ Database.bak logical file */restore DATABASE target_databasefrom disk= ' D:\Backup\Source_Database.bak ' with MOVE ' Source_ Database ' to ' C:\Program Files\Microsoft SQL Server\mssql10_50.mssqlserver\mssql\data\target_database.mdf ', MOVE ' Source_database_log ' to ' C:\Program Files\Microsoft SQL Server\mssql10_50.mssqlserver\mssql\data\target_database_ Log.ldf ', STATS = 10,replace
How SQL Server 2008 Copy Database