January 16, 2012 at 12:16 am
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.
January 16, 2012 at 12:28 am
you can only find modified date.. for history of changes you can use source control or ddl trigger.
January 16, 2012 at 2:41 am
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.
January 16, 2012 at 2:48 am
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
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply