Link to home
Start Free TrialLog in
Avatar of brgdotnet
brgdotnetFlag for United States of America

asked on

Looking for way to determine last update or change date on a stored procedure

In query analyzer is their anyway to determine when the time/date that a stored procedure was last modified? It would be nice if there were some type of log that would list all of the stored procedure in a particular database, and their last update date.
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Does the ALTER PROCEDURE not just modify an existing procedure? It certainly doesn't delete it and recreate it as a new object. In that case, then modified date works.

Imagine the chaos in replicated environments if one couldn't just modify the existing object. You'd have to keep redoing the snapshots for merely fixing a big in a stored proc. Renaming objects is a different story though. There I think you drop  and recreate, behind the scenes.
IF folks use ALTER then that's fine

however some don't preferring to delete then recreate (i.e. there is nothing to stop either approach being used)

I am just being cautious about the relevance of the dates, that is all.
You had claimed that in MOST CASES the modify date will be irrelevant because people TYPICALLY  drop and recreate. I think it's safe to assume that the question's author is keenly aware of their environment and how they work, and for them, they are interested in modify_date.

I'll go out on a limb and say that in MOST replicated environments people ALTER as opposed to dropping then recreating (not that the author suggests replication, but it's an interesting focus group).
sorry, it depends on the conventions adopted by individuals/organizations, I definitely overstated it

I repeat though, I m only being cautious
Avatar of brgdotnet

ASKER

Thank you.