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
Ïà¹ØÎĵµ£º
select * from (select t.*,rownum rn from (select * from emp) t where rownum<=10) where rn>=6;
´´½¨·ÖÒ³½á¹û¼¯µÄÓαê
create or replace package fenyepackage as
type testcursor is ref cursor;
end fenyepackage;
´´½¨·ÖÒ³´æ´¢¹ý³Ì
create or replace procedure fenye3(
tableName varchar2, --±íÃû
......
Ò»¡¢Ð½¨databack.shÎļþ£¬´æ·ÅĿ¼/opt/databack/
#Êý¾Ý¿âÓû§×ÊÁÏ
USERNAME=Êý¾Ý¿âÓû§Ãû(ÐÅÏ¢Òþ²Ø)
PASSWORD=Êý¾Ý¿âÃÜÂë(ÐÅÏ¢Òþ²Ø)
#FTP·þÎñÆ÷ÐÅÏ¢
FTP_SERV=FTP·þÎñÆ÷(ÐÅÏ¢Òþ²Ø)
FTP_USER=FTPÓû§Ãû(ÐÅÏ¢Òþ²Ø)
FTP_PASS=FTPÃÜÂë(ÐÅÏ¢Òþ²Ø)
FTP_DIR=FTPĿ¼(ÐÅÏ¢Òþ²Ø)
#±¸·ÝĿ¼
BACKUP_DIR=/opt/databack
#¸ ......
ÔÚOracleÖн¨¿â£¬Í¨³£ÓÐÁ½ÖÖ·½·¨¡£Ò»ÊÇʹÓÃOracleµÄ½¨¿â¹¤
ÇÒDBCA£¬ÕâÊÇÒ»¸öͼÐνçÃ湤ÇÒ£¬Ê¹ÓÃÆðÀ´·½±ãÇÒºÜÈÝÒ×Àí½â£¬ÒòΪËüµÄ½çÃæÓѺá¢ÃÀ¹Û£¬¶øÇÒÌáʾҲ±È½ÏÆëÈ«¡£ÔÚ£×indowsϵͳÖУ¬Õâ¸ö¹¤¾ß¿ÉÒÔÔÚOracle³ÌÐò×éÖдò¿ª£¨”¿ªÊ¼”—“³ÌÐò”—“ Oracle OraDb10g_home1”&mdash ......
¡¾IT168¼¼ÊõÎĵµ¡¿
DATA GUARDµÄ×îÖ÷ÒªµÄ¹¦ÄÜÊÇÈßÔÖ¡£µ±È»¸ù¾ÝÅäÖõIJ»Í¬£¬DATA GUARD»¹¿ÉÒԾ߱¸ÒÔÏÂÌص㣺¸ß¿ÉÓá¢ÐÔÄÜÌáÉý¡¢Êý¾Ý±£»¤ÒÔ¼°¹ÊÕϻָ´µÈ¡£
DATA GUARD¿ÉÒÔ·ÖΪÎïÀíSTANDBYºÍÂß¼STANDBYÁ½ÖÖ¡£¶þÕßµÄ×î´ó²î±ðÔÚÓÚ£¬ÎïÀíSTANDBYÓ¦ÓõÄÊÇÖ÷¿âµÄ¹éµµÈÕÖ¾£¬¶ø ......
OracleϵÁУºÍ¼Æ¬µÄ´æ´¢
Ò»£ºÊ²Ã´ÊÇ´ó¶ÔÏ󣬴ó¶ÔÏó»ù±¾²Ù×÷£¿
²Î¼ûÎÒµÄBLOG£ºOracleϵÁУºLOB´ó¶ÔÏó´¦Àí
http://blog.csdn.net/qfs_v/archive/2008/05/21/2464599.aspx
¶þ£¬Í¼Æ¬µÄ´æ´¢»ò¶þ½øÖÆÎļþµÄ´æ´¢
1£¬ÏȲåÈëÆÕͨÊý¾Ý£¬Óöµ½´ó¶ÔÏóÁÐʹÓÃempty_blob()¹¹Ôì¿ÕµÄÖ¸Õë¡£
Àý× ......