Following are the steps to generate the scripts in SQL server.
Step 1
Right Click the database -- > Select Tasks -->Generate Scripts as shown below.
Step 2
Click Next button
Step 3
You can choose any database from the following wizard and to generate scripts for all database objects choose the option "Script all objects in the selected database".
Step 4
Here is the customization wizard to generate the scripts based on our requirement.
You can generate the data by changing the script data option as shown below.
Step 5
Here you can choose the objects which you want to generate scripts by choosing the below option.
Step 6
I have selected only the tables for demo purpose and in the following wizard i have selected two tables as shown below.
Step 7
The following wizard is the output option for script file.
You can save the scripts to new file or in a new query window as shown below.
Step 8
Finally the following wizard is the summary wizard to view the selected options.
Step 9
After clicking finish button you can see the script has been generated in the new query window as shown below.
No comments:
Post a Comment