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

Oracle AWRËÙ²é

 SQL> SQLPLUS / AS SYSDBA
SQL> exec dbms_workload_repository.create_snapshot
SQL> exec:snap_id:=dbms_workload_repository.create_snapshot
SQL> var snap_id number
SQL> print snap_id
SQL> @?/rdbms/admin/awrrpt.sql
OracleAWRËÙ²é
 
1.²é¿´µ±Ç°µÄAWR±£´æ²ßÂÔ
select * from dba_hist_wr_control;
DBID,SNAP_INTERVAL,RETENTION,TOPNSQL
860524039,+00 01:00:00.000000,+07 00:00:00.000000,DEFAULT
ÒÔÉϽá¹û±íʾ,ÿСʱ²úÉúÒ»¸öSNAPSHOT£¬±£Áô7Ìì
 
2.µ÷ÕûAWRÅäÖÃ
AWRÅäÖö¼ÊÇͨ¹ýdbms_workload_repository°ü½øÐÐÅäÖÃ
 
2.1µ÷ÕûAWR²úÉúsnapshotµÄƵÂʺͱ£Áô²ßÂÔ£¬È磺È罫ÊÕ¼¯¼ä¸ôʱ¼ä¸ÄΪ30 ·ÖÖÓÒ»´Î¡£²¢ÇÒ±£Áô5Ììʱ¼ä£¨×¢£ºµ¥Î»¶¼ÊÇΪ·ÖÖÓ£©£º
exec dbms_workload_repository.modify_snapshot_settings(interval=>30, retention=>5*24*60);
 
2.2¹Ø±ÕAWR,°ÑintervalÉèΪ0Ôò¹Ø±Õ×Ô¶¯²¶×½¿ìÕÕ
exec dbms_workload_repository.modify_snapshot_settings(interval=>0, retention=>5*24*60);
 
2.3ÊÖ¹¤´´½¨Ò»¸ö¿ìÕÕ
exec DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
 
2.4 ²é¿´¿ìÕÕ
select * from sys.wrh$_active_session_history
 
2.5ÊÖ¹¤É¾³ýÖ¸¶¨·¶Î§µÄ¿ìÕÕ
exec WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE(low_snap_id => 22, high_snap_id => 32, dbid => 3310949047);
 
2.6´´½¨baseline
exec dbms_workload_repository.create_baseline (56,59,'apply_interest_1')
 
2.7ɾ³ýbaseline
exec DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE(baseline_name => ' apply_interest_1', cascade => FALSE);
 
3.Éú²úAWR±¨¸æ
@$ORACLE_HOME/rdbms/admin/awrrpt.sql
°´Õսű¾Ìáʾ£¬ÒÀ´ÎÑ¡Ôñ±¨¸æÀàÐÍ£¬±¨¸æͳ¼ÆÌìÊý£¬ÒÔ¼°¿ªÊ¼Í³¼Æ£¬½áÊøͳ¼ÆµÄ¿ìÕÕ±àºÅ¡£
ÈçÏ£º
µ¼³öÎļþλÖÃÔÚsqlplusÖ´ÐÐʱËùÔÚĿ¼¡£


Ïà¹ØÎĵµ£º

С²ËÄñÎÊ£ºoracleÖеÄÒ»¸ö´¥·¢Æ÷ÎÊÌâ

ÎÊÌâ
£¨1£©±íemployeesºÍdepartment´æÔÚ²ÎÕÕÍêÕûÐÔÔ¼Êø£¬ÔÚ±íemployeesÖвåÈë¼Ç¼£¨‘70’£¬‘999’£©department_idΪ‘999’ʱ£¬department±íÖл¹²»´æÔÚdepartment_idΪ‘999’µÄ¼Ç¼£¬ËùÒÔÎ¥±³Á˲ÎÕÕÍêÕûÐÔÔ¼Êø,³öÏÖ“Integrity constraint violation error”ÌáʾÐÅÏ ......

Oracle JOB Ó÷¨Ð¡½á£¨×ªÔØ£©

 Oracle JOB Ó÷¨Ð¡½á
Ò»¡¢ÉèÖóõʼ»¯²ÎÊý job_queue_processes
¡¡¡¡sql> alter system set job_queue_processes=n;£¨n>0£©
¡¡¡¡job_queue_processes×î´óֵΪ1000
¡¡¡¡
¡¡¡¡²é¿´job queue ºǫ́½ø³Ì
¡¡¡¡sql>select name,description from v$bgprocess;
¡¡¡¡
¡¡¡¡¶þ£¬dbms_job package Ó÷¨½éÉÜ
¡¡¡¡ ......

Oracle ¾Û¼¯

http://blog.csdn.net/junmail/archive/2009/07/29/4392264.aspx
 ¾Û¼¯(cluster)ÊÇ´æ´¢±íÊý¾ÝµÄ¿ÉÑ¡ÔñµÄ·½·¨¡£Ò»¸ö¾Û¼¯ÊÇÒ»×é±í£¬½«¾ßÓÐͬһ¹«¹²ÁÐÖµµÄÐд洢ÔÚÒ»Æ𣬲¢ÇÒËüÃǾ­³£Ò»ÆðʹÓá£ÕâЩ¹«¹²Áй¹³É¾Û¼¯Âë¡£
 
¾­³£±»Í¬Ê±·ÃÎʵıíÔÚÎïÀíλÖÃÉÏ¿ÉÒÔ´æ´¢ÔÚÒ»Æð¡£ÎªÁ˽«ËüÃÇ´æ´¢ÔÚÒ»Æ𣬾ÍÒª´´½¨Ò»¸ö´Ø( c ......

Oracle ¾Û¼¯

¾Û¼¯(cluster)ÊÇ´æ´¢±íÊý¾ÝµÄ¿ÉÑ¡ÔñµÄ·½·¨¡£Ò»¸ö¾Û¼¯ÊÇÒ»×é±í£¬½«¾ßÓÐͬһ¹«¹²ÁÐÖµµÄÐд洢ÔÚÒ»Æ𣬲¢ÇÒËüÃǾ­³£Ò»ÆðʹÓá£ÕâЩ¹«¹²Áй¹³É¾Û¼¯Âë¡£
¾­³£±»Í¬Ê±·ÃÎʵıíÔÚÎïÀíλÖÃÉÏ¿ÉÒÔ´æ´¢ÔÚÒ»Æð¡£ÎªÁ˽«ËüÃÇ´æ´¢ÔÚÒ»Æ𣬾ÍÒª´´½¨Ò»¸ö´Ø( c l u s t e r )À´¹ÜÀíÕâЩ±í¡£±íÖеÄÊý¾ÝÒ»Æð´æ´¢ÔÚ´ØÖУ¬´Ó¶ø×îС»¯±ØÐëÖ´ÐеÄI ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ