ÃüÁîÐÐά»¤Oracle AWR
ÃüÁîÐÐά»¤Oracle AWR
ÓÐʱºòÓÉÓÚÖÖÖÖÔÒò£¬Ö»ÄÜʹÓÃÃüÁîÐÐÀ´Î¬»¤Oracle10g¡£µ±È»ÎÒÃÇÒÀÈ»¿ÉÒÔʹÓÃstatspack£¬µ«ÓÉÓÚstatspack¹¦Äܲ»ÈçAWR£¬¶ø
ÇÒÈç¹ûʹÓÃÁ½ÖÖÐÔÄÜÕï¶Ï¹¤¾ßÒ²ÊÇÒ»ÖÖÀË·Ñ¡£Òò´ËÊÖ¶¯Î¬»¤AWR»¹ÊÇÓбØÒªµÄ£¬ÏÂÃæÁгöһЩ³£ÓõÄAWRÃüÁÒÔ±¸ºó²é¡£
1¡¢ÐÞ¸ÄAWRµÄ´¥·¢ÆµÂÊ
AWRĬÈÏÊÇÿСʱ´¥·¢Ò»´Î£¬µ«ÓÐʱºòÕâ¸öĬÈÏδ±Ø·ûºÏʵ¼ÊÒªÇó£¬Õâ¾ÍÐèÒª½øÐе÷Õû´¥·¢ÆµÂÊ¡£
SQL>exec
dbms_workload_repository.modify_snapshot_settings(retention=>20160,
interval=>15);
ÉÏÊöÃüÁî±íʾ£º15·ÖÖÓ´¥·¢Ò»´Î£¬ÀúÊ·¼Ç¼±£Áô14Ì죨20160=60*24*14£©¡£
2¡¢²é¿´AWRµÄ´¥·¢ÆµÂÊ
SQL>select *
from dba_hist_wr_control;
È磺
4008876392
+00000 02:00:00.0
--Á½Ð¡Ê±Ò»´Î
+00014 00:00:00.0
--ÀúÊ·Êý¾Ý±£Áô14Ìì
DEFAULT
3¡¢´´½¨Ð¿ìÕÕ
SQL>exec
dbms_workload_repository.create_snapshot
4¡¢²é¿´¿ìÕÕ
SQL>select
snap_id, begin_interval_time, end_interval_time from
dba_hist_snapshot order by 1
5¡¢Éú³É¿ìÕÕ±¨¸æ
SQL>start
$ORACLE_HOME/rdbms/admin/awrrpt.sql
Ïà¹ØÎĵµ£º
NULLÖ¸µÄÊÇ¿ÕÖµ£¬»òÕß·Ç·¨Öµ¡£
NVL (expr1, expr2)->expr1ΪNULL£¬·µ»Øexpr2£»²»ÎªNULL£¬·µ»Øexpr1¡£×¢ÒâÁ½ÕßµÄÀàÐÍÒªÒ»ÖÂ
NVL2 (expr1, expr2, expr3) ->expr1²»ÎªNULL£¬·µ»Øexpr2£»ÎªNULL£¬·µ»Øexpr3¡£expr2ºÍexpr3ÀàÐͲ»Í¬µÄ»°£¬expr3»áת»»Îªexpr2µÄÀàÐÍ
NULLIF (expr1, expr2) ->ÏàµÈ·µ»ØNULL£¬²»µÈ·µ»Øex ......
Oracle ´¥·¢Æ÷ÓÐÓï¾ä¼¶´¥·¢Æ÷ºÍÐм¶´¥·¢Æ÷
Óï¾ä¼¶´¥·¢Æ÷ µ±É¾³ý²¿ÃűíÖеIJ¿ÃźÅʱ£¬Í¬Ê±É¾³ýµôÔ±¹¤±íÖв¿ÃźÅΪ£ºold.deptnoµÄ¼Ç¼
create or replace trigger del_dept_id
after delete on dept
for each row
begin
delete from emp where deptno=:old.deptno;
end;
µ±Íù²¿Ãűí²åÈëʱ£¬Í¬Ê±ÔÚÔ±¹¤±íÖ ......
תÌû´¦£ºhttp://dong-java.javaeye.com/blog/375150
1¡£ÍƼöʹÓÃOralce±È½ÏеÄ10.2.0.3 JDBC Drivers¡£Õâ¸ö°æ±¾¶Ô±È9.2µÄ×î´óµÄºÃ´¦ÊÇDriverManager.setLoginTimeoutº¯ÊýÊÇÆð×÷Óõġ£ÉèÖÃÁËÕâ¸ö²ÎÊý£¬ÔÚ¶ñÁÓµÄÍøÂç»·¾³ÖоͲ»»áÓÐÁ¬½ÓÊý¾Ý¿âµÄº¯Êý³¤Ê±¼ä²»·µ»ØµÄÇé¿ö¡£
2¡£JDBC Developer!ˉs Guide and Refer ......
ÎҵĻúÆ÷¸ÄÁ˼ÆËã»úÃû³Æ£¬ÔÙ¿ª»úʱ£¬oracle³öÏÖÎÊÌ⣬¿ª»úʱÀÏÊDZ¨“agntsrvc.exe³ö´í”£¬¾¹ýËÑË÷·¢ÏÖÊÇÏÂÁÐÎÊÌ⣺
1.agntsrvc.exeÊÇOracle Intelligent Agent·þÎñ¶ÔÓ¦µÄ³ÌÐò¡£
2.Òò´Ë·þÎñÊÇ×Ô¶¯Æô¶¯µÄ£¬ËùÒÔÒ»°ã¶àÔÚµçÄÔÆô¶¯Ê±µ¯³öϵͳ´íÎó¡£
3.ÎÊÌâ´¦Àí£º£¨±¾±¸·ÝÑø³ÉÏ°¹ßŶ£©
¡¡É¾³ýÁË %ORACLE_HOME%/ora ......
oracle ÖУ¬¶ÔÓÚÒ»¸öÌá½»µÄsqlÓï¾ä,´æÔÚÁ½ÖÖ¿ÉÑ¡µÄ½âÎö¹ý³Ì, Ò»ÖÖ½Ð×öÓ²½âÎö,Ò»ÖÖ½Ð×öÈí½âÎö.
Ò»¸öÓ²½âÎöÐèÒª¾½âÎö,Öƶ¨Ö´Ðз¾¶,ÓÅ»¯·ÃÎʼƻ®µÈÐí¶àµÄ²½Öè.Ó²½âÊͲ»½ö½öºÄ·Ñ´óÁ¿µÄcpu£¬¸üÖØÒªµÄÊÇ»áÕ¼¾ÝÖØÒªµÄÃÇãÅ£¨latch£©×ÊÔ´£¬ÑÏÖصÄÓ°ÏìϵͳµÄ¹æÄ£µÄÀ©´ó£¨¼´ÏÞÖÆÁËϵͳµÄ²¢·¢ÐУ©£¬ ¶øÇÒÒýÆðµÄÎÊÌâ ......