OracleÊý¾Ý¿âÌá¸ßÃüÖÐÂʼ°Ïà¹ØÓÅ»¯
1)Library CacheµÄÃüÖÐÂÊ:
.¼ÆË㹫ʽ:Library Cache Hit Ratio = sum(pinhits) / sum(pins)
SQL>SELECT SUM(pinhits)/sum(pins) from V$LIBRARYCACHE;
ͨ³£ÔÚ98%ÒÔÉÏ£¬·ñÔò£¬ÐèÒªÒª¿¼ÂǼӴó¹²Ïí³Ø£¬°ó¶¨±äÁ¿£¬ÐÞ¸Äcursor_sharingµÈ²ÎÊý¡£
2)¼ÆËã¹²Ïí³ØÄÚ´æʹÓÃÂÊ:
SQL>SELECT (1 - ROUND(BYTES / (&TSP_IN_M * 1024 * 1024), 2)) * 100 || '%' from V$SGASTAT WHERE NAME = 'free memory' AND POOL = 'shared pool';
ÆäÖÐ: &TSP_IN_MÊÇÄãµÄ×ܵĹ²Ïí³ØµÄSIZE(M)
¹²Ïí³ØÄÚ´æʹÓÃÂÊ£¬Ó¦¸ÃÎȶ¨ÔÚ75%-90%¼ä£¬Ì«Ð¡ÀË·ÑÄڴ棬̫´óÔòÄÚ´æ²»×ã¡£
²éѯ¿ÕÏеĹ²Ïí³ØÄÚ´æ:
SQL>SELECT * from V$SGASTAT WHERE NAME = 'free memory' AND POOL = 'shared pool';
3)db buffer cacheÃüÖÐÂÊ:
¼ÆË㹫ʽ:Hit ratio = 1 - [physical reads/(block gets + consistent gets)]
SQL>SELECT NAME, PHYSICAL_READS, DB_BLOCK_GETS, CONSISTENT_GETS, 1 - (PHYSICAL_READS / (DB_BLOCK_GETS + CONSISTENT_GETS)) "Hit Ratio" from V$BUFFER_POOL_STATISTICS WHERE NAME='DEFAULT';
ͨ³£Ó¦ÔÚ90%ÒÔÉÏ£¬·ñÔò£¬ÐèÒªµ÷Õû,¼Ó´óDB_CACHE_SIZE
ÁíÍâÒ»ÖÖ¼ÆËãÃüÖÐÂʵķ½·¨(Õª×ÔORACLE¹Ù·½Îĵµ<<Êý¾Ý¿âÐÔÄÜÓÅ»¯>>):
ÃüÖÐÂʵļÆË㹫ʽΪ:
Hit Ratio = 1 - ((physical reads - physical reads direct - physical reads direct (lob)) / (db block gets + consistent gets - physical reads direct - physical reads direct (lob))
·Ö±ð´úÈëÉÏÒ»²éѯÖеĽá¹ûÖµ,¾ÍµÃ³öÁËBuffer cacheµÄÃüÖÐÂÊ
SQL>SELECT NAME, VALUE from V$SYSSTAT WHERE NAME IN('session logical reads', 'physical reads', 'physical reads direct', &nb
Ïà¹ØÎĵµ£º
¿ªÊ¼ÔÚmyeclipse6.5ÖÐDB BROWERн¨ÁËÒ»¸öÊý¾Ý¿âÁ¬½Ó£¬Èçͼ£º
Ò»Á¬½Ó£¬±¨³öÁËÁ½¸ö´íÎó£º
1. ORA-00604 error occurred at recursive SQL level string.
2.ORA-12705: invalid or unknown NLS parameter value.
²é×ÊÁϺó½â¾ö£¨ÆÚ¼äÎÒ»¹¸Ä¹ýtestÓû§µÄÁ¬½ÓȨÏÞ£©£º
½«MyEclipseÖÐeclipseĿ¼ÏµÄeclipse.iniÎļþ£¬° ......
Oracle±íµÄ¹ÜÀí
±íÃûºÍÁÐÃûµÄÃüÃû¹æÔò£º
1±ØÐëÒÔ×Öĸ¿ªÍ·
2³¤¶È²»Äܳ¬¹ý30¸ö×Ö·û
3²»ÄÜʹÓÃOracleµÄ±£Áô×Ö
4Ö»ÄÜʹÓÃÈçÏÂ×Ö·û£ºA-Z,a-z,0-9,$,#µÈ
OracleÖ§³ÖµÄÊý¾ÝÀàÐÍ£º
1char ¶¨³¤£¬×î´ó2000×Ö·û
Àý×Ó£ºchar(10) ‘Ïþ»Ô’ Ç°Ëĸö×Ö·û·Å’Ïþ»Ô’£¬ºóÌíÁù¸ö¿Õ¸ñ²¹È«
2varchar2(20) ±ä³¤£¬×î´ ......
ÈÔȻʹÓÃSCOTTÓû§À´²Ù×÷£º
1¡¢ ÏÔʾ¹¤×ʱȲ¿ÃÅ30µÄËùÓÐÔ±¹¤µÄ¹¤×ʶ¼¸ßµÄÔ±¹¤µÄÐÅÏ¢£º
Select * from emp where sal>all(select sal from emp where deptno=30);
2¡¢ ÏÔʾ¹¤×ʱȲ¿ÃÅ30µÄÈÎÒâÒ»¸öÔ±¹¤µÄ¹¤×ʸ߾ͿÉÒ ......
OracleÖÐKill sessionµÄÑо¿
×÷Õߣºeygle |English Version ¡¾×ªÔØʱÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷¡¿
Á´½Ó£ºhttp://www.eygle.com/archives/2004/06/kill_session.html
ÎÒÃÇÖªµÀ,ÔÚOracleÊý¾Ý¿âÖÐ,¿ÉÒÔͨ¹ýkill sessionµÄ·½Ê½À´ÖÕÖ¹Ò»¸ö½ø³Ì,Æä»ù±¾Óï·¨½á¹¹Îª:
alter system kill session 'sid,serial# ......
±È½Ïרҵ£¬×¨ÃżÆËã»ú¼¼Êõµç×ÓÊéÏÂÔصģº
www.itpub.net
www.itepub.net
www.netyi.net/in.asp?id=daotong
www.chmpdf.com
Ïà¶Ô²»Ì«×¨ÒµµÄ£¬ÄÚÈÝÒ²·Ç³£·á¸»
www.infoxa.com
www.xpbook.com
ÕâЩÍøÕ¾¼¸ºõ¿ÉÒÔÕÒµ½ÄãÏëÒªµÄÈ«²¿Êé¼®¡£ ......