Documentation Header For Your Scripts
Saturday, December 1st, 2007Hello 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!
