oracle LogMiner¼ò½é
ÔÎĵØÖ·£ºhttp://www.phontol.com/20090719_525808_1.html
1 LogMiner µÄÓÃ;
¡¡¡¡Oracle LogMiner ÊÇ Oracle¹«Ë¾´Ó²úÆ· 8iÒÔºóÌṩµÄÒ»¸öʵ¼Ê·Ç³£ÓÐÓõķÖÎö¹¤¾ß£¬Ê¹Óøù¤¾ß¿ÉÒÔÇáËÉ»ñµÃ OracleÖØ×÷ÈÕÖ¾Îļþ£¨¹éµµÈÕÖ¾Îļþ£©ÖеľßÌåÄÚÈÝ£¬ÌرðÊÇ£¬¸Ã ¹¤¾ß¿ÉÒÔ·ÖÎö³öËùÓжÔÓÚÊý¾Ý¿â²Ù×÷µÄ DML£¨insert¡¢update¡¢delete µÈ£©Óï¾ä£¬9iºó¿ÉÒÔ·ÖÎö DDLÓï¾ä£¬ÁíÍ⻹¿É·ÖÎöµÃµ½Ò»Ð©±ØÒªµÄ»Ø¹ö SQLÓï¾ä¡£ÆäÖÐÒ»¸ö×îÖØÒªµÄÓÃ;¾ÍÊDz» ÓÃÈ«²¿»Ö¸´Êý¾Ý¿â¾Í¿ÉÒÔ»Ö¸´Êý¾Ý¿âµÄij¸ö±ä»¯¡£¸Ã¹¤¾ßÌرðÊÊÓÃÓÚµ÷ÊÔ¡¢Éó¼Æ»òÕß»ØÍËij ¸öÌض¨µÄÊÂÎñ¡£
¡¡¡¡LogMiner ¹¤¾ß¼´¿ÉÒÔÓÃÀ´·ÖÎöÔÚÏߣ¬Ò²¿ÉÒÔÓÃÀ´·ÖÎöÀëÏßÈÕÖ¾Îļþ£¬¼´¿ÉÒÔ·ÖÎö±¾Éí ×Ô¼ºÊý¾Ý¿âµÄÖØ×÷ÈÕÖ¾Îļþ£¬Ò²¿ÉÒÔÓÃÀ´·ÖÎöÆäËûÊý¾Ý¿âµÄÖØ×÷ÈÕÖ¾Îļþ¡£ ×ܵÄ˵À´£¬LogMiner¹¤¾ßµÄÖ÷ÒªÓÃ;ÓУº
¡¡¡¡1£® ¸ú×ÙÊý¾Ý¿âµÄ±ä»¯£º¿ÉÒÔÀëÏߵĸú×ÙÊý¾Ý¿âµÄ±ä»¯£¬¶ø²»»áÓ°ÏìÔÚÏßϵͳµÄÐÔÄÜ¡£
¡¡¡¡2£® »ØÍËÊý¾Ý¿âµÄ±ä»¯£º»ØÍËÌض¨µÄ±ä»¯Êý¾Ý£¬¼õÉÙ point-in-time recovery µÄÖ´ÐС£
¡¡¡¡3£® ÓÅ»¯ºÍÀ©Èݼƻ®£º¿Éͨ¹ý·ÖÎöÈÕÖ¾ÎļþÖеÄÊý¾ÝÒÔ·ÖÎöÊý¾ÝÔö³¤Ä£Ê½¡£
¡¡¡¡4.¡¡¡¡È·¶¨Êý¾Ý¿âµÄÂß¼Ëð»µÊ±¼ä£º×¼È·¶¨Î»²Ù×÷Ö´ÐеÄʱ¼äºÍ SCN¡¡ ==>»ùÓÚʱ¼äºÍ
SCNµÄ»Ö¸´
¡¡¡¡5.¡¡¡¡È·¶¨ÊÂÎñ¼¶ÒªÖ´Ðеľ«Ï¸Âß¼»Ö¸´²Ù×÷¡¡¡¡¡¡¡¡¡¡//È¡µÃÏàÓ¦µÄ UNDO²Ù×÷
¡¡¡¡6.¡¡¡¡Ö´ÐкóÐøÉó¼Æ¡¡¡¡¡¡¡¡ //DML¡¡ DDL¡¡ DCL¡¡ Ö´ÐÐʱ¼ä¡¢Óû§
¡¡¡¡×¢ÒâÊÂÏ
¡¡¡¡1.¡¡¡¡LogMiner ¿ÉÒÔ°ïÄãÈ·¶¨ÔÚij¶Îʱ¼äËù·¢µÄ¸÷ÖÖ DML£¬DDL²Ù×÷µÄ¾ßÌåʱ¼äºÍ SCN
¡¡¡¡ºÅ£¬ËüËùÒÀ¾ÝµÄÊǹ鵵ÈÕÖ¾Îļþ¼°Áª»úÈÕÖ¾Îļþ¡£
¡¡¡¡2.¡¡¡¡ËüÖ»ÄÜÔÚ Oracle8i¼°ÒÔºóµÄ°æ±¾ÖÐʹÓ㬲»¹ýËü¿ÉÒÔ·ÖÎö Oracle8µÄÈÕÖ¾¡£
¡¡¡¡3.¡¡¡¡Oracle8i Ö»ÄÜÓÃÓÚ·ÖÎö DML²Ù×÷£¬µ½ Oracle9iÔò¿ÉÒÔ·ÖÎö DDL²Ù×÷ÁË¡£
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
Ä¿Ç°£¬ÕýÔò±í´ïʽÒѾÔںܶàÈí¼þÖеõ½¹ã·ºµÄÓ¦Ó㬰üÀ¨*nix£¨Linux, UnixµÈ£©£¬HPµÈ²Ù×÷ϵͳ£¬PHP£¬C#£¬JavaµÈ¿ª·¢»·¾³¡£
Oracle 10gÕýÔò±í´ïʽÌá¸ßÁËSQLÁé»îÐÔ¡£ÓÐЧµÄ½â¾öÁËÊý¾ÝÓÐЧÐÔ£¬ Öظ´´ÊµÄ±æÈÏ, Î޹صĿհ׼ì²â£¬»òÕß·Ö½â¶à¸öÕýÔò×é³É
µÄ×Ö·û´®µÈÎÊÌâ¡£
Oracle 10gÖ§³ÖÕýÔò±í´ïʽµÄËĸöк¯Êý ......
1.²é¿´±í¿Õ¼ä:
SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE,
(B.BYTES*100)/A.BYTES "% USED",(C.BYTES*100)/A.BYTES "% FREE"
from SYS.SM$TS_AVAIL A,SYS.SM$TS_USED B,SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.T ......
Ò»¸öÓû§¿ÉÒÔʹÓÃÒ»¸ö»ò¶à¸ö±í¿Õ¼ä£¬Ò»¸ö±í¿Õ¼äÒ²¿ÉÒÔ¹©¶à¸öÓû§Ê¹Óá£Óû§ºÍ±í¿Õ¼äûÓÐÁ¥Êô¹Øϵ£¬±í¿ÕÊÇÒ»¸öÓÃÀ´¹ÜÀíÊý¾Ý´æ´¢Âß¼¸ÅÄ±í¿Õ¼äÖ»ÊǺÍÊý¾ÝÎļþ·¢Éú¹Øϵ£¬Êý¾ÝÎļþÊÇÎïÀíµÄ£¬Ò»¸ö±í¿Õ¼ä¿ÉÒÔ°üº¬¶à¸öÊý¾ÝÎļþ£¬¶øÒ»¸öÊý¾ÝÎļþÖ»ÄÜÁ¥ÊôÒ»¸ö±í¿Õ¼ä¡£
Óû§ÊôÓÚÊý¾Ý¿âʵÀýµ ......
¸Ðл¶ÁÕß¿´¡¶Oracle´óÐÍÊý¾Ý¿âϵͳÔÚAIXUNIXÉϵÄʵսÏê½â¡·Õâ±¾Ê飬ÕâÀï»Ø´ðһЩ¶ÁÕßÓʼþÌá³öµÄÒ»¸ö½ÏΪ¹«¹²µÄÎÊÌ⣺ASMÓÐʲôÓã¿ÎªÊ²Ã´Óã¿ ASMÊÇOracle´Ó10g¿ªÊ¼ÌṩµÄÒ»ÖÖ´æ´¢¹ÜÀí¼¼Êõ£¬Ö¸µÄÊÇÒ»¸öÔÚÎïÀí¾í£¨»òÕß´ÅÅÌ·ÖÇø£©ÉÏÌرðΪOracleÊý¾ÝÎļþ¶ø´´½¨µÄ¡°×¨Óá±Îļþϵͳ¡£¸ÃÎļþϵͳÓÉOracleÄÚºËά ......