Copy Or Generate SQL Database Content To Multiple One

Introduction

In this article you will learn how to copy or generate SQL database content to multiple one.

Step 1: I have two database "Test1" & "Test2". Test2 database is empty, so we want to copy Test1 database to Test2 based on your requirement like MS SQL Server 2008, 2012, etc.

Test1

Step 2: Generate the "Test1" database script based on the following steps:

  • Right click "Test1" database.
  • Click Tasks, then Generate Scripts.

Generate Scripts

Step 3:
Click Next..

Click Next

Step 4:
Select "Select specific database objects" and check all the tables present in the database.

Select specific database objects

Step 5: Click "Advanced", Open New Pop Up Window, General, Script for Server Version, click SQL Server2008 R2 ( Select based on your requirement ).

Advanced

Step 6: Click "Advanced", Open New Pop Up Window, General, Types of data to script, then select Schema and data ( Select based on your requirement ).

Select script option

Step 7: Select the save location for generated script.

File name

Step 8: Click Next

Smmery

Step 9: Click Finish

Save or publish Script

Step 10: Change database name and update the generated scripts.

Change database

Step 11: Now copy "Test1" into "Test2".

Query

Tech Blog Reference.

Summary

We learned how to copy or generate SQL database content to multiple one. I hope this article will be useful for beginners.


Similar Articles