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£¬Ö
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
1.OracleDBConsoleorcl oem¿ØÖÆ̨µÄ·þÎñ½ø³Ì
2.OracleJobSchedulerORCL ¶¨Ê±Æ÷µÄ·þÎñ½ø³Ì
3.OracleOraDb10g_home1iSQL*Plus isql*plusµÄ·þÎñ½ø³Ì
4.OracleOraDb10g_home1TNSListener ¼àÌýÆ÷µÄ·þÎñ½ø³Ì
5.Or ......
ORACLEÖÐÊý¾Ý×ÖµäÊÓͼ·ÖΪ3´óÀà, ÓÃǰ׺Çø±ð£¬·Ö±ðΪ£ºUSER£¬ALL ºÍ DBA£¬Ðí¶àÊý¾Ý×ÖµäÊÓͼ°üº¬ÏàËƵÄÐÅÏ¢¡£
USER_*:ÓйØÓû§ËùÓµÓеĶÔÏóÐÅÏ¢£¬¼´Óû§×Ô¼º´´½¨µÄ¶ÔÏóÐÅÏ¢
ALL_*£ºÓйØÓû§¿ÉÒÔ·ÃÎʵĶÔÏóµÄÐÅÏ¢£¬¼´Óû§×Ô¼º´´½¨µÄ¶ÔÏóµÄÐÅÏ¢¼ÓÉÏÆäËûÓû§´´½¨µÄ¶ÔÏ󵫸ÃÓû§ÓÐȨ·ÃÎʵÄÐÅÏ¢
DBA_* ......
²éѯÓû§ÐÅÏ¢
SELECT USERNAME,DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE, PROFILE, ACCOUNT_STATUS, CREATED from dba_users; ²éѯÓû§¿Õ¼äʹÓúÍÉÏÏÞÇé¿ö
SELECT username, tablespace_name, bytes/1024/1024 space_used_in_mb, max_bytes/1024/1024 max_space_in_mb from dba_ts_quotas; ´´½¨ ......
Èç¹ûÄãÒª°ÑOracleÀïµÄ´óÁ¿Êý¾Ý(80MÒÔÉÏ)תÒƵ½ÁíÍâµÄÓû§£¬ÁíÍâµÄ±í¿Õ¼äÀï¡£¿ÉÒÔÓÃÏÂÃæ½éÉܵĿìËÙתÒÆÊý¾ÝµÄ·½·¨¡£
Ò»¡¢½¨Ð±íµÄ·½Ê½
create table target_tablename tablespace
target_tablespace_name nologging
pctfree 10 pctused 60
storage(initial 5M next 5M minextents 1
maxextents unlimited pctincr ......