ORA-31050 When Deleting Resources Under /sys With DBMS_XDB.DELETERESOURCE in Procedure (Doc ID 1174353.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.3 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

  • Creating a resource under /sys as the user SYS, you are able to delete the resource via dbms_xdb.deleteResource in an anonymous block if the role XDBADMIN has been granted

  • However, the same user with the same roles enabled is unable to delete the resource via a stored procedure.

  • Errors seen are:

    SQL> create or replace procedure remove_dmp as
         begin
           dbms_xdb.deleteresource('/sys/log/tc.log', dbms_xdb.delete_resource);
         end;
        /

    Procedure created.

    SQL> execute remove_dmp;
    BEGIN remove_dmp; END;

    *
    ERROR at line 1:
    ORA-31050: Access denied
    ORA-06512: at "XDB.DBMS_XDB", line 355
    ORA-06512: at "REMOVE_DMP", line 4
    ORA-06512: at line 1


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms