Procedure to duplicate a database in MSSMS[1]Edit

1. Make a backup of the source databaseEdit

Click on the database to copy and choose “Backup” under tasks.

Imagesql1.png

2. Use copy only or use a full backupEdit

Choose “copy-only” backup. Imagesql2.png

3. Use “Restore” to create a new databaseEdit

Don’t create a database manually. Use the “restore” option.

Imagesql3.png

4. Choose the copy-only backup and choose a new nameEdit

In this dialog you can name the “copy” database and choose the copy-only backup from the source database. Click "Options" on the left hand side.

Uncheck "Take tail-log backup before restoring"[2]

Tick the check box - "Close existing connections to destination database".

Imagesql4.png

Imagesql5.png

Now click ok and you are done.

Simple connectivity test[3]Edit

Create a new file anywhere - a text file on your desktop.

Imagect1.png

Now rename that file and change it's file extension to TestDatabase.udl (take note of the file extension).

Imagect2.png

Select "Yes" when asked if you want to change the file extension.

Imagect3.png

This will give you a Data Link Editor that allows you to test the connection.

ReferencesEdit