Problem
You need to find when a PL/SQL procedure in an Oracle Database was updated.
Solution
The following SQL query returns information about a FIND_USER procedure, defined in the current user’s schema. The information returned includes procedure name, date procedure was created and date procedure was updated.
SELECT o.object_name AS object_name,
o.created AS date_created,
o.last_ddl_time AS date_updated
FROM user_objects o
WHERE o.object_type = 'PROCEDURE'
AND o.object_name ='FIND_USER';
The following SQL query retrieves similar information for any PL/SQL procedure in any Oracle Database schema you have granted access to.
SELECT o.object_name AS object_name,
o.owner AS object_schema,
o.created AS date_created,
o.last_ddl_time AS date_updated
FROM all_objects o
WHERE o.object_type = 'PROCEDURE'
AND o.object_name ='FIND_USER';
Database Administrator can query information about procedures, defined in any schema.
SELECT o.object_name AS object_name,
o.owner AS object_schema,
o.created AS date_created,
o.last_ddl_time AS date_updated
FROM dba_objects o
WHERE o.object_type = 'PROCEDURE'
AND o.object_name ='FIND_USER';
发表评论