목차

잡다한 내용들

  1. 생성시간
    SQL> SELECT * FROM dba_objects WHERE object_type = 'INDEX' AND owner='BEFLYDBA' ORDER BY created DESC
  2. INDEX 컬럼
    SQL> SELECT * FROM user_ind_columns WHERE index_name LIKE 'DR%';
  3. 패치 및 버젼상태확인 (9i 이상)
SQL> SELECT comp_name, version, STATUS FROM dba_registry;
 
COMP_NAME                      VERSION         STATUS
------------------------------ --------------- ----------------------
Oracle Enterprise Manager      10.2.0.1.0      VALID
Spatial                        10.2.0.1.0      VALID
Oracle interMedia              10.2.0.1.0      LOADING
OLAP Catalog                   10.2.0.3.0      VALID
Oracle XML DATABASE            10.2.0.3.0      VALID
Oracle Text                    10.2.0.3.0      VALID
Oracle Expression FILTER       10.2.0.1.0      VALID
Oracle Rules Manager           10.2.0.1.0      VALID
Oracle Workspace Manager       10.2.0.1.0      VALID
Oracle DATA Mining             10.2.0.3.0      VALID
Oracle DATABASE Catalog Views  10.2.0.3.0      VALID
Oracle DATABASE Packages AND T 10.2.0.3.0      VALID
ypes
JServer JAVA Virtual Machine   10.2.0.3.0      VALID
Oracle XDK                     10.2.0.3.0      VALID
Oracle DATABASE Java Packages  10.2.0.3.0      VALID
OLAP Analytic Workspace        10.2.0.3.0      VALID
Oracle OLAP API                10.2.0.3.0      VALID
 
17 ROWS selected.

Log miner

Log miner 사용법(DBMS_LOGMNR 패키지 사용)

SQL> SELECT supplemental_log_data_min FROM v$database;
 
SUPPLEME
--------
NO
  1. dbms_logmnr 패키지를 사용하여 Redo file 혹은 Archive log file를 등록한다
    SQL> EXEC dbms_logmnr.add_logfile('/archlog/CSDDB1_arch_1_11567_671062380.arc')
     
    PL/SQL PROCEDURE successfully completed.
  2. dbms_logmnr 패키지를 사용하여 등록한 파일을 분석한다
    SQL> EXEC dbms_logmnr.start_logmnr(options => dbms_logmnr.dict_from_online_catalog)
     
    PL/SQL PROCEDURE successfully completed.
  3. 분석된 내용을 V$LOGMNR_CONTENTS 뷰를 조회하여 원하는 정보를 뽑아낸다
    SQL> SELECT COUNT(*) FROM v$logmnr_contents;
     
      COUNT(*)
    ----------
        151383
     
    SQL> SELECT sql_undo, sql_redo FROM v$logmnr_contents
    WHERE username='TEST'
    AND seg_name='ADRESS'
    AND operation ='DELETE';
  4. 원하는 정보를 얻었다면 dbms_logmnr 패키지를 이용하여 log_mnr을 종료시킨다 (이때 V$LOGMNR_CONTENTS 의 정보도 사라진다)
    SQL> EXEC dbms_logmnr.end_logmnr;
     
    PL/SQL PROCEDURE successfully completed.
SQL> SELECT COUNT(*) FROM v$logmnr_contents;
SELECT COUNT(*) FROM v$logmnr_contents
*
ERROR at line 1:
ORA-01306: dbms_logmnr.start_logmnr() must be invoked BEFORE selecting FROM
v$logmnr_contents