Generate AWR report

Hi All,
DB - 10.2.0.4.0
I ned to generate AWR report for 30 minute time intervel. For expample, if I need to generate AWR report for the timmig 03:00 PM to 03:30 PM, DO I need to create snapshot manually at 3 pm and 3:30 pm.
exec dbms_workload_repository.create_snapshot(); at 03:00 PM
exec dbms_workload_repository.create_snapshot(); at 03:30 PM
Also, is there any way, if the current time is 01:00 pm and can we create snapshot for 03:00PM and 03:30 PM?
hare krishna

Hi Hare,
http://www.dba-oracle.com/oracle10g_tuning/t_generating_awr_report.htm
The final AWR report can be built by using the PL/SQL API provided in the dbms_workload_repository package.
Two procedures that generate AWR reports are awr_report_text and awr_report_html . These procedures generate the AWR report for the specified snapshot range in TEXT or HTML formats, respectively. The following script shows one way of retrieving the AWR text report for the particular snapshot range:
SELECT
output
FROM
TABLE
(dbms_workload_repository.awr_report_text
(37933856,1,2900,2911 )
If you want complete working scripts to generate AWR reports, I have them in the code depot of my Oracle Tuning book:
http://www.rampant-books.com/t_oracle_tuning_book.htm
Hope this helps . . .
Donald K. Burleson
Oracle Press author

Similar Messages

  • Steps to generate AWR report from Oracle 11g OEM

    I have gone through online documentation for generating an AWR report from Oracle 11g OEM but the documentation is more focused on generating the AWR report manually. I would request if there is a link or documentation to go through for generating AWR report from Oracle 11g enterprise manager.
    I hope my question is clear.
    Please revert with the reply to my query.
    Regards

    HI ,
    Please check following link: Siva Oracle: How to generate AWR Report from OEM Grid
    Thank you

  • Generate AWR Report automatically every day

    Hi Friends,
    I would like to generate AWR Report automatically every day. How do i do it.
    The Start Time will be 00:00 of Previous day and the end Time will be : 00:00 of current day. The File format is html.
    Currently i am using awrrpt.sql to generate report manually and i would like to achieve it automatically,I am not sure how to pass the values of start and end time (From which table i can get the values)?
    Regards,
    DB

    Hi, DB.
    You may use the below sql script , the sql script generates the AWR report for the duration of 2 days in HTML.
    So you  change
    1) the where condition as per your requirement,
    2) report name in sql script,
    3) and convert it as shell or bat script based on your environment, and schedule it in your OS job scheduler / crontab.
    =-=-=-=-
    connect / as sysdba
    REM set termout off
    variable snap1 number
    variable snap2 number
    COLUMN starthr new_value bhr
    COLUMN endhr new_value ehr
    COLUMN crdate new_value cdt
    begin
    select
      distinct  min(s.snap_id)
    into :snap1
      from dba_hist_snapshot s
    where to_char(trunc(end_interval_time,'HH24'),'HH24') = to_char(trunc(sysdate,'HH24'),'HH24')-2 and trunc(end_interval_time)=trunc(sysdate);
    select
      distinct max(s.snap_id)
    into :snap2
      from dba_hist_snapshot s
    where to_char(trunc(end_interval_time,'HH24'),'HH24') =to_char(trunc(sysdate,'HH24'),'HH24') and trunc(end_interval_time)=trunc(sysdate);
    end;
    COLUMN starthr new_value bhr
    COLUMN endhr new_value ehr
    COLUMN crdate new_value cdt
    select to_char(trunc(sysdate, 'HH24'),'HH24')-2 starthr,
            to_char(trunc(sysdate, 'HH24'),'HH24') endhr,
           to_char(trunc(sysdate),'DD-MON-YYYY') crdate
    from dual;
    define begin_snap=:snap1
    define end_snap=:snap2
    define report_name=/orashare1/reports/awrreport/AWRRPT_PROD_1_${1^^}_${EXDATE}_mor.html
    define  report_type  = 'html';
    @@?/rdbms/admin/awrrpt.sql
    exit

  • DBACockpit - Generate AWR reports not visible

    Hello,
    i have read the "SAP on Oracle Development Update":
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a07754d4-edd4-2910-0683-c9473aaeca51
    On page page 27 is a screenshot of the possibility to generate AWR reports out of DBACOCKPIT.
    I have an ABAP system on SAP_BASIS 7.00 with Patchlevel 15 (SAPKB70015) but i can not see this menu option. I only have the "Active Session History" but no "Workload Reporting".
    As described in sapnote #1028068 the monitored database is a local one and the licenses are purchased by SAP. The note also describes that the function should be available with SP12.
    What's wrong? Have you already checked your system for this point?
    Regards
    Stefan

    Hello Stefan, Hello Bill,
    we had the same problem. In 7.00 SP12 you can select the option, in SP15 it is not visible. We opened a customer message and were told, that there were some irritations arount the license of Oracle Diagnostic Pack, so SAP deactivated it in DBACOCKPIT/SP15. This is no problem any longer (note 1028068).
    In later SPs you can set an option (have look at note 1136582 / 1250596), but in SP15 you have to modify the source code. Unfortunately SAP isn't able to ship this via snote. In this case it might be better to open a customer message to get a detailed information.
    Regards
    Andreas

  • Error While Generating AWR reports

    Hi All,
    I am new to Oracle 10g. Whenever I try to run the AWR report using awrrpt.sql script I am getting below error messages. I am running this script as SYS user. Please help to generate the AWR reports. Thanks for the help in advance.
    Specify the Report Name
    ~~~~~~~~~~~~~~~~~~~~~~~
    The default report file name is awrrpt_1_22128_22131.html. To use this name,
    press <return> to continue, otherwise enter an alternative.
    Enter value for report_name: awrrpt_test.html
    Using the report name awrrpt_test.html
    select output from table(dbms_workload_repository.awr_report_html( :dbid,
    ERROR at line 1:
    ORA-04063: package body "SYS.DBMS_SWRF_REPORT_INTERNAL" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SWRF_REPORT_INTERNAL"
    ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 309
    ORA-06512: at line 1
    Regards,
    Nanaiah

    Hi,
    When i tried to compile below packages. It gave 'Warning: Package altered with compilation errors.' message for both.
    DBMS_SWRF_REPORT_INTERNAL
    DBMS_SWRF_INTERNAL
    Again i came back to original position. Now again all 4 objects are in INVALID state. Please advice.
    Regards

  • How to generate AWR report by using ttStats?

    Hi all,are there any links or documents to show how to use ttStats toolkit to generate a report like Oracle AWR report?
    If no links or document available, could you tell me how to use it?
    In fact I want to know how to do a performance analysis for my application and perform some tune.
    If any other toolkits are more suitable please let me know and of course the guide that how to use them is much welcome.
    Thanks.

    The ttStats executable can be found in the <TimesTen_home>/support directory. Before you can run the executable within a command prompt, you'll need to source the ttenv.* file in the <TimesTen_home>/bin directory.
    The output of ttStats -h is as follows:
    ttStats [-latchstats on|off] [-display-options] [-xml file]
    [-statlevel level] <dsn or connstr>
    ttStats -s[napshot] [-latchstats on|off] -xml <file> <dsn or connstr>
    ttStats -report <xmlfile1> <xmlfile2> <-text|-html> <report_file>
    Where parameters in <> are required, and in [] are optional.
    -display-options:
    This option only works in monitoring mode as
    screen filtering. ttStats only displays on the
    screen statistics with specified prefixes.
    Available prefix options include:
    -cg, -ckpt, -conn, -db, -grid, -lock, -log, -repl,
    -stmt, -txn, -xla, -zz, where the naming of prefixes
    conforms to naming of statistics in TimesTen
    sys.systemstats table. If no display option
    is specified, all statistics are displayed
    by default. For example, run command
    ttStats -cg -stmt dsn=TptbmData
    to display only cache group and statement
    related statistics.
    -h[elp] Print help message and exit.
    -interval <secs> Collect a set of statistics every <secs> seconds
    (default=10).
    Note: setting this lower can negatively impact
    performance
    -xml <file> Write statistics to <file> in XML format. All
    statistics will be written to <file> no matter
    whether they are displayed on screen or not.
    For example ttStats -xml mon.xml dsn=TptbmData
    and ttStats -xml mon.xml -cg dsn=TptbmData
    write the same file even if the latter only
    shows cache related statistics on the screen.
    -snapshot One snapshot of all statistics are saved to disk
    in the specified file format, then the program
    exits. This option should be used together with
    the -xml option.
    -statlevel <level>
    Set the SysStats level, this value of level only
    applies to sys.systemstats table.
    -report <xmlfile1> <xmlfile2> <-xml|-text|-html> <report_file>
    Compare two snapshots, and generate an AWR like
    report. At present, each XML file contains only
    one snapshot. The difference is computed as the
    absolute value of statistic value in <xmlfile2>
    minus that in <xmlfile1>. The result can be
    written in HTML and plain text formats. XML is
    not supported as output format at present.
    As an example, you can run the utility as the instance admin user by doing something like:
    ./ttStats -s -xml tmp.xml <DSN>
    You can then open tmp.xml with a web browser and see statistics about the database.
    You can also compare two previously captured snaps by doing something like:
    ./ttStats -report tmp1.xml tmp2.xml -html tmpReport.html

  • Generating AWR reports

    I need to generate many AWR reports everyday with the same time period each time.
    09h00 to 09h15
    11h00 to 11h15
    14h00 to 14h15
    16h00 to 16h15
    Is there a way to generate those reports automatically with parameters?

    783643 wrote:
    I need to generate many AWR reports everyday with the same time period each time.
    09h00 to 09h15
    11h00 to 11h15
    14h00 to 14h15
    16h00 to 16h15
    Is there a way to generate those reports automatically with parameters?
    Rem      If you want to use this script in an non-interactive fashion,
    Rem      see the 'customer-customizable report settings' section in
    Rem      awrrpti.sql

  • Cannot generate AWR/ADDM reports in Oracle 10g

    Hi,
    We are running 10.2.0.3.0 and troublshooted the performance problem for some queries. But when tried to run AWR/ADDM reports from OEM and got the following messages:
    Insufficient Data in Interval. For displaying data on this page, two historical snapshots are needed. Make sure that two snapshots are present in the target database instance. In addition modify the interval so that it is contained within two available snapshots
    I checked the scheduled jobs in this DB,
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Oracle Label Security and Data Mining options
    SQL> select JOB_NAME from dba_scheduler_jobs;
    JOB_NAME
    PURGE_LOG
    FGR$AUTOPURGE_JOB
    GATHER_STATS_JOB
    AUTO_SPACE_ADVISOR_JOB
    Has anyone anyidea why AWR/ADDM reports cannot be run? Thanks
    Liz

    Hi,
    If you want you can execute snapshot at your required time as suggested by people.
    However Oracle 10g by default take snap at every one hour.
    To check
    select snap_id, to_char(BEGIN_INTERVAL_TIME,'DD-MON-YYYY HH24:MI') BEGIN_INTERVAL_TIME,
    to_char(END_INTERVAL_TIME,'DD-MON-YYYY HH24:MI') END_INTERVAL_TIME
    from dba_hist_snapshot
    You can generate AWR Report by executing following SQL, Connect as SYS
    SQL> @$ORACLE_HOME/rdbms/admin/awrrpt.sql
    Input required details it asks, you can get AWR report in HTML or text format.
    ADDM Report:
    @$ORACLE_HOME/rdbms/admin/addmrpt.sql

  • What to Check in AWR Report

    Hi All,
    Not very much experienced in performance tunning that why need your help, i generate AWR report for different times what to check, i started with top 5 events and trying to understand the portion of the report. Can anyone help me to understand the same
    In case if AWR requires for the 3 snap shot i will provide the same

    Hi,
    If you have a performance issue on your system look for causes of that performance issue in the AWR. eg. compare the awr report for the period with bad performance with that of a one taken when performance was good. AWR taken during bad time would have "things" that weren't in the awr taken when performance was good or have "high values" for some "things". Start from that point and drill down.
    If you don't have performance issues then confirm everything is running as it shoud be. Compare several awr reports and there shoulnd't me "anything" out of the ordinary.
    You can start with
    Instance Efficiency Percentages (Target 100%)
    Top 5 Timed Foreground Events
    Time Model Statistics
    There are no hard and fast rules as to how you go about interpreting an awr. It depends on type of problem you have, your system, your applicaiton, time of day etc.
    http://www.dba-oracle.com/t_rac_statspack_awr_report_tips.htm

  • How to take awr report

    A little confused in generating awr report using awrrpt.sql
    Here are the snapshots we have in the repository.
    8257 13 Nov 2013 02:00 
    1
    8258 13 Nov 2013 02:30 
    1
    8259 13 Nov 2013 03:00 
    1
    8260 13 Nov 2013 03:30 
    1
    8261 13 Nov 2013 04:00 
    1
    8262 13 Nov 2013 04:30 
    1
    And the test run we'd was between 2:15 to 3:45.  which snapshots should we choose as the begin snap ID and end snap ID.
    I got this question when i saw how the snapshots were taken like snap ID 8258
      SNAP_ID BEGIN_INTERVAL_TIME       
    END_INTERVAL_TIME
    8258 13-NOV-13 02.00.19.314 AM 
    13-NOV-13 02.30.23.284 AM
    where i was going to select 8257 as the begin snap ID.
    Which snap IDs makes more sense for the time window of 2:15 to 3:45 ?
    Thanks
    Siva.

    It seems you are confused by BEGIN_INTERVAL_TIME (you can look on this column as orientation for the interval, begin/end) and END_INTERVAL_TIME.
    END_INTERVAL_TIME is the time when the snapshot is taken,
    In your case:
      SNAP_ID BEGIN_INTERVAL_TIME  
    END_INTERVAL_TIME
    8258 13-NOV-13 02.00.19.314 AM
    13-NOV-13 02.30.23.284 AM
    So,
    SNAP_ID = 8258 with BEGIN_INTERVAL_TIME = 02.00.19.314 AM
    If you check previous SNAP_ID = 8257, that snap will have END_INTERVAL_TIME = 02.00.19.314 AM
    Taking a snapshot doesn't last 30 min. If you need to know how much time the database spent to take the snapshot you can query FLUSH_ELAPSED column from DBA_HIST_SNAPSHOT.
    I.Arsov
    Message was edited by: IvicaArsov

  • Automatic generation of AWR reports

    Hi,
    How to schedule the automatic JOB to generate the AWR reports hourly basis. ( automatic comparing between 2 snapshots and then generate the text file).
    Thanks in advance.

    Hi,
    If you want the report to be send to your mail through the ORACLE ENTERPRISE MANAGER than you have to write one perl script like below: Adjust statements and addresses as per your requirement.
    The main views are:
    dba_hist_snapshot & dba_hist_thread which are helping us in doing this.
    Hope I answered your question
    autoawr.pl :
    # My perl script for automatically generating awr report
    # By default, report is sent to DBA_EMAIL_LIST_RPT, unless
    # it's overridden by ORA_SP_EMAIL_LIST_RPT
    # 05/26/2006 - Changed snap level from 5 to 6
    # exec statspack.snap(i_snap_level => 6, i_modify_parameter => 'true');
    # NOTES
    # FUTURE ENHANCEMENTS
    # MODIFICATIONS
    # $Log: spreport.pl,v $
    # Revision 1.4 2003/09/02 21:33:14 oracle
    # bugfix (instance_number)
    # Revision 1.3 2003/08/26 19:13:22 oracle
    # add ORA_SP_HACK1
    # Revision 1.2 2003/08/26 18:54:09 oracle
    # mod
    # Revision 1.1 2003/08/26 17:19:58 oracle
    # ic
    # ----------------------- main processing -------------------------------------
    # in case $0 is a full pathname, strip of the directory name
    $progname = $0;
    $progname =~ s/^.*\/// ;
    $progdir=$0;
    $progdir=~ s/\/[^\/]*$// ; if ($progdir eq $0) { $progdir='.'; }
    # set prog to equal progname minus file extension and the "."
    $prog=$progname;
    $prog =~ s/(.*)\..*$/\1/;
    $usage="Usage: $progname <dbname> [<report_begin_datetime in a format of '08/27/07 06:30'> <duration in minutes, at least 60>]\n" ;
    if ( $#ARGV < 0 )
    print $usage;
    exit 1;
    my @arglist=@ARGV;
    $dbname=$ARGV[0];
    shift;
    if ( $#ARGV > -1) {
    $report_user_specified_time="yes";
    # $report_begin_datetime="$ARGV[0] $ARGV[1]";
    $report_begin_date=$ARGV[0];
    $report_begin_time=$ARGV[1];
    $report_begin_datetime="$report_begin_date $report_begin_time";
    $report_duration=$ARGV[2];
    print "Boris: dbg> number of ARGV=$#ARGV, report_begin_datetime=$report_begin_datetime, report_duration=$report_duration\n";
    # print "Boris: dbg> UserSpecifiedTime=$report_user_specified_time\n";
    # ----------- PORTIBILITY: set envdir to the appropriate value
    $envdir=$progdir;
    $ENV{'ENV_FILE'}="$envdir/dba.env";
    $ENV{'APP_NAME'}=$dbname;
    # ----------- End of PORTIBILITY
    # initialize execution environ.
    require("$envdir/ld_env.pl");
    require("$envdir/ora_common.pl");
    $tm_start=`date`; chop $tm_start;
    $tm_stamp=`date "+%Y%m%d"`; chop $tm_stamp;
    $tm_stamp2=`date "+%Y%m%d_%H%M%S"`; chop $tm_stamp2;
    # $ENV{'LD_ENV_DEBUG'}=1;
    my $status=&ld_env;
    # set up log file. If for some reason it's no good, set log file to /dev/null
    $LOG_PREFIX="$ENV{'ORA_ADM_DIR'}/log/${prog}_${dbname}.log";
    $LOGFILE="${LOG_PREFIX}.${tm_stamp}";
    if (open(LOGFILE, ">>$LOGFILE") == 0)
    print "Cannot open log $LOGFILE; discard log info \n";
    open(LOGFILE, ">/dev/null");
    if ( $status != 0 )
    &abort($status, \*LOGFILE, "Failed to load environ: $LD_ENV_ERRMSG\n");
    my $work_dir=$ENV{'DBA_WORK_DIR'};
    if ($work_dir eq '') {
    abort_auto(2, "Env var DBA_WORK_DIR not defined\n");
    } else {
    $status=`mkdir -p $work_dir`;
    if ($status != 0) {
    abort_auto($status, "mkdir -p $work_dir failed\n");
    # ---- main processing
    $RPT_PREFIX1="$ENV{'ORA_ADM_DIR'}/log/awr_ash/awr_${dbname}.rpt";
    $RPTFILE1="${RPT_PREFIX1}.${tm_stamp2}";
    $RPT_PREFIX2="$ENV{'ORA_ADM_DIR'}/log/awr_ash/ash_${dbname}.rpt";
    $RPTFILE2="${RPT_PREFIX2}.${tm_stamp2}";
    #### no need for a special/"perfstat" connection: $ENV{'ORA_CNCT_STR'}=get_env2('ORA_SP_CNCT_STR', 'perfstat/perfstat');
    #### print "dbg> Connecting to the database as: $ENV{'ORA_CNCT_STR'}";
    my $days_minus = get_env2('ORA_SP_DAYS_MINUS', 1);
    ### To avoid "ORA-20200: The instance was shutdown between snapshots x1 and x2", ensure that dba_hist_snapshot.startup_time is the same for min(snap_id) and max(snap_id)
    ### To avoid "ORA-20200: End Snapshot Id y1 must be greater than Begin Snapshot Id y1", take reporting time interval between 5am and 5pm
    if ( $report_user_specified_time eq "yes") {
    $awr_begin_date=$report_begin_date;
    $awr_begin_time=$report_begin_time;
    print "Boris: dbg> awr_begin_date=$awr_begin_date, awr_end_date=$awr_end_date, awr_begin_time=$awr_begin_time, awr_end_time=calculated...\n";
    $fudge=5; # that's 5min
    $sql="
    select t.dbid, t.instance_number, min(s.snap_id), max(s.snap_id)
    from dba_hist_snapshot s, dba_hist_thread t
    where --
    trunc(s.end_interval_time) = trunc(to_date('$awr_begin_date', 'MM/DD/YY'))
    and to_char(s.end_interval_time+5/1440, 'HH24:MI') >= '$awr_begin_time'
    and to_char(s.end_interval_time, 'SSSSS') <= (to_number(substr('$awr_begin_time', 1, 2))*60 + to_number(substr('$awr_begin_time', 4,2)) + $report_duration +$fudge)*60
    and t.instance_number = sys_context('userenv', 'instance')
    and t.instance_number = s.instance_number
    and t.thread# = sys_context('userenv', 'instance')
    and t.snap_id = s.snap_id
    and t.dbid = s.dbid
    group by t.dbid, t.instance_number, s.startup_time
    order by t.dbid, t.instance_number, s.startup_time desc
    else {
    $awr_days_minus=$days_minus;
    $awr_begin_time=4;
    $awr_end_time=16;
    print "Boris: dbg> awr_days_minus=$awr_days_minus, awr_begin_time=$awr_begin_time, awr_end_time=$awr_end_time\n";
    $sql="
    select t.dbid, t.instance_number, min(s.snap_id), max(s.snap_id)
    from dba_hist_snapshot s, dba_hist_thread t
    where trunc(s.begin_interval_time)= trunc(sysdate - $awr_days_minus )
    and to_char(s.begin_interval_time, 'HH24') >= $awr_begin_time
    and to_char(s.begin_interval_time, 'HH24') <= $awr_end_time
    and t.instance_number = sys_context('userenv', 'instance')
    and t.instance_number = s.instance_number
    and t.thread# = sys_context('userenv', 'instance')
    and t.snap_id = s.snap_id
    and t.dbid = s.dbid
    group by t.dbid, t.instance_number, s.startup_time
    order by t.dbid, t.instance_number, s.startup_time desc
    my @output ;
    $status = run_query($sql, \@output);
    if ( $status == 0 )
    my $line = $output[0] ;
    my ($id_dbid, $id_inst_num, $id_min, $id_max) = split(' ', $line);
    print "Boris: dbg> Query output line=$line";
    if ( $id_min eq '' || $id_max eq '' )
    # not stats
    &tee_auto("Error: can't determine min=$id_min and/or max=$id_max snap_id, days_minus=$days_minus, dbid=$id_dbid, inst#=$id_inst_num)\n");
    exit;
    else
    &tee_auto("# generate sprpt for delta between snp_id '$id_min' and '$id_max' (days_minus='$days_minus')\n# f=$RPTFILE1\n");
    if ( $report_user_specified_time eq "yes") {
    $id_ash_begin_datetime="$report_begin_date $report_begin_time";
    $id_ash_duration=$report_duration;
    else {
    $id_ash_begin_datetime=`date --date yesterday "+%D 05:00"`; chop $id_ash_begin_datetime;
    $id_ash_duration=720; #mins: 12 hours (from 5am to 5pm)
    # print "Boris: dbg> id_ash_begin_datetime=$id_ash_begin_datetime, id_ash_duraton=$id_ash_duraton\n";
    $sql = "
    spool $RPTFILE1
    select systimestamp from dual;
    spool off
    run_sql("$sql");
    $sql = "
    define dbid=$id_dbid
    define inst_num=$id_inst_num
    define begin_snap=$id_min
    define end_snap=$id_max
    define report_type='text'
    define report_name=$RPTFILE1
    @?/rdbms/admin/awrrpti
    run_sql("$sql");
    $sql = "
    define dbid=$id_dbid
    define inst_num=$id_inst_num
    define report_type='text'
    define report_name=$RPTFILE2
    define begin_time='$id_ash_begin_datetime'
    -- define default_report_duration='$id_ash_duration'
    define duration=$id_ash_duration
    -- define duration=720
    -- define end_time='$id_ash_date_begin_5pm'
    define slot_width=''
    define target_session_id=''
    define target_sql_id=''
    define target_wait_class=''
    define target_service_hash=''
    define target_module_name=''
    define target_action_name=''
    define target_client_id=''
    define target_plsql_entry=''
    @?/rdbms/admin/ashrpti
    run_sql("$sql");
    ## Concantenate: cat $RPTFILE2 >> $RPTFILE1;
    open ( awr_report, ">>", $RPTFILE1 ) or die "Could not open for writing file $RPTFILE1: $!";
    open ( ash_report, "<", $RPTFILE2 ) or die "Could not open for reading file $RPTFILE2: $!";
    while ( my $line = <ash_report> ) { print awr_report $line; }
    # send report
    my $if_notify = 1;
    if ( $if_notify && -r $RPTFILE1 )
    if ($ENV{'ORA_SP_HACK1'} eq '1') {
    &tee_auto( "# detected ORA_SP_HACK1 -- hack the report a bit...\n");
    # prefix each line of report with '# ' to hack around
    # the problem with Exchange mail server interpreting
    # certain patterns as email attachements...
    my $ed = get_env2('ED', 'ed');
    $cmd="$ed $RPTFILE1 <<eof
    Best regards,
    Rafi
    http://rafioracledba.blogspot.com/

  • Unable to genereate AWR report

    HI Experts,
    I was unable to generate AWR report on my database..
    While generating i am getting below error..
    Enter value for report_name: awr_sggebpu1_1
    Using the report name awr_sggebpu1_1
    select output from table(dbms_workload_repository.awr_report_html( :dbid,
    ERROR at line 1:
    ORA-00904: : invalid identifier
    i am connecting as emp1 user to my database ORCL2.
    conn emp1/emp1@ORCL2 -- > Oracle version 10.2.0.5.0

    user11175946 wrote:
    HI Experts,
    I was unable to generate AWR report on my database..
    While generating i am getting below error..
    Enter value for report_name: awr_sggebpu1_1
    Using the report name awr_sggebpu1_1
    select output from table(dbms_workload_repository.awr_report_html( :dbid,
    ERROR at line 1:
    ORA-00904: : invalid identifier
    i am connecting as emp1 user to my database ORCL2.
    conn emp1/emp1@ORCL2 -- > Oracle version 10.2.0.5.0Are you executing from emp1 user? Does it have privilege to execute?
    try as below
    $sqlplus / as sysdba -- connect as sysdba
    SQL> grant execute on dbms_workload_repository to emp1;
    SQL> conn emp/emp1
    SQL> @?/rdbms/admin/awrrpt.sql
    post if any errors

  • Script to generate awr and e-mail to the user

    Hi ,
    Can someone help me with the script to generate AWR report and e-mail to customer on a daily basis?
    OS:AIX 6.1
    DB:11.2.0.2

    http://www.gokhanatil.com/2011/07/create-awr-and-addm-reports-and-send.html
    http://nadeemmohammed.wordpress.com/2011/10/27/generate-awr-reports-automatically-script/
    Generate Statspack report automatically once per day
    Your answer in above link(s), just read,understand and try to implement. If problem continue post here, we are here 24x7, but first show us yours efforts.
    Regards
    Girish Sharma

  • SGA Sizing + OEM Issue+AWR reports

    Hi Techies,
    There is small application(Billing Application) running on Laptop. (Windows Vista 32 bit , RDBMS 10.2.0.3.0.)
    1- We have increased the SGA_MAX_SIZE. Thought of Increase 700 M. Once we did the changes it has taken effect as 702 MB Allocated to SGA_MAX_SIZE. The same thing happened, while changing the SGA_TARGET Parameter.(After changed the parameter, it has added up 2MB extra).May I know the reason why the 2MB has added while changing the parameter.
    2- OEM is not working , When it prompting for the Host User name and password, it won't accept the username and passowrd which I am used to Login into the Laptop.
    3- After the generated the AWR reports, how to approach the finding , though it has many more data . Please help
    Thanks,
    Tippu

    Hi
    If you're looking to performance tune your database, run the AWR report - preferably starting and ending at snapshots during which times there was a fair amount of activity, then post the section 'Top 5 Timed Events' here and I will point you in the right direction :-)
    If OEM is still not working, you can manually take snapshots and generate AWR reports from sqlplus.
    Take a manual snapshot:
    BEGIN
    DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
    END;
    Produce an AWR report:
    @?/rdbms/admin/awrrpt.sql
    Cheers,
    Andreas

  • Fail to run AWR report

    Dear support,
    I fail to generate AWR report on Oracle RAC environmnet with the following error. Kindly advise on this issue
    SQL> connect /as sysdba
    Connected.
    SQL> @awrrpt.sql
    Current Instance
    ~~~~~~~~~~~~~~~~
    DB Id DB Name Inst Num Instance
    975288211 CMSHA 1 CMSHA1
    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'
    Enter value for report_type: html
    Type Specified: html
    Instances in this Workload Repository schema
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Using 975288211 for database Id
    Using 1 for instance number
    declare
    ERROR at line 1:
    ORA-20200: Database/Instance 975288211/1 does not exist in
    DBA_HIST_DATABASE_INSTANCE
    ORA-06512: at line 23

    hey ,
    I try the manual create snapshot but still getting below error. kindly advise .thanks
    Sourcing /oracle/.profile-EIS.....
    -bash-3.00$ sqlplus " / as sysdba"
    SQL*Plus: Release 10.2.0.4.0 - Production on Fri Sep 18 22:51:58 2009
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    SQL> begin
    2 DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
    3 end;
    4 /
    begin
    ERROR at line 1:
    ORA-13509: error encountered during updates to a AWR table
    ORA-02291: integrity constraint (ORA-02291: integrity constraint
    (SYS.WRM$_SNAPSHOT_FK) violated - parent key not found
    .) violated - parent key not found
    ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 10
    ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 33
    ORA-06512: at line 2

Maybe you are looking for

  • Can apple service turn on "find my ipod" if the ipod is lost, and the feature wasn't turned on?

    can apple service turn on "find my ipod" if the ipod is lost, and the feature wasn't turned on?

  • Make pictures pop up in certain space

    so i have my website but am unhappy with the fricken slideshows of Apple, and the so long list of photos, so i wonder if i just can have a list of small boxes with the picture in it and when i click on it, it pops, or even better fades into a certain

  • Apple ID Password not accepted???

    Hi, I've just replaced my iphone 4s. I backed up my content but everytime I log into my email account I'm being asked for my Apple ID password but when I type it in it doesn't accept it. I've noticed to that my old Hotmail Account which is closed is

  • Differenti​al Equation Solving Help

    I am trying to solve the diff equation x'' + ax' + bx = c The ODE Linear nth Order Numeric function can handle the second derivative but not the c part, correct? The euler and assorted solvers can't handle the second derivative nor the constant, corr

  • Transporting WEBSITE developyed by WPC to Production server.

    Hi Experts, I have developed a  Test website using WEBPAGE COMPOSER 7.0 in my Development portal.  If we want transport this site to Production portal , Can we do it ?   If so  , What is the procedure? Do the production server need to have WEBPAGE CO