views:

135

answers:

2

I'm looking for a way to properly comment my stored procedure code so that I can extract the information into useful documentation ala something like XDOC (or C# equivalent). Something that's preferably lightweight would be ideal.

A: 

If you're already using Sandcastle to generate documentation based on the XML comments that Visual Studio generates, you might want to check out the following CodeProject project:

SQL XML Documentation

It shows you how you can use the tools you're already using to generate documentation for your SQL objects in the same style as the documentation you're already generating for the rest of your code.

Justin Niessner
A: 

Why not use extended properties which can be queried in a simple SQL statement?

SELECT * FROM sys.extended_properties

No need for any plug-ins, add-ons, or have a specific stored proc layout...

This is what we use for every object in our databases (and we also use Red Gate SQL Doc too to give some structure and a nice web site)

gbn
Because I want to see the comments for the procedure in the procedure itself the same way I see comments with code in my C# programs.
Orion Adrian
And have the ability to extract it separately too?
gbn