Altering stored procedures

Do you ever edit a stored procedure in Enterprise manager, then forget which stored procedure it was? Or have you ever just wanted to know what stored procedures have been editted so you can fill out that change form? There is a solution to this...don't edit the stored procedures in Enterprise manager (use Query Analyzer) and don't use ALTER (use CREATE). But what about the permissions and a drop statement at the top? That can be configured to be added to the script if you use the Object browser (F8 hides and shows this), right click and use the short cut menu to Script Object to New Window As -> Create.

To configure the drop and permissions:
Tools menu -> Options -> Script tab
Make sure the following are checked under the Script Formatting Options area:

  • Include descriptive headers in script
  • Generate Transact-SQL to remove referenced component. Script tests for existence before attempting to remove component
  • Script object-level permissions

If you use this process to make your changes to stored procedures, you will be able to check the Create Date in Enterprise Manager next time you want to know what was changed

posted on Monday, March 15, 2004 8:02 AM

Feedback

# Take Outs for 15 March 2004

You have been Taken Out! Thanks for the post.
3/15/2004 3:29 PM | Enjoy Every Sandwich

Post Comment

Title  
Name  
Url
Comment   
Please enter the following code into the box below to stop spammers

  
Enter Code Here *