February 3, 2012 at 2:25 am
We have 60 stored procedures without headers. now we need to include below details in all sp. Is there any workaround to include below details in all sp to avoid manual work.
Object :
Description :
Author :
Revision :
Usage :
Created :
Modified
February 3, 2012 at 5:53 am
You could script out all the procedures and use a text editor to replace "ALTER PROCEDURE" with your header + "ALTER PROCEDURE" in all the files.
-- Gianluca Sartori
February 3, 2012 at 1:51 pm
gugan_ta (2/3/2012)
We have 60 stored procedures without headers. now we need to include below details in all sp. Is there any workaround to include below details in all sp to avoid manual work.Object :
Description :
Author :
Revision :
Usage :
Created :
Modified
Well... since most of that data will be particular for each storedproc I think that the sensible solution is to add the header manually to each procedure.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.February 3, 2012 at 2:52 pm
And 60 isn't that many... I was involved in doing it for closer to 600.
It's a good practice and requires you to review older stored procs. Another good practice.
February 5, 2012 at 1:50 pm
gugan_ta (2/3/2012)
We have 60 stored procedures without headers. now we need to include below details in all sp. Is there any workaround to include below details in all sp to avoid manual work.Object :
Description :
Author :
Revision :
Usage :
Created :
Modified
About the only three things that don't require human knowledge in all of that are the Object, Created, and Modified lines. I agree with what has already been said... it's really not worth trying to automate this and would likely take more time than just copying and pasting a header and manually filling in the blanks.
The exception would be if someone was fairly diligent with extended properties. Considering that no one was thoughtful enough to add a header, it's unlikely they thought about embedded documentation in the extended properties so that probably won't work.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply