OCPÈÏÖ¤¿¼ÊÔÖ¸ÄÏ£¨20£©£º»Ö¸´OracleÊý¾Ý¿â
1¡¢»Ö¸´½á¹¹Óë½ø³Ì
ÔÚ½éÖÊʧ°Üºó£¬¸ù¾ÝÊÜËðÎļþµÄÀàÐÍ£¬´æÔÚ²»Í¬µÄ»Ö¸´·½·¨¡£Êý¾Ý¿âÓÉ¿ØÖÆÎļþ¡¢Áª»úÖØ×öÈÕÖ¾ÎļþÒÔ¼°Êý¾ÝÎļþ×é³É¡£Èç¹û¸´ÓÃÁË¿ØÖÆÎļþ»òÁª»úÖØ×öÈÕÖ¾Îļþ£¬ÄÇô»Ö¸´ÊÜËðµÄÕâЩÎļþÊ®·ÖÈÝÒס£
¶ÔÓÚÊÜËðµÄ¿ØÖÆÎļþ£¬¿ÉÒÔ½«ÆäÌ滻Ϊij¸ö¸´Óø±±¾£¬Ò²¿ÉÒÔʹÓÃCREATE CONTROLFILEÃüÁîÖؽ¨¡£
ÊÜËðµÄÁª»úÖØ×öÈÕÖ¾Îļþ¿ÉÒÔ±»ÖØÐÂÉú³É¡£OracleÌṩÁËÒ»¸öALTER DATABASE CLEAR LOGFILE GROUP #£¨#´ú±íÊÜËð³ÉÔ±µÄÈÕÖ¾Îļþ×éºÅ£©ÃüÁʹÓÃÕâ¸öÃüÁî¿ÉÒÔɾ³ýÓëÖؽ¨Ä³¸öÈÕÖ¾Îļþ×éµÄ³ÉÔ±¡£Èç¹ûÊý¾Ý¿âÔÚarchivelogģʽÖÐÔËÐУ¬ÄÇôÈÕÖ¾Îļþ×é±ØÐëÔÚOracleÔÊÐíÖ´ÐÐÇå³ýÈÕÖ¾ÎļþÃüÁî֮ǰÒѱ»¹éµµ¡£ÉÏÊöÃüÁîµÄÒ»Öֱ仯ÊÇALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP #£¬Ö´ÐÐÕâ¸öÃüÁî¿ÉÒÔɾ³ýºÍÖؽ¨Ò»¸ö¼´Ê±Òѱ»³É¹¦¹éµµµÄÈÕÖ¾Îļþ£¬µ«Ö´ÐÐÖ®ºó±ØÐë¶ÔÕû¸öÊý¾Ý¿â½øÐб¸·Ý¡£
»Ö¸´ÊÜËðÊý¾ÝÎļþÐèҪʹÓñ¸·ÝÓë¹éµµÈÕÖ¾¡£ÔÚµ¼ÖÂij¸öÊý¾ÝÎļþÊÜËðµÄ½éÖÊʧ°ÜÖ®ºó£¬´æÔÚÏÂÁÐÁ½ÖÖ»Ö¸´Ñ¡ÏÍêÈ«»Ö¸´£¬²»»á¶ªÊ§ÈκÎÊý¾Ý£»²»ÍêÈ«»Ö¸´£¬Í¨¹ýÔÚÍê³É֮ǰֹͣ»Ö¸´½ø³ÌÀ´¹ÊÒⶪʧһЩÊý¾Ý¡£²»ÍêÈ«»Ö¸´ÊÇÒ»¸ö¸ß¼¶¹ý³Ì£»ÍêÈ«»Ö¸´ÊÇÒ»¸öÁ½½×¶Î¹ý³Ì£ºÊ×ÏÈ£¬±ØÐë´Ó±¸·ÝÖл¹ÔÊÜËðÎļþ£»Ö®ºó£¬±ØÐëʹÓù鵵ÈÕÖ¾ÎļþÖеÄÐÅÏ¢½«Êý¾Ý¿âÌáÇ°ÖÁ±»»¹ÔµÄÎļþÓëÊý¾Ý¿âÆäÓಿ·Öͬ²½µÄʱ¿Ì£¬´Ó¶ø»Ö¸´Õâ¸öÎļþ¡£
ÔÚOracle»·¾³ÖУ¬“»¹Ô”Òâζ×ÅʹÓñ¸·ÝÌæ»»ÊÜËðµÄ»ò¶ªÊ§µÄÎļþ£¬“»Ö¸´”Òâζ×Åͨ¹ýʹÓù鵵ÈÕÖ¾À´Í¬²½ÊÜËðÎļþÓëÊý¾Ý¿âµÄÊ£Óಿ·Ö¡£
ÒòΪRMAN´Ó²»±¸·ÝÁª»úÖØ×öÈÕÖ¾£¬ËùÒÔRMANÎÞ·¨ÓÃÓÚ»Ö¸´ÊÜËðµÄÁª»úÈÕÖ¾Îļþ¡£RMANÄܹ»»¹ÔÓë»Ö¸´¿ØÖÆÎļþºÍÊý¾ÝÎļþ¡£
ΪÁË´ò¿ªÊý¾Ý¿â£¬ËùÓпØÖÆÎļþ¸±±¾¡¢Ã¿¸öÁª»úÈÕÖ¾Îļþ×éµÄÖÁÉÙÒ»¸ö³ÉÔ±ÒÔ¼°ËùÓÐÁª»úÊý¾ÝÎļþ¶¼±ØÐë´æÔÚÇÒͬ²½¡£Èç¹ûSMON½ø³ÌÔÚÆô¶¯Æڼ䷢ÏÖÇé¿ö²¢·ÇÈç´Ë£¬ÄÇôÆô¶¯¾Í²»»áÍê³É¡£Èç¹ûij¸ö¿ØÖÆÎļþ¸±±¾ÊÜËð»ò¶ªÊ§£¬ÄÇôÆô¶¯»áÍ£Ö¹ÔÚNOMOUNTģʽÖУ¬¸æ¾¯ÈÕÖ¾ÖлáдÏÂÊÜËð¿ØÖÆÎļþ¸±±¾µÄÏêϸÐÅÏ¢¡£¼ÙÈç¿ØÖÆÎļþûÓÐÈκÎÎÊÌ⣬SMON½ø³Ì»á½«¼ÌÐø´ò¿ªÊý¾Ý¿â¡£
Èç¹ûÒ»¸ö»ò¶à¸öÊý¾ÝÎļþÊÇͨ¹ý±¸·Ý»¹ÔµÄ£¬ÄÇôÕâЩÎļþ¼¸ºõ¿Ï¶¨ÒѹýÆڽϳ¤Ê±¼ä£¬Áª»úÖØ×öÈÕÖ¾Ò²ÎÞ·¨·µ»ØÖÁ»Ö¸´ÉÏÊöÎļþµÄʱ¼ä¡£´Ëʱ£¬ÎÒÃDZØÐëʹÓù鵵ÈÕÖ¾ÎļþÀ´½øÐлָ´£¬ÕâÊÇÒ»¸ö±ØÐëÊÖ¶¯Æô¶¯µÄ¹ý³Ì¡£
Èç¹ûÔÚÊý¾Ý¿â´ò¿ªÊ±³öÏÖ½éÖÊË𻵣¬Äǽá¹ûÈ¡¾öÓÚÊÜÓ°ÏìµÄÎļþ¡£ÈκοØÖÆÎļþ¸±±¾ÊÜË𶼻ᵼÖÂʵÀýÁ¢¼´ÖÕÖ¹¡£×÷ΪSYSTEM±í¿Õ¼ä»ò»î¶¯
Ïà¹ØÎĵµ£º
1¡¢±à³ÌÓïÑÔÓëOracleÊý¾Ý¿â
1.1¡¢´æ´¢µÄÓëÄäÃûµÄPL/SQL³ÌÐò¿é
Óë´æ´¢µÄPL/SQL³ÌÐò¿éÏà±È£¬ÄäÃûµÄPL/SQL³ÌÐò¿éЧÂʽϵͣ¬´ËÍâÓÉÓÚ¿ÉÄÜÔÚ¶ą̀»úÆ÷Öй«²¼Ô´´úÂ룬»¹»áÒý·¢¹ÜÀíÎÊÌâ¡£
1.2¡¢PL/SQL¶ÔÏó
PL/SQL¶ÔÏó¾ßÓÐÏÂÁÐ5ÖÖÀàÐÍ£º
¹ý³Ì
º¯Êý
³ÌÐò°ü
³ÌÐò°üÖ÷Ìå
´¥·¢Æ÷
2¡¢¹ý³Ì¡¢º¯ÊýÒÔ¼°³ÌÐò°ü
2.1¡¢¹ý³ÌÓëº¯Ê ......
Ö¸±êÃû³Æ Ö¸±êÃèÊö Ö¸±ê·¶Î§ Ö¸±êµ¥Î»
1£®¹ØÓÚʵÀýЧÂÊ£¨Instance Efficiency Percentages£©µÄÐÔÄÜÖ¸±ê
»º³åÇøδµÈ´ýÂÊ
(Buffer Nowait %) Ö¸ÔÚ»º³åÇøÖлñÈ¡BufferµÄδµÈ´ý±ÈÂÊ¡£ ¸ÃÖ¸±êµÄÖµÓ¦½Ó½ü100%£¬Èç¹û¸ÃÖµ½ÏµÍ£¬Ôò¿ÉÄÜÒªÔö´óbuffer cache¡£ %
Redo»º³åÇøδµÈ´ýÂÊ
(Redo NoWait %) Ö¸ÔÚRedo»º³åÇø»ñÈ¡BufferµÄ ......
Ö¸±êÃû³Æ
Ö¸±êÃèÊö
Ö¸±ê·¶Î§
Ö¸±êµ¥Î»
1£®¹ØÓÚʵÀýЧÂÊ£¨Instance Efficiency Percentages£©µÄÐÔÄÜÖ¸±ê
»º³åÇøδµÈ´ýÂÊ
(Buffer Nowait %)
Ö¸ÔÚ»º³åÇøÖлñÈ¡BufferµÄδµÈ´ý±ÈÂÊ¡£
¸ÃÖ¸±êµÄÖµÓ¦½Ó½ü100%£¬Èç¹û¸ÃÖµ½ÏµÍ£¬Ôò¿ÉÄÜÒªÔö´óbuffer cache¡£
%
Redo»º³åÇøδµÈ´ý ......
ÏëÔÚLinuxϵͳ°ÑOralce°²×°ºÃ£¬È·ÊµÊǸö²»Ð¡µÄÌôÕ½£¬×îÆðÂëµÄ£¬Ê×ÏÈÒª¶ÔLinuxϵͳÓÐËùÁ˽⣬²»Ëµ¶àµÄ£¬¼òµ¥µÄһЩÅäÖÃÎļþºÍ³£ÓÃÃüÁî×ÜÒªÖªµÀ£¬Òª²»Õæ²»ÖªµÀÈçºÎÏÂÊÖ¡£½ñÌì°´Êé±¾µÄÆôʾ£¬ºÍÍøÉϱðÈËдµÄÎÄÕ»¹ÓÐOralce¹Ù·½µÄ°ïÖú¸Ð¾õ¶¼¶ÔÎÒ°ïÖúÉõ΢°¡¡£¡£¡£²»¹ý¸Ð¾õ×îºó»¹ÊÇÔÚQQȺºÍ°Ù¶ÈµÄ°ïÖúÏ£¬µ±È»Êé±¾ºÍÄÇЩÎÄÕ¶¼Æðµ½ ......