Scripting ALL table schema info with Sql Server 2005 Management Studio - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

News

Please goy buy 3-4 copies of my book on MonoTouch titled "Professional iPhone Programming with MonoTouch for .NET/C# Developers." They make great gifts all year round. Plus, I get about $.20 when you buy a copy.

Technical Sites

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? iPhone, Android, MonoTouch, MonoDroid, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, Atlas, Microsoft AJAX Library, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

Scripting ALL table schema info with Sql Server 2005 Management Studio

Many times, I have right clicked on a table in Sql Server 2005 Management Studio and been able to get the table definition.  That's all well and good, but what if you want more information, such as triggers, indexes, or multiple tables?  I've been using the lather-rinse-repeat method of right-clicking on each object, scripting the object, copying to my file, and moving onto the next object.  There had to be a better way.  Thanks to some help from Erland Sommarskog I have what I need.  Ok, here's the steps:

  1. Right click on a database and select Tasks.

  2. Select the option to "Generate Scripts".
  3. A wizard pops up. 
  4. Select the database.

  5. Make sure that you generate scripts for indexes, triggers, and anything else that is important to you.
  6. Select the object types that you want to script.  Typically, I just script the tables, but practically anything can be scripted.

  7. Select the objects that you want to script.
  8. From there, you can finish it up.

Comments

No Comments
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems