1. Right click on the database you want to duplicate and choose Tasks->"Back Up..."
2. Save the back up to a .bak file
2. As the source, select "File" and point to the .bak file you created earlier.
3. Change the name of the database to restore to.
Option 2 – using Database Copy Wizard
Database -> my_database -> Tasks -> Copy ->
Source server MY_SERVER->
Destination Server MY_SERVER->
Select option Detach + Attach (source database must be offline, faster) or "SQL Management Option" (source database can be online, slower) ->
Select database Name to copy ->
Give new Database Name -> my_database_new
Give new Database File path D:\DB
Give new Database Log path D:\Logs ->
A new package is created under server_name/DTS Packages/Copy Database Wizard Packages CDW_MY_SERVER_dba_util_copy ->
Run Immediately ->
Click Finish to perform the following actions:
Destination: MY_SERVER Other SQL Server Version, Microsoft SQL Server Standard Edition (64-bit) , Build 3223, Microsoft Windows NT 6.3 (14393) NT x64
Using SMO online transfer
The following databases will be moved or copied:
Copy:dba_util
Destination file will be created: D:\DB\dba_util_test.mdf
Destination file will be created: D:\Logs\dba_util_test_log.ldf
Stop transfer if duplicate database name exists at destination
Package scheduled to run immediately
No comments:
Post a Comment