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.
3. you can find "Tasks" Menu and and open sub menu , Now you can see Generate script in Sub Menu.
4. Click the Generate script sub menu item from the list.
5. Generate SQL Server Script Wizards will open, click Next.
6 .Select Database to Script , Here you want to select your database.Then Click Next
7 .In Choose Script Options, You want to Set Script Data option to True. Then Click Next.
8. Choose Object Types, Here i am choosing Tables. Then Click ok
9. Choose Tables, Here i am select two table
10. you want choose out put option, I choose Script to New query window
11 Script Wizard Summary , This is Final step before proceeding to the script generation.
12. Generate Script Progress.
13. Data Script on the Query Window
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.