Does RDS allow EXECUTE on DBMS_SYSTEM?

0

I am trying to run following through my admin account:

begin
    rdsadmin.rdsadmin_util.grant_sys_object(
        p_obj_name     => 'DBMS_SYSTEM',
        p_grantee      => 'USERNAME',
        p_privilege    => 'EXECUTE',
        p_grant_option => false);
end;

It gives error saying:

begin
*
ERROR at line 1:
ORA-20199: Error in rdsadmin_util.grant_sys_object. ORA-20900: You do not have permission to grant DBMS_SYSTEM
ORA-06512: at "RDSADMIN.RDSADMIN_UTIL", line 221
ORA-20900: You do not have permission to grant DBMS_SYSTEM
ORA-06512: at line 2

What is the problem here? And ho do I get a workaround for this?
Please reply as I'm stuck because of this.

已提问 6 年前935 查看次数
2 回答
1

I'm not sure if this was changed recently or if it depends on the version, but I was able to successfully grant EXECUTE on DBMS_SYSTEM on my SE2 12.2 RDS instance:

SQL> exec rdsadmin.rdsadmin_util.grant_sys_object('DBMS_SYSTEM','IDS_GOV_WPD','EXECUTE');
PL/SQL procedure successfully completed.

SQL> select privilege from dba_tab_privs where grantee = 'IDS_GOV_WPD' and table_name = 'DBMS_SYSTEM';

PRIVILEGE

EXECUTE

allenb
已回答 5 年前
0

Hi there,

Execute privileges on DBMS_SYSTEM are not available to the master user in RDS Oracle. Note that this is an undocumented internal package that may change between versions. However, depending on what you are trying to accomplish, there is a probably a way to do it in another way.

For example, session tracing can be enabled with DBMS_SESSION (same session) or DBMS_MONITOR (another session), and events can be set in a session directly with "alter session" or via a login trigger. While Oracle provides no supported method for writing to the alert log, you can use UTL_FILE to write to your own log files in database directory objects (directories can be created using the RDSADMIN.RDSADMIN_UTIL.CREATE_DIRECTORY procedure).

Hope this helps.

Thanks,
Michael

AWS
已回答 6 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则