>>>>Hi,
>>>>
>>>>Is it possible to find out when a SP was last updated (at design time)?
>>>>
>>>>I have a case where I was working on the same SP but in a couple of Databases. I want to find where which one is the latest update.
>>>>
>>>>TIA
>>>
>>>SELECT *
>>>FROM sys.objects
>>>WHERE type = 'P'
>>>ORDER BY modify_date DESC
>>>
>>
>>Thank you!
>>
>>Does type = 'P' mean "stored procedure"?
>>And, will the above script show ALL stored procedures in all the databases?
>
>Yes, 'P' means Procedure and yes all of them will be shown.
>If you want you can filter desired SP in WHERE clause.
One more question, please.
If I add a WHERE into the SQL Select you suggested, using the NAME, it does not return all stored procedures.
Here is my verion:
SELECT *
FROM sys.objects
WHERE type = 'P' and name = 'my_stored_procedure'
ORDER BY modify_date DESC
I have checked that I use the name which is the same in more than one DB. What am I doing wrong?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham