1. LogMiner ¶õ?
LogMiner¶õ
¸®µÎ·Î±× ÆÄÀÏÀÇ ³»¿ëÀ» SQL¹®ÀåÀ¸·Î ¹ø¿ªÇÏ´Â ÇÁ·Î½ÃÁ®.
2. LogMiner
»ç¿ë¹æ¹ý
1)
·Î±×¸¶À̳ʴ SQL¹®ÀåÀÇ ºÐ¼®À» À§ÇØ µñ¼Å³Ê¸® ÆÄÀÏÀ» »ý¼ºÇØÁÖ¾î¾ß ÇÑ´Ù.
-
initSID.ora ÆÄÀÏ ¼öÁ¤
###########################################
#
LogMiner
###########################################
utl_file_dir=/home/ora920/admin/asean3/log/
-
DBMS_LOGMNR ÆÐÅ°Áö¸¦ »ý¼ºÇϱâ À§ÇØ ¿À¶óŬ¿¡¼ Á¦°øµÇ´Â ½ºÅ©¸³À» ½ÇÇàÇÑ´Ù.
SQL>
@/home/ora920/product/rdbms/admin/dbmslm.sql
Package
created.
Grant
succeeded.
-
ÇÁ·Î½ÃÀú¸¦ »ý¼ºÇÏ´Â ½ºÅ©¸³À» ½ÇÇàÇÑ´Ù.
SQL>
@/home/ora920/product/rdbms/admin/dbmslmd.sql
Procedure
created.
No
errors.
Grant
succeeded.
PL/SQL
procedure successfully completed.
Package
created.
-
µñ¼Å³Ê¸® ÆÄÀÏÀ» »ý¼ºÇϱâ À§ÇÑ ÇÁ·Î½ÃÀú ½ÇÇà
SQL>
EXECUTE DBMS_LOGMNR_D.BUILD('v920dict.ora','/home/ora920/admin/asean3/log/');
PL/SQL
procedure successfully completed.
2)
·Î±×¸¶ÀÌ³Ê ¼¼¼ÇÀ» ¼³Á¤ÇÏ´Â ´Ü°è : ÀÌ ´Ü°è´Â ¸®µÎ·Î±×ÆÄÀÏÀ» ºÐ¼®ÇÏ´Â ¼³Á¤ ´Ü°è¶ó
ÇÒ ¼ö ÀÖ´Ù.
-
V$LOGMNR_CONTENTS ºä¸¦ ¼³Á¤Çϱâ À§ÇØ ¸®µÎ·Î±× ÆÄÀÏÀ» ¸í½ÃÇØÁØ´Ù.
SQL>
EXECUTE DBMS_LOGMNR.ADD_LOGFILE('/home/ora920/oradata/asean3/redo01.log',
DBMS_LOGMNR.NEW);
--> ù¹ø° ·Î±×ÆÄÀÏ
PL/SQL
procedure successfully completed.
SQL>
EXECUTE DBMS_LOGMNR.ADD_LOGFILE('/home/ora920/oradata/asean3/redo02.log', DBMS_LOGMNR.ADDFILE);
--> ±âŸ ·Î±×ÆÄÀÏ
PL/SQL
procedure successfully completed.
SQL>
EXECUTE DBMS_LOGMNR.ADD_LOGFILE('/home/ora920/oradata/asean3/redo03.log', DBMS_LOGMNR.ADDFILE);
--> ±âŸ ·Î±×ÆÄÀÏ
PL/SQL
procedure successfully completed.
3)
·Î±×¸¶À̳ʸ¦ ½ÃÀÛÇÏ´Â ´Ü°è : ºÐ¼®ÀÌ ½ÃÀ۵Ǵ ´Ü°è
SQL>
EXECUTE DBMS_LOGMNR.START_LOGMNR(DICTFILENAME=> '/home/ora920/admin/asean3/log/v920dict.ora');
PL/SQL
procedure successfully completed.
[Option]
-
StartScn : SCNÀÇ ½ÃÀÛ(SCN:System Change NumberÀÇ ¾à¾î·Î, ƯÁ¤½ÃÁ¡¿¡¼ÀÇ µ¥ÀÌŸº£À̽ºÀÇ
»óÅÂ)
-
EndScn : SCNÀÇ ³¡
-
StartTime / EndTime : ±»ÀÌ ¼³¸íÀÌ ÇÊ¿ä¾øÀ» µí....
4)
¸®µÎ·Î±×ÆÄÀÏÀÇ ³»¿ëÀ» SQL¹®ÀåÀ¸·Î º¸±â À§ÇØ V$LOGMNR_CONTENTS ºä Á¶È¸
SQL>
SELECT DISTINCT SQL_REDO, SESSION# FROM V$LOGMNR_CONTENTS
WHERE
LOG_ID=912;
SQL_REDO
SESSION#
------------------------------------------------------------------------
update
"SYS"."SEQ$" set "INCREMENT$" = '1', "MINVALUE"
= '1', 19
"MAXVALUE"
= '9999999999', "CYCLE#" = '0', "ORDER$" = '0',
"CACHE"
= '0', "HIGHWATER" = '2238907', ...
[Çʵ弳¸í]
-
LOG_ID : log sequence number
-
SEG_NAME : table name
5)
·Î±×¸¶ÀÌ³Ê ¼¼¼ÇÀ» ²÷´Â ´Ü°è
SQL>
EXECUTE DBMS_LOGMNR.END_LOGMNR;
* iWiz´Ô¿¡ ÀÇÇؼ °Ô½Ã¹° À̵¿µÇ¾ú½À´Ï´Ù (2010-02-03 17:06)
|