Is it possible to get a list of stored procs from a SQL Server database where created/last updated date > yesterday?
sys.sql_modules
does not seem to have a date. It must be stored somewhere else.
This will list all of the stored procedures along with their creation and modified dates:
SELECT name, modify_date
FROM sys.objects
WHERE type = 'P'
AND modify_date >= DATEADD(Day, -1, CONVERT(Date, GETDATE()))
ORDER BY modify_date DESC;
EDIT: Since modify_date
will always be equal to or after create_date
... Also note that you could just use sys.procedures
as another answer mentioned.
sys.procedures
contains create_date
and modify_date
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With