Creating Scripts To Insert Data From Existing Tables

When we work with systems is inevitable to work with data that is manipulated by these, and there are moments when you need to move data created by one application to another database, but it's not necessary to copy all the database to another one, maybe you require just to move all data for particular tables.

For this task, SQL Server can help us by using the "Generate Scripts..." option that it's into Management Studio tool, you only have to right-click over the source database and go to "Tasks" menu and here locate the option said before.
 
Click on generate scripts for the database
 
You will see the introduction, just click "Next".

Next step in the wizard

As I said at the beginning in this opportunity we are going to select a group of tables and not all the database.

Select the objects to generate the scripts

Specify the media where this result is going to be published. But, in this case it is necessary to click on "Advanced" option to personalized the operation.

Select the script settings

As we want just the data, select "Data only" in the "Types of data to script".

Select the type of data to create the script

Review the summary of the operation to be executed.

Review all the settings before creating the scripts

Wait for the process to finish successfully.

Wait for the scripts to be generated

Once the process finishes with success the output file can be use directly over the new database that have the tables with no data.


Comments

  1. Hello There. I found your blog using msn. This is a very well written article.
    I will make sure to bookmark it and return to read more of your
    useful info. Thanks for the post. I'll certainly return.


    Review my web-site - Free Minecraft Premium Account

    ReplyDelete

Post a Comment

Popular posts from this blog

I Need to Send an Automatic Email with Lotus Notes

Turn Horizontal Visio Swimlanes into Vertical Ones

Install TWRP Recovery in Xiaomi Redmi 6A