Oracle AWR ½éÉÜ
Oracle Database 10g ÌṩÁËÒ»¸öÏÔÖø¸Ä½øµÄ¹¤¾ß£º×Ô¶¯¹¤×÷¸ºÔØÐÅÏ¢¿â (AWR:Automatic Workload Repository)¡£Oracle ½¨ÒéÓû§ÓÃÕâ¸öÈ¡´ú Statspack¡£AWR ʵÖÊÉÏÊÇÒ»¸ö Oracle µÄÄÚÖù¤¾ß£¬Ëü²É¼¯ÓëÐÔÄÜÏà¹ØµÄͳ¼ÆÊý¾Ý£¬²¢´ÓÄÇЩͳ¼ÆÊý¾ÝÖе¼³öÐÔÄÜÁ¿¶È£¬ÒÔ¸ú×ÙDZÔÚµÄÎÊÌâ¡£Óë Statspack ²»Í¬£¬¿ìÕÕÓÉÒ»¸ö³ÆÎª MMON µÄеĺǫ́½ø³Ì¼°Æä´Ó½ø³Ì×Ô¶¯µØÃ¿Ð¡Ê±²É¼¯Ò»´Î¡£ÎªÁ˽ÚÊ¡¿Õ¼ä£¬²É¼¯µÄÊý¾ÝÔÚ 7 Ììºó×Ô¶¯Çå³ý¡£¿ìÕÕÆµÂʺͱ£Áôʱ¼ä¶¼¿ÉÒÔÓÉÓû§Ð޸ġ£Ëü²úÉúÁ½ÖÖÀàÐ͵ÄÊä³ö£ºÎı¾¸ñʽ£¨ÀàËÆÓÚ Statspack ±¨±íµÄÎı¾¸ñʽµ«À´×ÔÓÚ AWR ÐÅÏ¢¿â£©ºÍĬÈ쵀 HTML ¸ñʽ£¨ÓµÓе½²¿·ÖºÍ×Ó²¿·ÖµÄËùÓг¬Á´½Ó£©£¬´Ó¶øÌṩÁ˷dz£Óû§ÓѺõı¨±í¡£
AWR ʹÓü¸¸ö±íÀ´´æ´¢²É¼¯µÄͳ¼ÆÊý¾Ý£¬ËùÓÐµÄ±í¶¼´æ´¢ÔÚеÄÃû³ÆÎª SYSAUX µÄÌØ¶¨±í¿Õ¼äÖÐµÄ SYS ģʽÏ£¬²¢ÇÒÒÔ WRM$_* ºÍ WRH$_* µÄ¸ñʽÃüÃû¡£Ç°Ò»ÖÖÀàÐÍ´æ´¢ÔªÊý¾ÝÐÅÏ¢£¨Èç¼ì²éµÄÊý¾Ý¿âºÍ²É¼¯µÄ¿ìÕÕ£©£¬ºóÒ»ÖÖÀàÐͱ£´æÊµ¼Ê²É¼¯µÄͳ¼ÆÊý¾Ý¡£H ´ú±í“ÀúÊ·Êý¾Ý (historical)”¶ø M ´ú±í“ÔªÊý¾Ý (metadata)”¡£ÔÚÕâЩ±íÉϹ¹½¨Á˼¸ÖÖ´øÇ°×º DBA_HIST_ µÄÊÓͼ£¬ÕâЩÊÓͼ¿ÉÒÔÓÃÀ´±àдÄú×Ô¼ºµÄÐÔÄÜÕï¶Ï¹¤¾ß¡£ÊÓͼµÄÃû³ÆÖ±½ÓÓë±íÏà¹Ø£»ÀýÈ磬ÊÓͼ DBA_HIST_SYSMETRIC_SUMMARY ÊÇÔÚWRH$_SYSMETRIC_SUMMARY ±íÉϹ¹½¨µÄ¡£
Ò». AWRʹÓÃ
SQL>@?/rdbms/admin/awrrpt.sql
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
ÊäÈë report_type µÄÖµ:
Type Specified: html
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
ÊäÈë num_days µÄÖµ: 1
Listing the last day's Completed Snapshots
Ïà¹ØÎĵµ£º
oracle ÖУ¬¶ÔÓÚÒ»¸öÌá½»µÄsqlÓï¾ä,´æÔÚÁ½ÖÖ¿ÉÑ¡µÄ½âÎö¹ý³Ì, Ò»ÖÖ½Ð×öÓ²½âÎö,Ò»ÖÖ½Ð×öÈí½âÎö.
Ò»¸öÓ²½âÎöÐèÒª¾½âÎö,ÖÆ¶¨Ö´Ðз¾¶,ÓÅ»¯·ÃÎʼƻ®µÈÐí¶àµÄ²½Öè.Ó²½âÊͲ»½ö½öºÄ·Ñ´óÁ¿µÄcpu£¬¸üÖØÒªµÄÊÇ»áÕ¼¾ÝÖØÒªµÄÃÇãÅ£¨latch£©×ÊÔ´£¬ÑÏÖØµÄÓ°ÏìϵͳµÄ¹æÄ£µÄÀ©´ó£¨¼´ÏÞÖÆÁËϵͳµÄ²¢·¢ÐУ©£¬ ¶øÇÒÒýÆðµÄÎÊÌâ ......
Èç¹ûweb·½Ê½µÄem£¬isqlplus·ÃÎʲ»ÁË¡£
1. ¼ì²éÖ÷»úÃû/IP¡¢¶Ë¿ÚÊÇ·ñÕýÈ·
°²×°Ê±µÄÖ÷»úÃû/IP¡¢¶Ë¿Ú¼Ç¼ÔÚ$ORACLE_HOME/install/portlist.ini ÎļþÖС£
ȱʡÊÇ£º
Ò»°ãÓû§ http://ip:5560/isqlplus
DBAÓû§ &nb ......
OracleϵÁУºÍ¼Æ¬µÄ´æ´¢
Ò»£ºÊ²Ã´ÊÇ´ó¶ÔÏ󣬴ó¶ÔÏó»ù±¾²Ù×÷£¿
²Î¼ûÎÒµÄBLOG£ºOracleϵÁУºLOB´ó¶ÔÏó´¦Àí
http://blog.csdn.net/qfs_v/archive/2008/05/21/2464599.aspx
¶þ£¬Í¼Æ¬µÄ´æ´¢»ò¶þ½øÖÆÎļþµÄ´æ´¢
1£¬ÏȲåÈëÆÕͨÊý¾Ý£¬Óöµ½´ó¶ÔÏóÁÐʹÓÃempty_blob()¹¹Ôì¿ÕµÄÖ¸Õë¡£
Àý× ......
1. ²éѯÊý¾Ý¿âÏÖÔڵıí¿Õ¼ä
select tablespace_name, file_name, sum(bytes)/1024/1024 table_size from dba_data_files group by tablespace_name,file_name;
2. ½¨Á¢±í¿Õ¼ä
CREATE TABLESPACE data01 DATAFILE '/oracle/ ......