¹ØÓÚlatchºÍmutexµÄÎÊÌâ
from:http://www.itpub.net/thread-1004815-1-1.html
A:
latchÊÇãÅËø£¬ÊÇÒ»ÖÖ´®Ðл¯»úÖÆ£¬ÓÃÀ´±£»¤SGAÖеÄÄÚ´æ½á¹¹¡£
mutexÊÇʲô£¬Ò²ÊÇÒ»ÖÖ´®Ðл¯»úÖÆ£¬ÊÇ»¥³âËø£¿
¸öÈ˶ÔmutexûÓÐʲô¸ÅÄî¡£Õâ¸öÊÇ10GÐÂÒý½øµÄ£¿9IºÃÏñûÓа¡¡£
ÄÄλÃ÷°×ÈË£¬¸ø°ïæÏêϸ½âÊÍÏÂmutex£¬×îºÃ»¹ÄܺÍlatch ×öϱȽϡ£
лл¡£
B:
BTW, things get more fun in 10.2, you can pin cursors without getting library cache pin latch, using KGX mutexes. Mutexes are new in 10.2 and they enable shared access to objects in somewhat similar manner to shared latche; every successful get of a particular mutex will increment its value and a release will decrement. When the count is zero, no one has the mutex and it is safe to get it in exclusive mode. However, they are more fine-grained than kgl latches and provide a better wait mechanism, as far as I understand.
So if your environment supports atomic compare and swap operation (such as CMPXCHG on Intel), you might get away without cursor_space_for_time setting for u ......
oracle ´Ó10.2.0.2 µ½ 10.2.0.4 Éý¼¶
Ò»¡¢ÏÂÔØÉý¼¶°ü
ÏÂÔØµØÖ·£º
ftp://updates.oracle.com/6810189/p6810189_10204_Linux-x86.zip
×¢Ò⣺²»ÒªÓÃflashgetÏÂÔØ£¬ÓÃѸÀ×ÏÂÔØ¡£Îļþ´óС1G¶à¡£
¶þ¡¢¹Ø±ÕÊý¾Ý¿â
ÒÔoracleÓû§Ô¶³ÌµÇ¼suseϵͳ:
1. sqlplus /nolog
SQL> connect /as sysdba
SQL> shutdown immediate;
Ò»°ãÇé¿öÏ¿ÉÒÔÕý³£¹Ø±Õ¡£Èç¹û²»Äܹرգ¬¿ÉÒÔÇ¿ÖÆ¹Ø±Õ¡£
¹Ø±ÕËùÓÐµÄ oracle ½ø³Ì£º
ps -ef|grep orac*
Èç¹ûÓеϰ£¬ÓÃkilÃüÁî¡£
2. Õý³£¼àÌý
lsnrctl stop
Èý¡¢½âѹÉý¼¶°ü
unzip p6810189_10204_Linux-p6810189_10204_Linux-x86.zip
ÔÚĿ¼Ï½«»áÉú³ÉÒ»¸öDisk1µÄÎļþ¼Ð¡£
ËÄ¡¢°²×°Ç°×¼±¸
Èç¹ûÊÇÔÚÖն˰²×°Éý¼¶°üµÄ»°£¬ºÜÓпÉÄÜ»áÅöµ½ÏÂÃæµÄ´íÎó£º
Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
ÔÚ°²×°Ö®Ç°Òª»¹Òª×öЩ¹¤×÷¡£ÎÒÊÇͨ¹ýsshÀ´·ÃÎʰ²×°»úÆ÷µÄ£¬Òò´ËÐèÒªÔÚWINDOWS»úÆ÷ÏÂÅäÖÃÒ»¸ö¿ÉÒÔת·¢X11µÄÈí¼þ¡£
ÏÂÔØµØÖ·£º
1. xmingÏÂÔØ×îаæsourceforge.net/projects/xming/
°²×°º ......
Óï·¨:
substr( string, start_position, [ length ] )
È¡×Ó×Ö·û´®,´Óstart_position¿ªÊ¼,È¡length¸ö,lengthΪ¿ÉÑ¡£¬Èç¹ûlengthΪ¿ÕÔò·µ»Østart_positionºóµÄËùÓÐ×Ö·û¡£
ʵÀý:
substr('This is a test', 6, 2) would return 'is'
substr('This is a test', 6) would return 'is a test'
substr('TechOnTheNet', 1, 4) would return 'Tech'
substr('TechOnTheNet', -3, 3) would return 'Net'
substr('TechOnTheNet', -6, 3) would return 'The'
substr('TechOnTheNet', -8, 2) would return 'On'
select substr('TechOnTheNet', -3, 2) from dual
start_positionΪ¸ºÊýʱ£¬±íʾ´Ó×Ö·û´®Î²°Íµ¹×ÅÊý
(thismonth)תÌù£ºhttp://hi.baidu.com/stanver/blog/item/710fbd1bae7e58118618bf31.html ......
lengthb(string)¼ÆËãstringËùÕ¼µÄ×Ö½Ú³¤¶È :·µ»Ø×Ö·û´®µÄ³¤¶È£¬µ¥Î»ÊÇ×Ö½Ú
length(string)¼ÆËãstringËùÕ¼µÄ×Ö·û³¤¶È :·µ»Ø×Ö·û´®µÄ³¤¶È£¬µ¥Î»ÊÇ×Ö·û
¶ÔÓÚµ¥×Ö½Ú×Ö·û,LENGTHBºÍLENGTHÊÇÒ»ÑùµÄ.
Èç¿ÉÒÔÓÃlength(‘string’)=lengthb(‘string’)ÅжÏ×Ö·û´®ÊÇ·ñº¬ÓÐÖÐÎÄ¡£
select length('ÎÒ') from dual --·µ»Ø1
select lengthb('ÎÒ') from dual --·µ»Ø2
select length('AB') from dual --·µ»Ø2
select lengthb('AB') from dual --·µ»Ø2
£¨thismonth£©×ªÌù£ºhttp://space.itpub.net/161195/viewspace-613263 ......
--ʹÓÃDBA´´½¨Á½¸öÓû§
create user gubo identified by gubo;
create user gubo2 identified by gubo;
--¸øÁ½¸öÓû§Á¬½ÓȨÏÞ
grant create session to gubo;
grant create session to gubo2;
--¸øÆäÖÐÒ»¸öÓû§·ÃÎʱí¿Õ¼äµÄȨÏÞ
grant unlimited tablespace to gubo;
--Á¬½ÓÆäÖÐÓû§£¬´´½¨±í
--conn gubo
create table test (a char(10));
--½¨Á¢Ò»µã²âÊÔÊý¾Ý
insert into test values ('abc');
insert into test values ('abcd');
commit;
--ĬÈϵÄÇé¿öÏ£¬ÎÒʹÓõÄoracleÓÃÓû§2¾Í¿ÉÒÔ·ÃÎÊÓû§1µÄ±íÁË£¬²»ÖªµÀÕâ±ßµÄÇé¿ö
--Èç¹ûҪʹÓø³È¨ÊÇÏÂÃæµÄÓï¾ä
grant select on TEST to gubo2£»
--ÕâÌõÓï¾äÄã³¢ÊÔÓÃÏÂ×Ô¶¯Éú³É¸³ËùÓе±Ç°Óû§±íµÄȨÏÞµÄ
select 'grant select on '|| TNAME ||' to gubo2;' from tab;
--ÊÕ»ØÈ¨Ï޵ķ½·¨
revoke select on TEST from gubo2;
--ʹÓÃgubo2Óû§·ÃÎÊguobÓû§µÄ±í
select * from GUBO.test;
--ÎÒÊÔ¹ýÊÇÎÞȨ¸ü¸ÄµÄ
ÁíÍâÈç¹û²»ÏëʹÓà GUBO.testÕâÑùͨ¹ýÓû§Ãûǰ׺µÄ·½Ê½·ÃÎÊÒ»°ëÊǽ¨Á¢Í¬Òå´Ê£¬ÎҾͲ»¶àдÁË
......
Oracle 10g ÌØÐÔ: ͨ¹ý±¸·ÝʵÏÖ¿É´«Êä±í¿Õ¼ä
Oracle8i ÖÐÒýÈëµÄ¿É´«Êä±í¿Õ¼äΪʵÏÖ¸ü¿ìµÄ¿çÊý¾Ý¿âÊý¾Ý´«ÊäÌṩÁËÆÈÇÐÐèÒªµÄÖ§³Ö¡£Ê¹ÓôËÌØÐÔ£¬Äú¿ÉÒÔÖ»µ¼³ö±í¿Õ¼äµÄÔªÊý¾Ý¡¢´«ÊäÊý¾ÝÎļþ²¢½«×ª´¢Îļþµ¼³öµ½Ä¿±êÊý¾Ý¿âÖ÷»úÒÔ¼°µ¼ÈëÔªÊý¾ÝÒÔ½«±í¿Õ¼ä“²åÈ딵½Ä¿±êÊý¾Ý¿âÖС£¸Ã±í¿Õ¼äÖеÄÊý¾ÝÔÚÄ¿±êÊý¾Ý¿âÖÐËæ¼´¿ÉÓ᣸÷½·¨½â¾öÁËÊý¾Ý²Ö¿âÖÐÔøÒ»¶È´æÔÚµÄÒ»¸öºÜ¼¬ÊÖµÄÎÊÌ⣺¿ìËÙ¡¢¸ßЧµØ¿çÊý¾Ý¿âÒÆ¶¯Êý¾Ý¡£
µ«ÔÚ OLTP Êý¾Ý¿âÖУ¬¸ÃÌõ¼þͨ³£ÊDz»¿ÉÄÜ´æÔڵģ¬Òò´Ë´«Êä±í¿Õ¼äÒ²ÊDz»¿ÉÄܵġ£Èç¹û OLTP Êý¾Ý¿âÊÇÊý¾Ý²Ö¿âµÄÊý¾ÝÔ´£¬ÔòÄú¿ÉÄÜʼÖÕÎÞ·¨Ê¹Óÿɴ«Êä±í¿Õ¼ä¼ÓÔØËü¡£
ÔÚ Oracle Êý¾Ý¿â 10g µÚ 2 °æÖУ¬¿ÉÒÔ´«Êä±í¿Õ¼ä²¢´ÓÁíÒ»¸öÊý¾ÝÔ´£¨¼´±¸·Ý£©ÖвåÈëËü¡£ÀýÈ磬Èç¹ûÒª´«Êä±í¿Õ¼ä ACCDATA£¬Ôò¿ÉÒÔ·¢³ö RMAN ÃüÁî
RMAN> transport tablespace accdata
2> TABLESPACE DESTINATION = '/home/oracle'
3> auxiliary destination = '/home/oracle';
¸ÃÃüÁîÔÚλÖà /home/oracle Öд´½¨Ò»¸ö¸¨ÖúʵÀý£¬²¢´ÓÆäÖеı¸·Ý»Ö¸´Îļþ¡£´Ë¸¨ÖúʵÀýµÄÃû³ÆÊÇËæ»úÉú³ÉµÄ¡£´´½¨ÊµÀýºó£¬¸Ã¹ý³Ì½«»ùÓÚĿ¼´´½¨Ò»¸öĿ¼¶ÔÏ󣬲¢»Ö¸´±í¿Õ¼ä ACCDATA£¨ÎÒÃÇÕýÔÚ´«ÊäµÄ±í¿Õ¼ ......