oracle scnÑо¿
ÉîÈëÁ˽âOracle SCN (1)
--------------------------------------------------------------------------------
£Û˵Ã÷£Ý±¾À´ÔÚÑо¿Backup and Recovery£¬¿ÉÊÇÔÚ×öʵÑéµÄʱºòÓöµ½Ò»Ð©ÎÊÌâ²»ÊǺÜÀí½â£¬½ø¶ø×·¸ùÇóÔ´£¬Ïë¸ãÇå³þ£¬ÓÚÊDZØÐë¸ãÇå³þSCNºÍRecoveryÖ®¼äµÄ¹Øϵ¡£ÓÚÊǺõת¶øÑо¿SCN£¬ÕâÁ½Ìì¿´Á˺ܶàÎÄÕ£¬°üÀ¨EygleÍøÕ¾ÉϵÄÎÄÕ£¬itpubÉÏbitiµÈ´óʦÒÔÇ°·¢¹ý»òÕß²ÎÓëÌÖÂÛ¹ýµÄÌû×Ó£¬·¢ÏÖ˼·ÓÐÄ£ºýµ½ÇåÎú£¬ÔÙÓÉÇåÎúµ½Ä£ºý£¬Ô½×ßÔ½ÉÖÁ½ñ»¹Ã»ÓÐÍêÈ«¸ãÇå³þ¡£¾ö¶¨ÔÝʱµ½´ËΪֹ£¬µÈÒÔºó¸÷·½ÃæµÄ֪ʶ»ýÀÛ¶àÁË£¬ÔÙת¹ýÀ´Ñо¿Ò»Ï¡£±¾Ïë×Ô¼ºÐ´¸ö×ܽáÐÔµÄÎÄÕ£¬¿ÉÊÇ·¢ÏÖÁËһƪÎÄÕÂÒѾдµÄºÜºÃÁË£¬ÎÒ¾ÍÀÁ¶èµÄÒÔÒÝ´ýÀÍ£¬copy¹ýÀ´ÁË£¬ÔÚ´Ëллǰ±²ÃǵŤ×÷£¬´ó¼ÒÐÁ¿àÁË¡«
SCNµÄ¸ÅÄî
SCNÊÇ˳ÐòµÝÔöµÄÒ»¸öÊý×Ö£¬ÔÚOracleÖÐÓÃÀ´±êʶÊý¾Ý¿âµÄÿһ´Î¸Ä¶¯£¬¼°ÆäÏȺó˳Ðò¡£SCNµÄ×î´óÖµÊÇ0xffff.ffffffff¡£
SCNµÄ¹ÜÀí·½Ê½
Oracle¶ÔSCNµÄ¹ÜÀí£¬·ÖΪµ¥½ÚµãºÍRACÁ½ÖÖ·½Ê½¡£
µ¥½ÚµãµÄinstanceÖÐ
µ¥½ÚµãµÄinstanceÖУ¬SCNÖµ´æÔÚSGAÇø£¬ÓÉsystem commit number latch±£»¤¡£Èκνø³ÌÒªµÃµ½µ±Ç°µÄSCNÖµ£¬¶¼ÒªÏȵõ½Õâ¸ölatch¡£
RAC/OPS»·¾³ÖÐ
Oracleͨ¹ýÅŶӻúÖÆ(Enqueue)ʵÏÖSCNÔÚ¸÷²¢ÐнڵãÖ®¼äµÄ˳ÐòÔö³¤¡£¾ßÌåÓÐÁ½ÖÖ·½·¨£º
LamportËã·¨£ºÓÖ³ÆÃæ°ü·¿Ëã·¨£¬ÏÈÀ´ÏÈ·þÎñËã·¨¡£¸úºÜ¶àÒøÐвÉÓõÄÅŶӻúÖÆÒ»Ñù¡£¿Í»§µ½ÁËÒøÐУ¬ÏÈÁìÈ¡Ò»¸ö·þÎñºÅ¡£Ò»µ©Ä³¸ö´°¿Ú³öÏÖ¿ÕÏУ¬ÓµÓÐ×îС·þÎñºÅµÄ¿Í»§¾Í¿ÉÒÔÈ¥¿ÕÏд°¿Ú°ìÀíÒµÎñ¡£
Commit¹ã²¥Ëã·¨£ºÒ»ÓÐcommitÍê³É£¬×îеÄSCN¾Í¹ã²¥µ½ËùÓнڵãÖС£
ÉÏÊöÁ½ÖÖËã·¨¿ÉÒÔͨ¹ýµ÷Õû³õʼ»¯²ÎÊýmax_commit_propagation_delayÀ´Çл»¡£ÔÚ¶àÊýϵͳ(³ýÁËCompaq Tur64 Unix)ÖУ¬¸Ã²ÎÊýµÄĬÈÏÖµ¶¼ÊÇ700ÀåÃë(centisecond)£¬²ÉÓÃLamportËã·¨¡£Èç¹û¸ÃֵСÓÚ100ÀåÃ룬Oracle¾Í²ÉÓù㲥Ëã·¨£¬²¢ÇҼǼÔÚalert.logÎļþÖС£
¼¸ÖÖÖØÒªµÄSCN
Commit SCN
µ±Óû§Ìá½»commitÃüÁîºó£¬ÏµÍ³½«µ±Ç°scn¸³¸ø¸Ãtransaction¡£ÕâЩÐÅÏ¢¶¼·´Ó³ÔÚredo bufferÖУ¬²¢ÂíÉϸüе½redo logÎļþÀï¡£
Offline SCN
³ýÁËSystem tablespaceÒÔÍâµÄÈκαí¿Õ¼ä£¬µ±ÎÒÃÇÖ´ÐÐSQL>alter tablespace…offline normalÃüÁîʱ£¬¾Í»á´¥·¢Ò»¸öcheckpoint£¬½«ÄÚ´æÖеÄdirty bufferдÈë´ÅÅÌÎļþÖС£CheckpointÍê³Éºó£¬Êý¾ÝÎļþÍ·»á¸üÐÂcheckpoint scnºÍoffline normal scnÖµ¡£ÆäÖÐÊý¾Ý¿âÎļþÍ·µÄcheckpoint scnÖµ¿Éͨ¹ý²éѯÁÐx$kccfe.fecpsµÃµ½¡£
Èç¹ûÖ´ÐÐSQL>alter table
Ïà¹ØÎĵµ£º
OracleÉó¼Æ¹¦ÄÜ
Éó¼ÆÊǶÔÑ¡¶¨µÄÓû§¶¯×÷µÄ¼à¿ØºÍ¼Ç¼£¬Í¨³£ÓÃÓÚ£º
u Éó²é¿ÉÒɵĻ¡£ÀýÈ磺Êý¾Ý±»·ÇÊÚȨÓû§Ëùɾ³ý£¬´Ëʱ°²È«¹ÜÀíÔ±¿É¾ö¶¨¶Ô¸Ã Êý¾Ý¿âµÄËùÓÐÁ¬½Ó½øÐÐÉó¼Æ£¬ÒÔ¼°¶ÔÊý¾Ý¿âµÄËùÓбíµÄ³É¹¦µØ»ò²»³É¹¦µØɾ³ý½øÐÐÉó¼Æ¡£
u &n ......
ÔÚOracleÖУ¬Òª°´Ìض¨Ìõ¼þ²éѯǰNÌõ¼Ç¼£¬Óøörownum¾Í¸ã¶¨ÁË¡£
select * from emp where rownum <= 5
¶øÇÒÊéÉÏÒ²¸æ½ë£¬²»ÄܶÔrownumÓÃ">"£¬ÕâÒ²¾ÍÒâζ×Å£¬Èç¹ûÄãÏëÓÃ
select * from emp where rownum > 5
ÔòÊÇʧ°ÜµÄ¡£ÒªÖªµÀΪʲô»áʧ°Ü£¬ÔòÐèÒªÁ˽ârownum±³ºóµÄ»úÖÆ£º
1 Oracle executes your quer ......
http://inthirties.com:90/thread-1233-1-1.html
ºÃûÓÐÅöSolarisÁË£¬ÊÖÓÐЩÉúÁË£¬¿´À´ÕæҪװ¸ösolaris£¬Æ½Ê±¶àÍæÍæ¡£
ÔÚsolarisÉÏ×°Oracle 10gÏÈ¡£
1. ¼ì²é°²×°ÒÀÀµ°ü
¹Ù·½ÒªÇóµÄ°ü
SUNWarc
SUNWbtool
SUNWhea
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWi1of
SUNWi1cs
SUNWi15cs
SUNWxwfnt
Ö´ÐÐÃüÁî
# p ......
·¢ÏÖһƪ¹ØÓÚÓαêµÄÎÄÕ£¬¸Ð¾õдµÄºÜ²»´í£¬ÏÈÊÕ²ØÁË£»µ«ÊÇÀïÃæÓÐһЩ´íÎó£¬=ÓÐʱ¼äÁËÔÙÕûÀíһϡ£
--------
ÎÒÃǽ«ÌÖÂÛ¸÷ÖÖÓÃÓÚ·ÃÎÊORACLEÊý¾Ý¿âµÄDDLºÍTCLÓï¾ä¡£
²éѯ
SELECTÓï¾äÓÃÓÚ´ÓÊý¾Ý¿âÖвéѯÊý¾Ý£¬µ±ÔÚPL/SQLÖÐʹÓÃSELECTÓï¾äʱ£¬ÒªÓëINTO×Ó¾äÒ»ÆðʹÓ㬲éѯµÄ·µ»ØÖµ±»¸³Ó ......