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

Oracle Latch¼°latchì¶Ü

 Ð¡Òý
Oracle RdbmsÊ©ÓÃÁ˸÷ÖÖ²»Í¬ÀàÐ͵ÄËø¶¨»úÖÆ£¬latchµÈÓÚ´ËÖеÄÒ»ÖÖ£¬ÕýÎĽ«¼¯ÖÐÒý¼ûlatch(ãÅ)µÄ¸ÅÄ¶®µÃlatchµÄ¶ÒÏÖ²½Ö貢˵Ã÷»½ÆðlatchĦ²ÁµÄÔµ¹Ê¡£
ʲôÊÇlatch
LatchÊÇÓÃÀ´±£»¤SGAÇøÖй²ÏíÊý¾Ý½á¹¹µÄÒ»ÖÖ´®Ðл¯Ëø¶¨»úÖÆ¡£LatchµÄ¶ÒÏÖÊÇÓë²Ù×÷ϵͳÏà¸ÉµÄ£¬ÓÈÉõºÍÒ»¸ö¹ý³ÌÊDz»ÊÇؽÐèµÈºòÒ»¸ölatch¡¢¼±ÐèµÈºò¶à³¤Ê±¼äÏà¹Ø¡£
Latch ÊÇÒ»ÖÖÄܹ»¼«¿ìµØ±»»ñÈ¡ºÍ¿ªÊ͵ÄËø£¬ËüÒ»°ãÓÃÀ´±£»¤ÃèÊöbuffer cacheÖÐblockµÄÊý¾Ý½á¹¹¡£Óëÿ¸ölatchÏàÁªÏµµÄÔÙÓÐÒ»¸öɨ³ý½ø³Ì£¬Ó¦»³ÓÐlatchµÄÀú³Ì±ä³ÉËÀÀú³Ìʱ£¬¸Ãɨ³ýÀú³Ì¾Í»á±»µ÷Óá£Latch »¹¾ßÓÐÏà¸É¼¶±ð£¬ÓÃÀ´·ÀÖ¹ËÀËø£¬ÍòÒ»Ò»¸öÀú³ÌÔÚij¸ö¼¶±ðÉÏʧȥһ¸ölatch£¬Ëü¾Í²»¿ÉÄÜÔÙÈ¡µÃͬµÈ»ò½ö´ÎÓڸü¶±ðµÄlatch¡£
LatchÓëEnqueue£¨ÐÐÁУ©
Enqueue ÊÇOracleÊ©ÓõÄÁíÒ»ÖÖËø¶¨»úÖÆ£¬ËüÓú¼Ó¸´ÔÓ£¬ÈÝÐí¼¸¸ö²¢·¢¹ý³Ì²»Í¬³Ì¶ÈµØ¹²ÏíijЩ×ÊÔ´¡£Èκοɱ»²¢·¢ÔËÓõĶÔÏó¾ù¿ÉÓ¦ÓÃenqueue¼ÓÒÔ±£»¤¡£1 ¸öµäÐ͵ÄÊÂÀýÊDZíµÄËø¶¨£¬ÎÒÃÇÈÝÐíÔÚÒ»¸ö±íÉÏÓв»Æ½¼¶±ðµÄ¹²Ïí¡£Óëlatch²»Í¬Ö®¾ÓÓÚÓÚ£¬enqueueÊÇÔËÓòÙ×÷ϵͳÌض¨µÄËø¶¨»úÖÆ£¬Ò»¸ö enqueueÈÝÐíÓû§ÔÚËøÉÏÖü´æÒ»¸ö±ê¼Ç£¬À´±íÃ÷ÇëÇóËøµÄ·½Ê½¡£²Ù×÷ϵͳlock manager×·×ÙÈ«²¿±»Ëø¶¨µÄ×ÊÔ´£¬ÈçÆäij¸ö¹ý³Ì²»ÄÜ»ñÈ¡ËüËùÇëÇóµÄÄÇÖÖËø£¬²Ù×÷ϵͳ¾Í°ÑÇëÇó¹ý³ÌÖÃÓÚÒ»¸öµÈºòÐÐÁÐÖУ¬¸ÃÐÐÁа´FIFO×¼Ôò²¿Ê𣬶øÔÚ latchesÖÐÊÇûÏóenqueueÖÐÅÅÐòµÄµÈºòÐÐÁУ¬latchµÈºò¹ý³ÌÒª²»Ó¦Óö¨Ê±Æ÷À´»½ÐѺÍÖØÊÔ£¬Òª²»spin(Ö»ÓÃÒԶദÀíÆ÷Çé¿öÏÂ)¡£
¼¸Ê±¼±Ðèlatch
Ó¦Ò»¸öÀú³ÌÔ¤±¸·ÃÎÊSGAÖеÄÊý¾Ý½á¹¹Ê±£¬Ëü¾ÍÐèҪȡµÃÒ»¸ölatch¡£Ó¦¹ý³ÌÈ¡µÃlatchºó£¬Ëü½«Ò»Ö±»³ÓиÃlatchÖ±µ½Ëü²»ÔÙÔËÓôËÊý¾Ý½á¹¹£¬Õâʱºòlatch²Å»á±»¿ªÊÍ¡£¿Éͨ¹ýlatchÐÕÃûÀ´½ç±ðËüËù±£»¤µÄ²»Í¬Êý¾Ý½á¹¹¡£
Oracle ÔËÓÃÔªÊÚÃü¶Ôlatch¿ªÕ¹²Ù×÷, Ó¦ËùÐèµÄlatchÒѱ»ÆäÓà¹ý³Ì»³ÓÐʱ£¬Ê©ÐÐÊÚÃü¹ý³Ì½«ÖÕֹʩÐÐÒ»²¿·ÖÊÚÃü£¬Ö±µ½¸Ãlatch±»¿ªÊÍΪֹ¡£´Ó¸ù±¾ÉϽ²£¬latch·ÀÖ¹²¢·¢·ÃÎʹ²ÏíÊý¾Ý½á ¹¹£¬ÒòΪÉèÁ¢ºÍ¿ªÊÍlatchµÄÊÚÃüÊDz»¿É¹Ï·ÖµÄ£¬²Ù×÷ϵͳ¾Í¿ÉÒÔÔðÈÎÊéΨÓÐÒ»¸öÀú³ÌÈ¡µÃlatch£¬ÓÖÒòΪÕâÖ»Êǵ¥ÌõÊÚÃü£¬Ö®ËùÒÔʵʩËٶȺܿ졣latch ±»ÎÕÓеÄʱ¼äÊẠ̊́ܶ¬²¢ÇÒÌṩÁ˵±³ÖÓÐÈ˲»Õý³£¼ä¶ÏʱµÄÇý³ý»úÖÆ£¬¸ÃÇý³ý¹¤×÷ÊÇÓÉOracleºǫ́ÀÏ°å¹ý³ÌPMONÀ´Íê³ÉµÄ¡£
ʲôÕÐÖÂlatchĦ²Á
Latch ±£»¤SGAÖеÄÊý¾Ý½á¹¹±»¶à¸öÓû§Óë´Ëͬʱ·ÃÎÊ£¬ÈçÆäÒ»¸ö¹ý³Ì²»ÄÜÁ¢Ê±Ê§È¥ËùÐèlatch£¬Ëü¾Í±ØÐëµÈºò£¬Õâ¾ÍÂÞÖÂÁËCPUµÄ¶îÍ⸺µ£ºÍϵͳµÄËٶȼõµÍ¡£¶îÍâ µ


Ïà¹ØÎĵµ£º

oracleÖеÄNVL,NVL2,NULLIF,COALESCE¼¸¸öͨÓú¯Êý

OracleÖк¯ÊýÒÔÇ°½éÉܵÄ×Ö·û´®´¦Àí£¬ÈÕÆÚº¯Êý£¬Êýѧº¯Êý,ÒÔ¼°×ª»»º¯ÊýµÈµÈ£¬»¹ÓÐÒ»ÀຯÊýÊÇͨÓú¯Êý¡£Ö÷ÒªÓУºNVL,NVL2,NULLIF,COALESCE£¬Õ⼸¸öº¯ÊýÓÃÔÚ¸÷¸öÀàÐÍÉ϶¼¿ÉÒÔ¡£
ÏÂÃæ¼òµ¥½éÉÜһϼ¸¸öº¯ÊýµÄÓ÷¨¡£
ÔÚ½éÉÜÕâ¸ö֮ǰÄã±ØÐëÃ÷°×ʲôÊÇoracleÖеĿÕÖµnull
1.NVLº¯Êý
NVLº¯ÊýµÄ¸ñʽÈçÏ£ºNVL(expr1,expr2)
º¬ÒåÊ ......

aixÏ°²×°oracleÐĵÃ

ɾ³ýAIXϵÄORACLE
===========================================================
×÷Õß: wmlm(http://wmlm.itpub.net)
·¢±íÓÚ:2008.12.02 18:17
·ÖÀà: oracle
³ö´¦£ºhttp://wmlm.itpub.net/post/12871/474762
---------------------------------------------------------------
rm -Rf /etc/oratab
rm -Rf /et ......

Oracle תÒå×Ö·û

Ò»¡¢×¼±¸ÌØÊâÊý¾Ý
create table t_escape(s varchar2(50));
--show define -- define "&" (hex 26)
--show escape -- escape off
set define off
set escape on
insert into t_escape values('string&text');
insert into t_escape values('string\&text');
insert into t_escape values('st ......

oracle×Ö·û¼¯ÐÞ¸ÄÎÊÌâ

 1£ºÖØÐÂÔÚdbcaÖд´½¨Êý¾Ý¿â²¢Ñ¡ÔñÕýÈ·µÄ×Ö·û¼¯
2£º
²éѯµ±Ç°×Ö·û¼¯£º
select userenv('language') from dual;
select * from V$NLS_PARAMETERS;
ÔÚWindowsÏÂsqlplusÍêÈ«Õý³££¬¿ÉÊǵ½LinuxÏ£¬sqlplusÖÐÎÄÏÔʾ¾Í³öÎÊÌâÁË£¬×ÜÊÇÏÔʾ“??”£¬Õâ¸öÎÊÌâÓÖÔõô½â¾öÄØ£¿
¾­¹ýÔÚÍøÂçÉϲé×ÊÁÏ£¬ÒÔ¼°³¢ÊÔ£¬µÃµ½ ......

OracleËæ»úº¯ÊýµÄÓ÷¨

 ÈÝÒ×µÃ˵£¬¾­¹ýdbms_random°üµ÷ÓÃËæ»úÊýµÄ²½Öè´óÌåÓÐ4ÖÖ£º
Ò»¡¢dbms_random.normal
Õâ¸öº¯Êý²»´ø²ÎÊý£¬»á»Øµ½normal distributionµÄÒ»¸önumberÃÅÀ֮࣬ËùÒÔ´óµÖËæ»úÊý»áÔÚ-Ò»µ½Ò»Æä¼ä¡£
¼òÂÔ²âÊÔÁËÒ»ÏÂ×Ó£¬·¢×÷100000´Î×î´óÄܵ½ÎåÉÏÏ£º
SQL> declare
¶þ i number:=Áã;
Èý j number:=Áã;
ËÄ begin
Îå for ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ