Generating Scripts in Sql Server 2008 R2

In this article i would like to share how to generate script file in sql server 2008 r2. Hope it will help mostly to freshers.
In order to see the full and clear image click on the respected images.

Step 1: Right click on the database from which you want to generate the script. You’ll find the screen as below.
GS1
Step 2: After selecting generate scripts, Generate script wizard will open.Click on Next Button.
GS2
Step 3: By default the radio button checked for select all database objects. If you want to generate the script only for some specific table then select below radio button and check the respected check box.
GS3
Step 4: By default the script generate only schema’s of the objects. If we need data along with schema we need to click advance button select the dropdown with option schema and data only as shown in below figure.
GS4
GS5
Step 5: Give appropriate file name and click on next button and here we are ready with script file.
GS6
Step 6: Go to the folder where you saved the script file double click on it. It will directly open on SSMS just press F5 to execute the script. SIMPLE!
GS7

Thank You!

3 comments

  1. Dinesh Haraveer · · Reply

    Nice buddy

  2. kishore · · Reply

    hi dude …
    Tell what is use of scripts???

    1. scripts are used to execute and move your data faster from one database to other database.

Leave a reply to Dinesh Haraveer Cancel reply