My Oracle Support Banner

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

Last updated on FEBRUARY 03, 2019

Applies to:

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


  • 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
           dbms_xdb.deleteresource('/sys/log/tc.log', dbms_xdb.delete_resource);

    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


To view full details, sign in with your My Oracle Support account.

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

In this Document

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.