ORACLE/TroubleShooting
ORA-38029 : object statistics are locked
[PineTree]
2015. 5. 12. 16:49
반응형
출처 :
http://db.necoaki.net/m/post/155
원인: object statistics are locked. It turns out that in 10gR2, when you import (imp or impdp) table without data i.e. structure only, oracle will lock the table statistics.
lock 확인
SQL> select table_name, stattype_locked from dba_tab_statistics where owner = '계정' and stattype_locked is not null;
SQL> exec DBMS_STATS.UNLOCK_TABLE_STATS('owner','table name');
테이블이 너무 많은 경우
SQL> set head off
SQL> set feedback off
SQL> set pages 100
SQL> set line 200
SQL> spool unlock_tb.sql
SQL> select 'exec DBMS_STATS.UNLOCK_TABLE_STATS ('''|| owner ||''','''|| table_name ||''');' from dba_tab_statistics where owner = '계정' and stattype_locked is not null;
SQL> spool off
해서 생성 되는 스크립트를 돌려준다.
http://db.necoaki.net/m/post/155
원인: object statistics are locked. It turns out that in 10gR2, when you import (imp or impdp) table without data i.e. structure only, oracle will lock the table statistics.
lock 확인
SQL> select table_name, stattype_locked from dba_tab_statistics where owner = '계정' and stattype_locked is not null;
SQL> exec DBMS_STATS.UNLOCK_TABLE_STATS('owner','table name');
테이블이 너무 많은 경우
SQL> set head off
SQL> set feedback off
SQL> set pages 100
SQL> set line 200
SQL> spool unlock_tb.sql
SQL> select 'exec DBMS_STATS.UNLOCK_TABLE_STATS ('''|| owner ||''','''|| table_name ||''');' from dba_tab_statistics where owner = '계정' and stattype_locked is not null;
SQL> spool off
해서 생성 되는 스크립트를 돌려준다.
반응형