Generate Script with data in SQL Server 2008


In this article, I am going to explain about How to Generate Script with data in SQL Server 2008 Database tables using Generate SQL Server Script Wizard. Generate Script is new concept of SQL Server 2008. It is useful for generate script with data in database tables.

Introduction
In SQL SERVER 2008, you have new Option Generate Scripts, Generate Scripts is a Powerful tool used to script data into SQL Server Database tables. We can Export and Import table data from one database to another one database using script data.

Generate Scripts is a New feature In SQL SERVER 2008.

Definition of Generate Scripts :
Generate Scripts is used to script data into SQL Server Database tables. We can Export and Import table data from one database to another one database using script data.

Follow the below steps to use Generate Scripts in SQL Server:

First Log in to SQL Server and follow

1. In Object Explorer, Expand your database.

2. Right Click the Data base which you want to use Generate script

If your data base is "Pubs", Right Click the Pubs Database.

Generate Script with data in SQL Server 2008 steps1











3. you can find "Tasks" Menu and and open sub menu , Now you can see Generate script in Sub Menu.
Generate Script with data in SQL Server 2008 steps2












4. Click the Generate script sub menu item from the list.
Generate Script with data in SQL Server 2008 steps3











5. Generate SQL Server Script Wizards will open, click Next.

Generate Script with data in SQL Server 2008 steps4












6 .Select Database to Script , Here you want to select your database.Then Click Next
Generate Script with data in SQL Server 2008 steps5











7 .In Choose Script Options, You want to Set Script Data option to True. Then Click Next.
Generate Script with data in SQL Server 2008 steps6












8. Choose Object Types, Here i am choosing Tables. Then Click ok
Generate Script with data in SQL Server 2008 steps7












9. Choose Tables, Here i am select two table
Generate Script with data in SQL Server 2008 steps8













10. you want choose out put option, I choose Script to New query window
Generate Script with data in SQL Server 2008 steps9













11 Script Wizard Summary , This is Final step before proceeding to the script generation.
Generate Script with data in SQL Server 2008 steps10















12. Generate Script Progress.
Generate Script with data in SQL Server 2008 steps11










13. Data Script on the Query Window
Generate Script with data in SQL Server 2008 steps12











Now You can Create Script Data using Generate SQL Server Script Wizard.
You can use this Script data any SQL Server Database and Export and Import table from one data source to another.

If you find a bug and have a fix for it: please let me know and I'll be happy to update the code I am hosting here.

Any suggestions will be appreciated greatly. Thanks for reading My Article.

Thanks
S.Suresh


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: