The steps to query the latest compilation time of a stored procedure in Oracle: Use the query statement: SELECT max(timestamp) AS "Last compilation time". Get data from the dba_objects table. Filter object_type = 'PROCEDURE' to get only stored procedures. Use object_name = 'stored procedure name' to filter out specific stored procedures.
How to query the latest compile time record of Oracle stored procedures
Query statement:
<code class="sql">SELECT max(timestamp) AS "最近编译时间" FROM dba_objects WHERE object_type = 'PROCEDURE' AND object_name = '存储过程名称';</code>
Example:
<code class="sql">SELECT max(timestamp) AS "最近编译时间" FROM dba_objects WHERE object_type = 'PROCEDURE' AND object_name = 'GET_EMPLOYEE_DETAILS';</code>
Execution result:
Latest compilation time |
---|
2023-03-08 14:32:15 |
##Explanation:
The table stores information about Oracle database objects, including stored procedures.
The function returns the maximum value of the
timestamp column in the table, which represents the most recent compilation time of the stored procedure.
The filter ensures that the query only returns stored procedures.
Filter narrows the query scope to a specific stored procedure.
The above is the detailed content of How to query the latest compilation time record of a stored procedure in Oracle. For more information, please follow other related articles on the PHP Chinese website!