Follow this steps :
-
Run your SSMS
-
Right click on the
database
you want to copy -
In the Popup menu , go to
Taches
, then clickOffline
-
Right click on the
Database
again in the popup menu ,Taches
->Detach
-
Open the folder
..\MSSQL\DATA
, copyYourdb.MDF
andYourDB_log.LDF
files to the folder of the newInstance
. -
Now you can
Attach
bothDatabases
and work on it in both instance.
Another way:
-
Run Your SSMS
-
Right click on the
Database
you want to copy -
In the popup menu ,
Taches
->Copy the database...
-
Follow the steps on the
Wizard
You can select option if you want to keep the database ONLINE when it is being copied.
You can also select option of MOVE or COPY database as well.
When the process is over it will show the success message and database will be copied to another server.
Note:
1- The Copy Database Wizard is not available in the Express edition.
2- The Copy Database Wizard cannot be used to copy or move databases that are/have:
-
System.
-
marked for replication.
-
marked Inaccessible, Loading, Offline, Recovering, Suspect, or in Emergency Mode.
-
data or log files stored in Microsoft Azure storage.
Also , a database cannot be moved or copied to an earlier version of SQL Server.
Updtae:
If there is no Copy database option
, then you can Copy Databases with Backup and Restore.
For more information about it MSDN.
5
solved Copy database to a new server