I have an issue were I cannot delete a resource configuration file and receive the below error:
ORA-31134: Cannot delete a configuration that is referenced by other resources
ORA-06512: at "XDB.DBMS_XDB", line 355
ORA-06512: at line 9
However I have ran the command below over my repository first
DBMS_RESCONFIG.DELETERESCONFIG( '/repository', '/repository/config/XXXXXX.xml', dbms_resconfig.DELETE_RECURSIVE);
Then tried to delete the the resource
However the error message always occurs. How can resources be referencing the configuration if I have removed it from my repository?
The following query should give you the resource(s) referencing the configuration.
Does it return anything?
select abspath(1) as resource_path
from xdb.xdb$resource r
, table(r.xmldata.rclist.oid) rc
where under_path(value(r), '/', 1) = 1
and value(rc) in (
from xdb.xdb$resconfig rc
where ref(rc) = dbms_xdb.getContentXMLRef('/repository/config/XXXXXX.xml')
I created the resource config file using a simple text editor, and then copied the file across onto my database by windows WebDav into my config folder.
I then disabled repository events within SQLDeveloper:
ALTER SESSION SET XML_DB_EVENTS = DISABLE;
And then ran the command below to apply the resource config file:
BEGIN --Register the handler against the root repository object DBMS_RESCONFIG.appendResConfig('/repository', '/repository/config/XXXXXX.xml', DBMS_RESCONFIG.APPEND_RECURSIVE); END;
Then re-enabled repository events.
ALTER SESSION SET XML_DB_EVENTS = ENABLE;
Database version is
Oracle Database 11g Enterprise Edition Release 188.8.131.52.0 - 64bit Production.
I haven't tried bouncing the database, and will give it a go.
> ALTER SESSION SET XML_DB_EVENTS = DISABLE;
Why would you do that??? Via that statement you disable all normal repository (event) actions like securing the resources etc... If not only internal methods to properly add the resource metadata in all the XDB objects where probably skipped...