Given a date Find the Stored Procedures Updated

  • Hello all:

    Is it possible to find all the user stored procedures that have been updated after a certain date.

    I have made a changes to atleast 15 sp in the last 3 days. I did not keep a track of it. I would like to find the sp that I have modified.

    Thanks

    Rajesh

  • hi, try

    declare @date datetime

    select @date = "Sep 5 2003"

    select name, crdate

    from sysobjects

    where type = "P"

    and crdate > @date

    order by crdate

    in the database in question

    HTH

    Paul

  • Unless you recreate it, You wouldn't be able to see it.

  • "Unless you recreate it, You wouldn't be able to see it. "

    that's true. I always drop and re-create stored procedures for this very reason.

    Paul

  • one note. If you just alter a sp then the schema_ver number is incremented in the sysobjects table. If you knew the schema_ver number for all object prior to making changes, then you could use this column to find which ones changed. I've written a routine that daily checks the schema_ver numbers, and reports on what objects have changed.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • The alter statement will not update a date, but it will update the base_schema_ver. You'd have to know the previous versions, but this goes up by 16 with each ALTER.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply