简体   繁体   中英

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.

Thank you!

这应该是你正在寻找的:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM