SQL SERVER – CREATE/GENERATE INSERT SCRIPTS FROM SQL SERVER MANAGEMENT STUDIO (SSMS)

It has been a long time that I have not written any articles in my blog. I was busy with my marriage on June 8th and also from conjunctivitis. I will be uploading some good snaps in the blog after once I received the photos.

Today my friends umesh and syam came and ask me how to generate insert scripts from the SQL Server. I explained them with a simple example. I think this will help you too.

Steps:

1        Right click the database and choose Tasks -> Generate Scripts.

2        SQL Server Script wizard will open up and click next.

3        A new option for selecting the database will open and Select the database and click next.

4        Under table and view options, change script data to true. In General options change scripts create to False.

5        Click next and select objects tables or views, here tables and click next.

6        Select Particular tables/views; here Bill Details and click next.

7        Click next to create the script to New Query window and click finish.

8        You can see Insert scripts on the SSMS Query area.

The Following image will help you more,

 

 

Hope everyone likes this article.

print

8 thoughts on “SQL SERVER – CREATE/GENERATE INSERT SCRIPTS FROM SQL SERVER MANAGEMENT STUDIO (SSMS)

  1. Author’s gravatar

    Congratulations friend.. Happy marriage Life.

    Regards,
    Fazal

  2. Author’s gravatar

    Thanks Fazal…

  3. Author’s gravatar

    Hai Varun,
    First I Wish u a very happy married life and bright future.
    Varun,I just try to generate script by following your guide lines.But I can’t find ‘Script Data Option’ in Table/View options.I am using SQL Server 2005 DB.Could you pls help me to solve it.

  4. Author’s gravatar

    Hi Preethy,

    Yes, you are right you can’t find Generate Scripts option in Table/View Option, You can find option in Database.
    Try to follow step 1 as per information given by Varun.

    Thanks & Regards,
    Fazal Vahora

    1. Author’s gravatar

      Hi Fazal,
      I can’t find the Script Data option specified in 4 th step.
      4 Under table and view options, change script data to true. In General options change scripts create to False.

      Thanks,
      Preethy Kamath

      Reply
  5. Author’s gravatar

    Hello Preethy

    You can take script data with using Microsoft SQL Server Database Publishing Wizard 1.1 for SQL Server 2005. It is installed in C:\Program Files\Microsoft SQL Server\90\Tools\Publishing. use SqlPubWiz wizard to create data scripts. you can download Microsoft SQL Server Database Publishing Wizard 1.1 from following link http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5498

    Thanks & Regards,
    Fazal Vahora

  6. Author’s gravatar

    Thank You Varun & Fazal

  7. Author’s gravatar

    this feature is only available for upper version and what if you want data with where clause.

    here i made a store procudure for that .

    http://sql-server-script.blogspot.in/

Leave a Reply

Your email address will not be published. Required fields are marked *


× 4 = eight