gpt4 book ai didi

oracle - oracle中的AWR报告

转载 作者:行者123 更新时间:2023-12-05 01:10:30 25 4
gpt4 key购买 nike

我正在尝试在 oracle 11G 中生成 AWR 报告。在创建时,我收到一些错误消息。下面提到了错误

Using the report name awrrpt_1_2504_2709.html. select output from table(dbms_workload_repository.awr_report_html( :dbid, * ERROR at line 1: ORA-00904: : invalid identifier



我用于生成 AWR 报告的步骤

@$ORACLE_HOME/rdbms/admin/awrrpt.sql

Enter value for report_type: html

Enter value for begin_snap: 2504 Begin Snapshot Id specified: 2504

Enter value for end_snap: 2709 End Snapshot Id specified: 2709



请帮我解决这个问题。

最佳答案

您用来生成 AWR 的用户不能对 DBMS_WORKLOAD_REPOSITORY 具有执行权限包裹。

引用 Oracle 文档,

..To invoke these procedures, a user must be granted the DBA role.



这是 GRANTS的列表你需要生成 AWR
GRANT SELECT ON SYS.V_$DATABASE TO MY_USER;

GRANT SELECT ON SYS.V_$INSTANCE TO MY_USER;

GRANT EXECUTE ON SYS.DBMS_WORKLOAD_REPOSITORY TO MY_USER;

GRANT SELECT ON SYS.DBA_HIST_DATABASE_INSTANCE TO MY_USER;

GRANT SELECT ON SYS.DBA_HIST_SNAPSHOT TO MY_USER;

GRANT ADVISOR TO MY_USER;

关于oracle - oracle中的AWR报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14889550/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com