Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Documenting of SQL 2005 DB Expand / Collapse
Author
Message
Posted Friday, January 14, 2011 3:39 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, June 26, 2014 2:21 AM
Points: 68, Visits: 279
Hi,

I'm trying to extract the code of standard procedures, table-valued functions and the like in a 2005 SQL DB. Apart from copying-pasting the code into a TXT file, is there a simpler and quicker way to do that, for instance to check that at home?

I'd be happy with a method either: 1) For the whole database 2) For a type or set of procedures.

Thanks in advance
Post #1047805
Posted Monday, January 17, 2011 9:46 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, July 26, 2014 8:10 PM
Points: 2,826, Visits: 8,463
"right click" Database -> Tasks -> Generate Scripts

Assuming you're on a current service pack, you can choose to export into 1 big file, or into individual files per object.

You also get a screen where you can choose to include indexes, contraints etc...



Post #1048835
Posted Monday, January 17, 2011 10:39 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:28 AM
Points: 5,573, Visits: 24,808
For Objects of type P, RF, V, TR, FN, IF, TF, and R try this:

SELECT * FROM sys.sql_modules



Which gives you all you want to know. You will most likely want to examine the columns available in sql_modules and limit the amount of information returned.

And save the output to a file for later examination. I have found it useful to save it finally as a word doc and then I can use the search features of word to find in a table/column or whatever is returned in more than one SP ...

Good luck.


If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #1048855
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse