Trying to see edit dates for stored procedures changes

  • Hi All,

    I'm trying to get some type of edit date in my query:

    select

      'Name'    = o.name,

      'Owner'    = user_name(uid),

      'Type'    = substring(v.name,5,31),

      'Created_datetime' = o.crdate

     from sysobjects o, master.dbo.spt_values v

     where o.xtype  = substring(v.name,1,2) and v.type = 'O9T' AND substring(v.name,5,31) = 'stored procedure' AND

     o.name LIKE 'sp%'

     ORDER BY name DESC

    The purpose of this is I have over 200 stored procedures and if I do a sort on date I can simply see which procedures have changed.  The enterprise manage only displays created date.  I'm kind of stuck because I have create dates from 2001.  Any suggestions would be great.

     

    Thanks,

    Joe Contreras

  • I am afraid there is not. If you want to keep a history you will need to buy a package that takes care of change control in sql. e.g embarcadero, etc

    Perhaps the easiest way is to drop the procedure and recreate it. This resets the crdate column of sysobjects table, which you can then use to track changes.

    What we'd give for hindsight.


    ------------------------------
    The Users are always right - when I'm not wrong!

Viewing 2 posts - 1 through 2 (of 2 total)

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