Last modification dates of SP's in SQL 2008 R2

  • Hi Frds,

    I got an requirement like to find the last three modification dates of store procedure :crazy: in SSMS 2008 R2....The problem is we dont have history in the SP's

    I know quary to find last modified date with in the date range..

    select * from sys.objects where type = 'P'

    AND DATEDIFF(D,modify_date, GETDATE()) < 20

    Any help will be appreciated

    Tks In adv 🙂

    _______________________________________________________________

    Need help? Help us help you.

  • you can only find modified date.. for history of changes you can use source control or ddl trigger.

  • Tkq for ur quick rply @padhis .... Can u plz alobrate the Use of source control in brief 🙂

    Is their any other way by doing ths in quary to get the previous version's of the SP's!!!

    _______________________________________________________________

    Need help? Help us help you.

  • SQl doesn't keep previous versions anywhere, so unless you have some form of source control or you have backups of the databases at the times those versions existed, you won't be able to get prior versions back.

    Source control in brief - a place you store and deploy code changes from (stored procedures as well as front end code) so that there's a consistent place to find things and a history of changes.

    http://en.wikipedia.org/wiki/Source_control

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

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