记一次oracle视图查询失效的情况,ERROR at line 1: ORA-04045: errors during recompilation/revalidation of NC633.BB_API_BUDGET_EXEINFO ORA-16000: database open for read-only access
背景:oracle主库和dg库,在dg库上只读。发现查询有报错。
2、查询失效的视图数量;
SQL> SELECT COUNT(1) FROM DBA_OBJECTS WHERE STATUS='INVALID';