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년 전976회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인