Clicky

is there any system view that hold the last modified date of an object

asked 12/16/2011 04:06

25112's gravatar image

25112 ♦♦


7 Answers:
example: when was this proc changed last.. (the developers have not notated it down)
link

answered

25112's gravatar image

25112

select * from sys.all_objects

join this with objects to get the name and other info
link

answered 2011-12-16 at 12:06:49

HainKurt's gravatar image

HainKurt

oops, you get alll info from above view :)
link

answered 2011-12-16 at 12:21:38

HainKurt's gravatar image

HainKurt

This will tell you when it was last created:

SELECT NAME, crdate FROM sysobjects WHERE xtype = 'P';

This could well tell you the modified date since it is common practice to code SP amendments as drop and create just in case the SP doesn't exist on the target database.

It would be bad practice to purely rely on this however. There should be a history in the comment block of the SP itself and the SP should be stored in some kind of version control system.

link

answered 2011-12-16 at 12:22:23

rd707's gravatar image

rd707

so SQL Server itself does not track last modified date.. if programmer did not track it, then there is no way to find out?
link

answered 2011-12-16 at 12:31:09

25112's gravatar image

25112

i am sorry.. i just ran HainKurt's query.. it has it! thanks..
link

answered 2011-12-16 at 12:37:49

25112's gravatar image

25112

Depends on the version you're running - I think there is a modified date in 2005 and beyond but I've found it to be very unreliable (probably for the reason I outlined above).

link

answered 2011-12-16 at 12:40:07

rd707's gravatar image

rd707

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

Asked: 12/16/2011 04:06

Seen: 258 times

Last updated: 12/16/2011 04:44