.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> DataBase >> Post New Resource Bookmark and Share   

 Subscribe to Articles

How to create script for the Database objects in SQL server 2008

Posted By:shankey       Posted Date: February 02, 2011    Points: 75    Category: DataBase    URL: http://www.dotnetspark.com  

Step by step procedure to create Script of database objects in SQL server 2008
 

How to create script for the Database objects in SQL server 2008

Step 1

Select the database and right click on the database as shown below

Step 2

Select "Generate Scripts." from the sub menu of "Tasks" context menu that appears when you clicked on database name

Step 3

Select Database for which you want to generate the script. Here I selected TempDB1 and click next.

Step 4

Chose appropriate script options which ultimately depend on your need. Some options which are toggled from false to true by me are marked with arrow. Click next when you are done with your options settings.

Step 5

Select the objects of the database for which you want to generate the script like tables, stored procedures etc. Currently I have only tables in my database so wizard is showing only "Table" as database object . Select your database object and click next.

Step 6

Select table for which you want to generate the script you can select all of them by single click of select all or by individual selection by checking the checkbox. After selecting your tables click next.

Step 7

Choose your output option. You can generate output in clipboard, in new query window of SQL server management studio or in a file stored at your specified location. After selecting appropriate option click next.

Step 8

You can review your selection at the script wizard summary page. After reviewing your selection summary click finish

Output

Bingo......! the script is generated...
 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend