Tuesday, 15 November 2011

ADDM Report in Oracle 10g

 To generate a snap id with intervel:

sql>BEGIN DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS
           (retention => 10080,Interval => 15);END;

To check the intervels:

SQL> select * from dba_hist_wr_control;


DB Id             SNAP_INTERVAL      RETENTION             TOPNSQL
4195071208    +00000 01:00:00.0      +00007 00:00:00.0      DEFAULT

 
Listout generated snap id's with begin & end time intervals:

sql>SELECT snap_id, begin_interval_time, end_interval_time FROM dba_hist_snapshot ORDER BY 1;

Snap Id        BEGIN_INTERVAL_TIME           END_INTERVAL_TIME
    "                          "                "                                  "               "
    "                          "                "                                  "               "
10516         14-NOV-11 11.00.41.374 PM       15-NOV-11 12.00.46.449 AM
10517         15-NOV-11 12.00.46.449 AM       15-NOV-11 01.00.15.087 AM
10517         15-NOV-11 12.00.46.514 AM       15-NOV-11 01.00.15.019 AM
10518         15-NOV-11 01.00.15.087 AM       15-NOV-11 02.00.24.045 AM
10518         15-NOV-11 01.00.15.019 AM       15-NOV-11 02.00.23.991 AM
10519         15-NOV-11 02.00.23.991 AM       15-NOV-11 03.00.34.669 AM
10519         15-NOV-11 02.00.24.045 AM       15-NOV-11 03.00.34.739 AM
10520         15-NOV-11 03.00.34.739 AM       15-NOV-11 04.00.07.950 AM
10520         15-NOV-11 03.00.34.669 AM       15-NOV-11 04.00.07.999 AM

To take ADDM report:

Run the below script:
 
SQL>@$ORACLE_HOME/rdbms/admin/addmrpt.sql


Output like ...
Instance      DB_Name      Snap_Id      Snap_Started               Level
P0158X2     P0158X          10524        15 Nov 2011 08:00           1
                                       10525        15 Nov 2011 09:00           1
                                       10526        15 Nov 2011 10:00           1
                                       10527        15 Nov 2011 11:00           1

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:________________

No comments:

Post a Comment