[Oracle]-[AWR/Stackpack]-AWR (Stackpack) Execution permission: Oracle 9i executes Stackpack (10 Gb is AWR). It is a common account and has no DBA permission.
SQL> @awrrpt.sqlCurrent Instance~~~~~~~~~~~~~~~~ v$instance i *ERROR at line 6:ORA-00942: table or view does not existSpecify the Report Type~~~~~~~~~~~~~~~~~~~~~~~Would you like an HTML report, or a plain text report?Enter 'html' for an HTML report, or 'text' for plain textDefaults to 'html'Enter value for report_type: htmlType Specified: htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ from dba_hist_database_instance wr, v$database cd, v$instance ci *ERROR at line 13:ORA-00942: table or view does not exist
The error message "cannot access V $, Dynamic Performance Table" is displayed. Grant User Permissions:
SQL> grant select any dictionary to test;Grant succeeded.SQL> @awrrpt.sqlCurrent Instance~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance----------- ------------ -------- ------------ 142990149 BISAL 1 bisalSpecify the Report Type~~~~~~~~~~~~~~~~~~~~~~~Would you like an HTML report, or a plain text report?Enter 'html' for an HTML report, or 'text' for plain textDefaults to 'html'Enter value for report_type: htmlType Specified: htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name InstanceHost------------ -------- ------------ ------------ ------------* 142990149 1 BISAL bisal liuUsing 142990149 for database IdUsing 1 for instance numberSpecify 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> withoutspecifying a number lists all completed snapshots.Enter value for num_days: Listing all Completed SnapshotsSnapInstance DB Name Snap Id Snap Started Level------------ ------------ --------- ------------------ -----bisal BISAL545 11 Aug 2013 14:11 1546 11 Aug 2013 15:00 1547 11 Aug 2013 16:00 1548 11 Aug 2013 17:00 1549 11 Aug 2013 18:00 1550 12 Aug 2013 15:04 1551 12 Aug 2013 16:00 1552 12 Aug 2013 17:00 1553 12 Aug 2013 18:00 1554 12 Aug 2013 19:00 1Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter value for begin_snap: 545Begin Snapshot Id specified: 545Enter value for end_snap: 546End Snapshot Id specified: 546Specify the Report Name~~~~~~~~~~~~~~~~~~~~~~~The default report file name is awrrpt_1_545_546.html.To use this name,press <return> to continue, otherwise enter an alternative.Enter value for report_name: testUsing the report name testselect output from table(dbms_workload_repository.awr_report_html( :dbid, *ERROR at line 1:ORA-00904: : invalid identifierReport written to test
The system prompts that the dbms_workload_repository package cannot be executed. Grant the following permissions:
SQL> grant execute on dbms_workload_repository to test;Grant succeeded.
Try again. It indicates that the execution of Stackpack (/AWR) requires three conditions: 1. connect/create session permission. 2. select any dictionary permission. 3. execute on any dbms_workload_repository permission.