Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ORACLE Ò»Ö¶Á(Consistent Read)µÄ²½Öè

1. Read the Data Block.
2. Read the Row Header.
3. Check the Lock Byte to determine whether there's an ITL entry.
4. Read the ITL entry to determine the Transaction ID (Xid).
5. Read the Transaction Table using the Transaction ID. If the transaction has been committed and has a System Commit Number less than the query's System Change Number, update the status of the block (block cleanout) and start over at step 1.
6. Read the last undo block (Uba).
7. Compare the block transaction ID with the transaction table transaction ID. If the Transaction ID in the undo block doesn't equal the Transaction ID from the Transaction Table, then issue ORA-1555, Snapshot Too Old.
8. If the Transaction IDs are identical, make a copy of the data block in memory. Starting with the head undo entry, apply the changes to the copied data block.
9. If the tail undo entry (the actual first undo entry in the chain, or the last in the chain going backwards!) indicates another data block address, read the indicated undo block into memory and repeat steps 7 and 8 until the undo entries don't contain a value for the data block address.
10. When there's no "previous data block address," the transaction has been completely undone.
11. If the undo entry contains:
a. a pointer to a previous transaction undo block address, read the Transaction ID in the previous transaction undo block header and read the appropriate Transaction Table entry. Return to step 5.
b. an ITL record, restore the ITL record to the data block. Return to step 4.
×¢ÊÍ˵Ã÷£º
ÊÂʵÉÏÔÚµÚ6²½Ö®Ç°£¬»áÏȱȽÏquery scnºÍcontrol scn(ÏÂÃæºìÉ«×ÖÌåÊǽâÊÍ)£¬Èç¹ûcontrol scn > query scn£¬oracle¸ù±¾¾Í²»È¥³¢ÊÔ¶ÁÈ¡undo blockÁË£¬ÒòΪע¶¨Ê§°Ü£¬Á¢¿Ì±¨1555´íÎó.
µÚ7²½£¬±íʾ
²»ÊÇÐÞ¸ÄÁ˵±Ç°blockµÄÊÂÎñûÓÐcommit
¾ÍÊÇÊÂÎñcommitÁ˵«ÊÇcommit scn >query scn£¬£¨ÒòΪµÚ5²½ÒѾ­ÅжÏcommit scn<query scnµÄÇé¿ö£©
ËùÒÔ×¼±¸Òª¶ÁÈ¡»Ø¹ö¶ÎÖеÄÇ°¾µÏñ¡£
µÚ9²½£¬Äã¿ÉÒÔ°ÑrollbackµÄ¹ý³ÌÏëÏóΪһ¸öÁ´±í£¬´ÓÒ»¸öundo blockÁ´µ½ÁíÒ»¸öundo block£¬Ö


Ïà¹ØÎĵµ£º

oracle¸´Ï°£¨Ò»£© Ö®OracleÌåϵ½á¹¹

      ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬Ô­À´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·­Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
      µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......

OracleÖÐstart with...connect by prior×Ó¾äÓ÷¨

connect by Êǽṹ»¯²éѯÖÐÓõ½µÄ£¬Æä»ù±¾Óï·¨ÊÇ£º
select ... from tablename start with Ìõ¼þ1
connect by Ìõ¼þ2
where Ìõ¼þ3;
Àý£º
select * from table
start with org_id = 'HBHqfWGWPy'
connect by prior org_id = parent_id;
¼òµ¥ËµÀ´Êǽ«Ò»¸öÊ÷×´½á¹¹´æ´¢ÔÚÒ»ÕűíÀ±ÈÈçÒ»¸ö±íÖдæÔÚÁ½¸ö×Ö¶ ......

ORACLE µÈ´ýʼþ ¡¶ÉîÈëdz³öORACLEµÚ°ËÕ¡·

µÈ´ýʼþµÄÔ´Æð
µÈ´ýʼþµÄ¸ÅÄî´ó¸ÅÊÇ´ÓORACLE 7.0.12ÖÐÒýÈëµÄ£¬´óÖÂÓÐ100¸öµÈ´ýʼþ¡£ÔÚORACLE 8.0ÖÐÕâ¸öÊýÄ¿Ôö´óµ½ÁË´óÔ¼150¸ö£¬ÔÚORACLE 8IÖдóÔ¼ÓÐ220¸öʼþ£¬ÔÚORACLE 9IR2ÖдóÔ¼ÓÐ400¸öµÈ´ýʼþ£¬¶øÔÚ×î½üORACLE 10GR2ÖУ¬´óÔ¼ÓÐ874¸öµÈ´ýʼþ¡£
ËäÈ»²»Í¬°æ±¾ºÍ×é¼þ°²×°¿ÉÄÜ»áÓв»Í¬ÊýÄ¿µÄµÈ´ýʼþ£¬µ«ÊÇÕâЩµÈ´ýÊ ......

oracle constraints(3)

oracle constraints Ó¦ÓÃ
oracle constraints¿ÉÒÔÉèÖÃΪÁ¢¼´¼ì²é»òÕßµ±Ê±ÊÂÎñÌύʱ¼ì²é¡£
    ¿ÉÒÔÔÚ´´½¨Ô¼ÊøµÄʱºòÖ¸¶¨ÊÇdeferrable¡£È»ºóͨ¹ýset constraints xxx set deferred»òÕßimmediate,Ò²¿ÉÒÔÔÚseesion¼¶±ðÉ趨ËùÓÐÔ¼ÊøΪdeferred»òÕßimmediate(alter seesion set constraints deferred/immediat ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ