「Oracle」指定したユーザーの無効なオブジェクトを取得する

環境
Oracle Database 12c Standard Edition Release 12.2.0.1.0 – 64bit Production

構文

SELECT OBJECT_NAME,OBJECT_TYPE,STATUS 
FROM DBA_OBJECTS 
WHERE STATUS = 'INVALID' 
AND OWNER = 'ユーザー' 
ORDER BY OBJECT_NAME;

使用例

SELECT
 OBJECT_NAME,OBJECT_ID,OBJECT_TYPE,STATUS,CREATED
FROM
  DBA_OBJECTS 
WHERE
  STATUS = 'INVALID' 
  AND OWNER='ARKUSER'
ORDER BY
  OBJECT_NAME;

実行結果

OBJECT_NAME	OBJECT_ID	OBJECT_TYPE	STATUS	 CREATED
PRINT_DATE	115000	        PROCEDURE	INVALID	 2022/01/18 9:46:12
TESTPROC	114999	        PROCEDURE	INVALID	 2022/01/18 9:40:46

 

Oracle

Posted by arkgame