Using DB2, can I check when a stored procedure was modified?
I see that some versions of MSSQL allow you to run a query to retrieve information about stored procedures. I also saw the same type of query for Oracle. Is there anything similar for DB2?
Specifically, I am hoping to be able to see when a stored procedure was created and/or last modified.
This should be what you are looking for:
select routinename, create_time, alter_time from syscat.routines where routinetype='P'
Yes, You can check in DB2 when stored procedure is modified. Please find below Query for the same. Don't confuse for CREATE_TIME this means last modified time.
Code as below:
SELECT PROCNAME, CREATE_TIME FROM SYSCAT.procedures WHERE PROCNAME = '<>' order by CREATE_TIME desc
Note: Replace <> with your actual stored procedure name.