Documentation Header For Your Scripts
- 7
- Add a Comment
- No Related Post
Hello there!
I thought today I would share with you the documentation header that I use for my T-SQL scripts. The header has evolved from the days of just the name of the script, the author and the date. Through my years of experience I have made the header more descriptive and always looking to improve it. The header has saved me lots of time from searching through my T-SQL code to see if a particular stored procedure is called, user defined function, etc. Here is the documentation header I use:
/*
**********************************************************************
**
** Object Name: < Object Name>
** Object Type: < Stored Procedure, User Defined Function, etc. >
** File Name: < Name of the file.. normally followed by .sql >
** Database Name: < The name of the database the object will reside in >
** Author: < Name of the person who wrote the T-SQL script >
** Creation Date: < Date the T-SQL script was created with ANSI date >
** Description: < Detailed description of what the script does >
** Special Note: < Any special remarks about the script >
** Modified Tables: < List tables that the data is modified by this script >
** Called Procedures < List procedures that this script calls >
** Called Jobs: < List SQL Agent jobs that this script calls >
** Called UDFs: < List user defined functions that this script calls >
** Calling Procedures: < List procedures that call this script >
** Calling Jobs: < List SQL Agent jobs that call this script >
** Calling UDFs: < List User Defined Functions that call this script >
** Return Statuses: < List return status that this script returns >
**
**********************************************************************
*/
If you would like to suggest adding something more to the document header please comment!

7 Comments
darren stanger
February 29th, 2008
at 2:51pm
Your documentation header is very helpful. I added some things and turned it into a template for use with SSMS’ feature to fill in template parameters:
/*
**********************************************************************
**
** Object Name:
** Object Type:
** File Name:
** Database Name:
** Server:
** Author:
** Sponsor:
** Creation Date:
** Description:
** Special Note:
** Modified Tables:
** Called Procedures:
** Called Jobs:
** Called UDFs:
** Calling Procedures:
** Calling Jobs:
** Calling UDFs:
** Return Statuses:
** PRIVACY NOTES:
**
**********************************************************************
*/
Thanks again.
Darren Stanger
propecia
June 5th, 2009
at 3:45pm
Very interesting site, Hope it will always be alive!
znak
August 17th, 2009
at 7:58am
Thanks for post
corimex
August 22nd, 2009
at 8:07am
Hope it will always be alive
viagr
August 24th, 2009
at 6:14pm
Thanks so much!
futura
September 3rd, 2009
at 7:36pm
BIG Thanks
ka-fu
September 9th, 2009
at 8:24am
Thanks