1. 查看无效对象

XEZF@xezf(qs-xezf-db1)> select object_name,object_type,status from all_objects where status='INVALID' and owner='XEZF';

OBJECT_NAME OBJECT_TYPE STATUS

------------------------------------------------- -------

PROC_OB_TO_XEZF PROCEDURE INVALID

PROC_JOB_OB_WRITE PROCEDURE INVALID

以上是2个不能编译的过程，我们查看使用这2个过程的session：

2. 查看正在访问无效对象的session：

这里我们使用 v$access 视图：

V$ACCESS displaysinformation about locks that are currently imposed on library cache objects.The locks are imposed to ensure that they are not aged out of the library cachewhile they are required for SQL execution.