ORA-38029: object statistics are locked
Oracle의미
테이블(또는 스키마)의 옵티마이저 통계가 잠겨 있어 통계 수집/삭제가 거부되었다. 잠긴 통계는 DBMS_STATS로 다시 계산되지 않도록 보호된다.
원인
이전에 DBMS_STATS.LOCK_TABLE_STATS 또는 LOCK_SCHEMA_STATS가 호출되었거나(예: 통계를 고정하기 위해), Data Pump import(특히 CONTENT=METADATA_ONLY)가 의도치 않게 통계를 잠긴 상태로 남겼다. 잠긴 상태에서 GATHER_TABLE_STATS를 실행하면 이 오류가 발생한다.
해결 방법
통계 잠금 해제: EXEC DBMS_STATS.UNLOCK_TABLE_STATS('APP_SCHEMA','MY_TABLE'); 또는 스키마 수준에서 DBMS_STATS.UNLOCK_SCHEMA_STATS('APP_SCHEMA'); 잠금을 해제하지 않고 수집하려면 FORCE=>TRUE를 사용한다: EXEC DBMS_STATS.GATHER_TABLE_STATS('APP_SCHEMA','MY_TABLE', force=>TRUE); 잠금 상태 확인: SELECT table_name, stattype_locked FROM dba_tab_statistics WHERE stattype_locked IS NOT NULL;
같은 데이터베이스의 다른 항목
- ORA-00376file N cannot be read at this time
- ORA-12520TNS:listener could not find available handler for requested type of server (리스너가 요청한 서버 유형의 핸들러를 찾지 못함)
- ORA-28001the password has expired
- ORA-00845MEMORY_TARGET not supported on this system (이 시스템에서 MEMORY_TARGET 미지원)
- ORA-27102out of memory
- ORA-04030out of process memory when trying to allocate N bytes (N바이트 할당 중 프로세스 메모리 부족)
- ORA-12537TNS:connection closed