【Oracle】-【AWR/Stackpack】-AWR(Stackpack)執行許可權
Oracle 9i執行Stackpack(10g是AWR),當前是一個普通賬戶,沒有DBA許可權。
SQL> @awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
v$instance i
*
ERROR at line 6:
ORA-00942: table or view does not exist
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from dba_hist_database_instance wr, v$database cd, v$instance ci
*
ERROR at line 13:
ORA-00942: table or view does not exist
提示無法訪問V$,Dynamic Performance Table。
賦予使用者許可權:
SQL> grant select any dictionary to test;
Grant succeeded.
SQL> @awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
142990149 BISAL 1 bisal
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance
Host
------------ -------- ------------ ------------ ------------
* 142990149 1 BISAL
bisal liu
Using 142990149 for database Id
Using 1 for instance number
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
specifying a number lists all completed snapshots.
Enter value for num_days:
Listing all Completed Snapshots
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
bisal BISAL
545 11 Aug 2013 14:11 1
546 11 Aug 2013 15:00
1
547 11 Aug 2013 16:00
1
548 11 Aug 2013 17:00
1
549 11 Aug 2013 18:00
1
550 12 Aug 2013 15:04
1
551 12 Aug 2013 16:00
1
552 12 Aug 2013 17:00
1
553 12 Aug 2013 18:00
1
554 12 Aug 2013 19:00
1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 545
Begin Snapshot Id specified: 545
Enter value for end_snap: 546
End Snapshot Id specified: 546
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_545_546.html.
To use this name,
press
Enter value for report_name: test
Using the report name test
select output from table(dbms_workload_repository.awr_report_html( :dbid,
*
ERROR at line 1:
ORA-00904: : invalid identifier
Report written to test
提示無法執行dbms_workload_repository包。
賦予相應許可權:
SQL> grant execute on dbms_workload_repository to test;
Grant succeeded.
再嘗試就可以執行了。說明Stackpack(/AWR)的執行需要三個條件:
1、connect / create session許可權。
2、select any dictionary許可權。
3、execute on any dbms_workload_repository許可權。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7192724/viewspace-768356/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 詳解Oracle AWR執行日誌分析工具Oracle
- ORACLE AWROracle
- Oracle AWR ---Oracle
- oracle awrOracle
- oracle awr ashOracle
- Oracle AWR速查Oracle
- oracle,metric,awrOracle
- 【Oracle】AWR analyseOracle
- 【AWR】Oracle資料庫建立awr基線Oracle資料庫
- 【AWR】Oracle批量生成awr報告指令碼Oracle指令碼
- Oracle的物件許可權、角色許可權、系統許可權Oracle物件
- oracle工具 awr formatOracleORM
- 轉載oracle awrOracle
- ORACLE許可權Oracle
- mysql 管理:mysql 執行許可權(轉)MySql
- Oracle 10g,AWR,AWR,ADDM最佳實踐Oracle 10g
- Oracle 11g AWR 系列六:使用 AWR 檢視Oracle
- 【AWR】Oracle awr相關檢視及體系介紹Oracle
- Oracle重建awr步驟Oracle
- Oracle生成awr報告Oracle
- Oracle AWR 配置檢視Oracle
- Oracle AWR Top SQL sectionOracleSQL
- 轉載Oracle AWR速查Oracle
- Oracle 生成awr報告Oracle
- Oracle AWR wri$, wrh$ and wrm$Oracle
- oracle效能awr報告Oracle
- Oracle中AWR的使用Oracle
- oracle 許可權集合Oracle
- oracle 許可權管理Oracle
- Oracle許可權(一)Oracle
- oracle許可權全集Oracle
- 普通使用者許可權執行dockerDocker
- SYS執行SQL報錯缺少許可權SQL
- 學用ORACLE AWR和ASH特性(1)-ASH和AWR的故事Oracle
- 學用ORACLE AWR和ASH特性(7)-AWR的幾個幫Oracle
- Oracle 使用者、物件許可權、系統許可權Oracle物件
- _awr_sql_child_limit是否能控制awr記錄sql執行次數的問題SQLMIT
- Linux檔案讀、寫、執行許可權Linux