SELECT x.ksppinm "Parameter", Y.ksppstvl "Session Value", Z.ksppstvl "Instance Value" FROM x$ksppi X, x$ksppcv Y, x$ksppsv Z WHERE x.indx = Y.indx AND x.indx = z.indx AND x.ksppinm LIKE '/_%' escape '/' order by x.ksppinm;
운영 상태에서 인덱스를 생성, 변경시 online 옵션은 매우 유용하지만 가끔 의도치 않는 상황을 만들기도 한다.
의도치 않거나 혹은 의도해서 해당 프로세스를 kill 했을때 uncommit 된 트랜잭션이 정리가 되지 않는 상태로 오래 지속될수가 있다.
08104, 00000, "this index object %s is being online built or rebuilt" // *Cause: the index is being created or rebuild or waited for recovering // from the online (re)build // *Action: wait the online index build or recovery to complete
CREATE TABLE TEST_TAB(A INT, B VARCHAR2(10)); insert into TEST_TAB select dbms_random.value(1,1000000), 'A' from dual connect by level < 1000000;
CREATE INDEX IDX_TEST ON TEST_TAB(A)online; => cancel
DROP INDEX IDX_TEST;
=> ORA-08104
08104, 00000, "this index object %s is being online built or rebuilt" // *Cause: the index is being created or rebuild or waited for recovering // from the online (re)build // *Action: wait the online index build or recovery to complete
-- INIT_CLEANUP ( PURGE JOB 생성 위해 필요) BEGIN DBMS_AUDIT_MGMT.INIT_CLEANUP( AUDIT_TRAIL_TYPE => dbms_audit_mgmt.AUDIT_TRAIL_OS, default_cleanup_interval => 24*7); -- 1주일에 1번 실행 END;
-- 주기적으로 삭제하는 JOB 생성 BEGIN DBMS_AUDIT_MGMT.CREATE_PURGE_JOB ( AUDIT_TRAIL_TYPE => DBMS_AUDIT_MGMT.AUDIT_TRAIL_OS, AUDIT_TRAIL_PURGE_INTERVAL => 24*7, AUDIT_TRAIL_PURGE_NAME => 'STANDARD_OS_AUDIT_TRAIL_PURGE', USE_LAST_ARCH_TIMESTAMP => FALSE ); END;
-- 등록된 PURGE JOB 은 DBA_AUDIT_MGMT_CLEANUP_JOBS 뷰에서 확인가능
SELECT * FROM DBA_AUDIT_MGMT_CLEANUP_JOBS;
-- DBA_SCHEDULER_JOBS 에서도 확인 가능 SELECT * FROM DBA_SCHEDULER_JOBS WHERE OWNER='AUDSYS';
-- 기타 AUDIT UTIL 관련 뷰 select * from DBA_AUDIT_MGMT_LAST_ARCH_TS; select * from DBA_AUDIT_MGMT_CLEAN_EVENTS;
-- 등록된 PURGE JOB 삭제하기
BEGIN DBMS_AUDIT_MGMT.DROP_PURGE_JOB('STANDARD_OS_AUDIT_TRAIL_PURGE'); END;
-- INIT CLEANUP 삭제하기
BEGIN DBMS_AUDIT_MGMT.DEINIT_CLEANUP( AUDIT_TRAIL_TYPE => DBMS_AUDIT_MGMT.AUDIT_TRAIL_OS); END;
-- 1회성 AUDIT 삭제
BEGIN DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL( AUDIT_TRAIL_TYPE => DBMS_AUDIT_MGMT.AUDIT_TRAIL_OS, use_last_arch_timestamp => FALSE); END;