使用shell定制addm脚本
作者:网络转载 发布时间:[ 2014/12/22 11:58:11 ] 推荐标签:数据库 shell
我们来查看一下在这个时间段对应的快照情况
> ksh showsnap.sh 20141218 10 11
Current Instance
~~~~~~~~~~~~~~~~
DBID DB_NAME INST_NUM INST_NAME
---------- --------- ---------- ----------------
3100077577 CUST01 1 CUST01
DB_NAME SNAP_ID SNAPDAT LVL
--------- ---------- ----------------- ----------
CUST01 24021 18 Dec 2014 09:00 1
24022 18 Dec 2014 09:10 1
24023 18 Dec 2014 09:20 1
24024 18 Dec 2014 09:30 1
24025 18 Dec 2014 09:40 1
24026 18 Dec 2014 09:50 1
24027 18 Dec 2014 10:00 1
24028 18 Dec 2014 10:10 1
24029 18 Dec 2014 10:20 1
24030 18 Dec 2014 10:30 1
24031 18 Dec 2014 10:40 1
24032 18 Dec 2014 10:50 1
24033 18 Dec 2014 11:00 1
24034 18 Dec 2014 11:10 1
24035 18 Dec 2014 11:20 1
24036 18 Dec 2014 11:30 1
24037 18 Dec 2014 11:40 1
24038 18 Dec 2014 11:50 1
24039 18 Dec 2014 12:00 1
24040 18 Dec 2014 12:10 1
24041 18 Dec 2014 12:20 1
24042 18 Dec 2014 12:30 1
24043 18 Dec 2014 12:40 1
24044 18 Dec 2014 12:50 1
比如我们选择24030和24031两个快照,可以使用如下的方式来生成addm报告。
ksh genaddmrpt.sh 24030 24031
*******************************************
ADDM_TASK_XXXXX_24030_24031
*******************************************
PL/SQL procedure successfully completed.
Generating the ADDM report for this analysis ...
ADDM Report for Task 'ADDM_TASK_XXXXX_24030_24031'
----------------------------------------------------
Analysis Period
---------------
AWR snapshot range from 24030 to 24031.
Time period starts at Dec 2014 10:30 AM
Time period ends at Dec 2014 10:40 AM
Analysis Target
---------------
Database 'XXXXX' with DB ID 3100077577 .
Database version 11.2.0.2.0.
Analysis was requested for all instances, but ADDM analyzed instance xxxx,
numbered 1 and hosted at xxxxx.
See the "Additional Information" section for more information on the requested
instances.

sales@spasvo.com