Solved

Reverse engineer and denerate DDLs from SQL Server 2008  objects

Posted on 2010-11-19
3
638 Views
Last Modified: 2012-05-10
Are there any stored procedures or system views in SQL server 2008  that provide a way for you to generate DDL for SQL Server objects? sp_help or manually generating DDL from right clicking the tables is not just helping.  
0
Comment
Question by:almask-mn
3 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 500 total points
ID: 34176138
Yeah, so that is one of the main pains for me...that SSMS doesn't provide OBJECT_DEFINITION functionality for tables.  

I wrote an article on how you can script this out...hope it helps.

http://blogs.techrepublic.com.com/datacenter/?p=431
0
 
LVL 2

Expert Comment

by:vasureddym
ID: 34188342
i have written a SP that loops through all the objects and fire the sp_help_text and give all the DDLs at the end. please let me know if that helps.
0
 

Author Closing Comment

by:almask-mn
ID: 34201545
Thanks for your help.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question