Oracle redo undo commit rollbackÆÊÎö
¸Õ²ÅÔÚ¹äÒ»¸öÍøÓѵIJ©¿ÍµÄʱºò·¢ÏÖÁËһƪ¹ØÓÚREDO¡¢UNDO¡¢COMMIT¡¢ROLLBAKCµÄÎÄÕ¡£ËäÈ»ÄÚÈÝ¿ÉÄܲ»ÊÇÌرðÈ«Ã棬¿ÉÊÇ»¹ÊÇ×ܽáµÄͦºÃµÄ£¬×ª¹ýÀ´·½±ã½«À´Ñ§Ï°¡£
==================================================================================
redo--> undo-->datafile
insertÒ»Ìõ¼Ç¼ʱ£¬±í¸úundoµÄÐÅÏ¢¶¼»á·Å½ø redo ÖУ¬ÔÚcommit »ò֮ǰ£¬ redo µÄÐÅÏ¢»á·Å½øÓ²ÅÌÉÏ¡£ ¹ÊÕÏʱ£¬ redo ±ã¿É»Ö¸´ÄÇЩÒѾcommit Á˵ÄÊý¾Ý¡£
redo->
ÿ´Î²Ù×÷¶¼ÏȼǼµ½redoÈÕÖ¾ÖУ¬µ±³öÏÖʵÀý¹ÊÕÏ£¨Ïñ¶Ïµç£©£¬µ¼ÖÂÊý¾ÝδÄܸüе½Êý¾ÝÎļþ£¬ÔòÊý¾Ý¿âÖØÆôʱÐëredo£¬ÖØаÑÊý¾Ý¸üе½Êý¾ÝÎļþ¡£
undo->
¼Ç¼¸ü¸ÄÇ°µÄÒ»·Ýcopy£¬µ«Äãϵͳrollbackʱ£¬°ÑÕâ·ÝcopyÖØи²¸Çµ½ÔÀ´µÄÊý¾Ý
redo->¼Ç¼ËùÓвÙ×÷£¬ÓÃÓÚ»Ö¸´£¨redo records all the database transaction used for recovery£©
undo->¼Ç¼ËùÓеÄÇ°Ó¡Ïó£¬ÓÃÓڻعö£¨undo is used to store uncommited data infor used for rollback£©
redo->Òѵݽ»µÄÊÂÎñ,ʵÀý»Ö¸´Ê±ÒªÐ´µ½Êý¾ÝÎļþÈ¥µÄ
undo->δµÝ½»µÄÊÂÎñ.
redoµÄÔÒòÊÇ£ºÃ¿´Îcommitʱ£¬½«Êý¾ÝµÄÐÞ¸ÄÁ¢¼´Ð´µ½online redoÖУ¬µ«ÊDz¢²»Ò»¶¨Í¬Ê±½«¸ÃÊý¾ÝµÄÐÞ¸Äдµ½Êý¾ÝÎļþÖС£ÒòΪ¸ÃÊý¾ÝÒѾÌá½»£¬µ«ÊÇÖ»´æÔÚÁª»úÈÕÖ¾ÎļþÖУ¬ËùÒÔÔÚ»Ö¸´Ê±ÐèÒª½«Êý¾Ý´ÓÁª»úÈÕÖ¾ÎļþÖÐÕÒ³öÀ´£¬ÖØÐÂÓ¦ÓÃһϣ¬Ê¹ÒѾ¸ü¸ÄÊý¾ÝÔÚÊý¾ÝÎļþÖÐÒ²¸Ä¹ýÀ´£¡
undoµÄÔÒòÊÇ£ºÔÚoracleÕý³£ÔËÐÐʱ£¬ÎªÁËÌá¸ßЧÂÊ£¬¼ÓÈëÓû§»¹Ã»ÓÐcommit,µ«ÊÇ¿ÕÏÐÄÚ´æ²»¶àʱ£¬»áÓÉDBWR½ø³Ì½«Ôà¿éдÈëµ½Êý¾ÝÎļþÖУ¬ÒÔ±ãÌÚ³ö±¦¹óµÄÄڴ湩ÆäËü½ø³ÌʹÓá£Õâ¾ÍÊÇÐèÒªUNDOµÄÔÒò¡£ÒòΪ»¹Ã»Óз¢³öcommitÓï¾ä£¬µ«ÊÇoracleµÄdbwr½ø³ÌÒѾ½«Ã»ÓÐÌá½»µÄÊý¾Ýдµ½Êý¾ÝÎļþÖÐÈ¥ÁË¡£
undo Ò²ÊÇdatafile£¬¿ÉÄÜdirty buffer ûÓÐд»Øµ½´ÅÅÌÀïÃæÈ¥¡£
Ö»ÓÐÏÈredo apply ³É¹¦ÁË£¬²ÅÄܱ£Ö¤undo datafile ÀïÃæµÄ¶«Î÷¶¼ÊÇÕýÈ·µÄ£¬È»ºó²ÅÄÜrollback ¡£
×öredoµÄÄ¿µÄÊÇʹϵͳ»Ö¸´µ½ÏµÍ³±ÀÀ£Ç°(¹Ø»úÇ°)µÄ״̬,ÔÙ½øÐÐundoÊDZ£Ö¤ÏµÍ³µÄÒ»ÖÂÐÔ¡£
²»×öredo,ϵͳ¾Í²»»áÖªµÀ֮ǰµÄ״̬£¬undo¾ÍÎÞ´Ó̸Æð ¡£
ËùÒÔinstance crash recovery µÄʱºò×ÜÊÇÏÈrollforward£¬ÔÙrollback
undo
»ØÍ˶ÎÖеÄÊý¾ÝÊÇÒÔ“»ØÍËÌõÄ¿”·½Ê½´æ´¢¡£
»ØÍËÌõÄ¿=¿éÐÅÏ¢(ÔÚÊÂÎñÖз¢Éú¸Ä¶¯µÄ¿éµÄ±àºÅ)+ÔÚÊÂÎñÌύǰ´æ´¢ÔÚ¿éÖеÄÊý¾Ý
ÔÚÿһ¸ö»ØÍ˶ÎÖÐoracle¶¼ÎªÆäά»¤Ò»ÕÅ“ÊÂÎñ±í&rdquo
Ïà¹ØÎĵµ£º
¹Ø¼ü×Ö: oracle
Oracle°²×°ÖеÄDHCPÎÊÌâ
1.Linux
ÐÞ¸ÄhostsÎļþ ½«ipµØÖ·ÓëlocalhostÉ趨¾Í¿ÉÒÔÁË£¬ÈçÏÂ
vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.193.129 www.myzhtc.com
192.168.193.129 localhost myzhtc.com
......
[oracle]> sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 03:46:29 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
ORA-01109: database not open
Da ......
ÁгöÅäÖõÄËùÓÐÊý¾Ý¿â
[root@node1 ~]# srvctl config database
NOVADB
ËùÓÐʵÀýºÍ·þÎñµÄ״̬
[root@node1 ~]# srvctl status database -d NOVADB
Instance NOVADB1 is running on node node1
Instance NOVADB2 is running on node node2
µ¥¸öʵÀýµÄ״̬
[root@node1 ~]# srvctl status instance -d NOVADB -i NOVA ......
ʹÓÃEXP
EXPÃüÁîÐÐÑ¡Ïî
1,BUFFER
¸ÃÑ¡ÏîÓÃÓÚÖ¸¶¨ÌáÈ¡ÐÐÊý¾ÝʱµÄ»º³åÇø³ß´ç.ͨ¹ýÉèÖøÃÑ¡Ïî,¿ÉÒÔÈ·¶¨µ¼³öʱÊý¾ÝÌáÆð³ß´ç.¸ÃÑ¡ÏîÖ»ÊÊÓÃÓÚ³£¹æÑ¡Ïî.
Exp scott/tiger tables=dept,emp file=a.dmp buffer=81920
2,COMPRESS
¸ÃÑ¡ÏîÓÃÓÚÖ¸¶¨µ¼Èë¹ÜÀí³õʼÇø(INITIAL)µÄ·½·¨.ĬÈÏֵΪY.µ±ÉèÖøÃÑ¡ÏîΪYʱ,oracle»á½ ......
oracle10gÐÂÌØÐÔ£ºÉÁ»Ø»Ö¸´Çø(Flash recovery area)
Oracle9i¿ªÊ¼ÌṩÉÁ»Ø²éѯ£¬ÒÔ±ãÄÜÔÚÐèÒªµÄʱºò²éµ½¹ýȥij¸öʱ¿ÌµÄÒ»ÖÂÐÔÊý¾Ý£¬ÕâÊÇͨ¹ýUndoʵÏֵġ£Õâ¸ö¹¦ÄÜÓкܴóµÄÏÞÖÆ£¬¾ÍÊÇÏà¹ØÊÂÎñµÄundo²»Äܱ»¸²¸Ç£¬·ñÔò¾ÍÎÞÁ¦»ØÌìÁË¡£oracle10g´ó´óµÄÔöÇ¿ÁËÉÁ»Ø²éѯµÄ¹¦ÄÜ£¬²¢ÇÒÌṩÁ˽«Õû¸öÊý¾Ý¿â»ØÍ˵½¹ýȥij¸öʱ¿ÌµÄÄÜÁ¦£¬ ......