Oracle DBMS_XDBUTIL_INT
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Internal XDB Utilities
AUTHID CURRENT_USER
Dependencies
ALL_SEQUENCES DBMS_XDB KU$_JOBDESC
ALL_TRIGGERS DBMS_XDBUTIL_INT KU$_STATUS
ALL_USERS DBMS_XDBZ KU$_XMLSCHEMA_VIEW
CHECK_UPGRADE DBMS_XDBZ0 KUPW$WORKER
DBMS_ASSERT DBMS_XDB_ADMIN PLITBLM
DBMS_CSX_ADMIN DBMS_XDB_LIB XDB$PATCHUPSCHEMA
DBMS_CSX_INT DBMS_XMLDOM XDB$STRING_LIST_T
DBMS_DATAPUMP DBMS_XSLPROCESSOR XMLSCHEMA_LIB
DBMS_LOB DUAL XMLTYPE
DBMS_OUTPUT GETXMLSCHEMADEPENDENCYLIST XMLTYPEEXTRA
DBMS_SQL GET_TABLE_NAME XMLTYPEPI
DBMS_STANDARD IS_VPD_ENABLED  
Documented No
First Available Not known
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/prvtxdb0.plb
Subprograms
 
CLEANSGAFORUPGRADE
Undocumented dbms_xdbutil_int.cleanSGAForUpgrade;
exec dbms_xdbutil_int.cleansgaforupgrade;
 
CLEANUP_EXPIRED_NFSCLIENTS
Undocumented dbms_xdbutil_int.cleanup_expired_nfsClients;
exec dbms_xdbutil_int.cleanup_expired_nfsclients;
 
CREATEACL
Create Access Control List dbms_xdbutil_int.createACL(
acl_path IN VARCHAR2,
objid    IN RAW,
data     IN XMLTYPE)
RETURN BOOLEAN;
TBD
 
CREATECROSSCONFOLDER
Undocumented dbms_xdbutil_int.createCrossConFolder(
abspath IN VARCHAR2,
vwname  IN VARCHAR2)
RETURN BOOLEAN;
TBD
 
CREATESYSTEMVIRTUALFOLDER
Undocumented dbms_xdbutil_int.createSystemVirtualFolder(abspath IN VARCHAR2)
RETURN BOOLEAN;
-- from $ORACLE_HOME/rdbms/admin/catxdbst.sql and xdbu9202.sql

Rem Create OID virtual folder
Rem This step is repeatable.
DECLARE
 ret BOOLEAN;
BEGIN
  ret := dbms_xdbutil_int.createSystemVirtualFolder('/sys/oid');
  IF ret THEN
    dbms_xdb.setacl('/sys/oid', '/sys/acls/bootstrap_acl.xml');
  END IF;
EXCEPTION
  WHEN OTHERS THEN
    ret := FALSE;
END;
/

COMMIT;

Rem Create ASM virtual folder
Rem This step is repeatable.
DECLARE
 ret BOOLEAN;
BEGIN
  ret := dbms_xdbutil_int.createSystemVirtualFolder('/sys/asm');
  IF ret THEN
    dbms_xdb.setacl('/sys/asm', '/sys/acls/all_owner_acl.xml');
END IF;
EXCEPTION
  WHEN OTHERS THEN
    ret := FALSE;
END;
/

COMMIT;
 
FIXACL
Undocumented dbms_xdbutil_int.fixACL(oldacl IN XMLTYPE) RETURN XMLTYPE;
TBD
 
FIXACL_DOWNGRADE
Undocumented dbms_xdbutil_int.fixACL_downGrade(oldacl IN XMLTYPE) RETURN XMLTYPE;
TBD
 
FLUSHSESSION
Undocumented dbms_xdbutil_int.flushSession;
exec dbms_xdbutil_int.flushSession;
 
GETNAMESPACE
Get the resolved namespace for an attribute in the list (by position) dbms_xdbutil_int.getNameSpace(
schemadoc IN XMLTYPE,
inde      IN BINARY_INTEGER)
RETURN VARCHAR2;
conn xdb/xdb

set long 1000000

SELECT XMLTYPE(s.getclobval())
FROM xdb$schema s;

SELECT dbms_xdbutil_int.getNamespace(XMLTYPE(s.getclobval()), 1)
FROM xdb$schemas;
 
GETNEWOID
Returns an object identifier dbms_xdbutil_int.getNewOID RETURN RAW;
SELECT dbms_xdbutil_int.getNewOID
FROM dual;
 
GET_TABLESPACE_TAB
Undocumented dbms_xdbutil_int.get_tablespace_tab(
object_owner   IN VARCHAR2,
object_name    IN VARCHAR2,
object_subname IN VARCHAR2,
object_type    IN VARCHAR2)
RETURN VARCHAR2;
TBD
IMPORTSEQUENCE
Undocumented dbms_xdbutil_int.importSequence(
schema   IN VARCHAR2,
sequence IN VARCHAR2,
value    IN NUMBER);
TBD
 
INSTANCE_CALLOUT_IMP
Undocumented dbms_xdbutil_int.instance_callout_imp(
obj_name   IN  VARCHAR2
obj_schema IN  VARCHAR2
obj_type   IN  NUMBER
prepost    IN  BINARY_INTEGER
action     OUT VARCHAR2
alt_name   OUT VARCHAR2);
TBD
 
INSTANCE_EXPORT_ACTION
Undocumented dbms_xdbutil_int.instance_export_action(
obj_name   IN  VARCHAR2
obj_schema IN  VARCHAR2
obj_type   IN  NUMBER
prepost    IN  BINARY_INTEGER
action     OUT VARCHAR2
alt_name   OUT VARCHAR2
TBD
 
ISOBJECTGENERATED
Undocumented: Presumably returns 1 for a generated object, otherwise 0 dbms_xdbutil_int.isObjectGenerated(
objname IN VARCHAR2,
schname IN VARCHAR2)
RETURN NUMBER;
SELECT dbms_xdbutil_int.isobjectgenerated('XDB', 'SYS_LOB0000042280C00022$$')
FROM dual;
 
ISTABLEOUTOFLINE
Undocumented: Presumably returns 1 for an out of line table, otherwise 0 dbms_xdbutil_int.isTableOutOfLine(
tablename IN VARCHAR2,
owner     IN VARCHAR2)
RETURN NUMBER;
SELECT dbms_xdbutil_int.isTableOutOfLine('XDB$PATH_INDEX_PARAMS', 'XDB')
FROM dual;
 
ISXMLNESTEDTABLE
Undocumented: Presumably returns 1 if a nested table, otherwise 0 dbms_xdbutil_int.isXMLNestedTable(
tablename IN VARCHAR2,
schname   IN VARCHAR2)
RETURN NUMBER;
SELECT dbms_xdbutil_int.isXMLNestedTable('XDB$SCHEMA', 'XDB')
FROM dual;
 
LOOKUPSCHEMAOID
Undocumented dbms_xdbutil_int.lookupSchemaOID(schemaoid IN RAW) RETURN VARCHAR2;
TBD
 
LOOKUPSCHEMAURL
Undocumented dbms_xdbutil_int.lookupSchemaURL(schemaurl IN VARCHAR2) RETURN RAW;
TBD
 
MIGRATEALLXMLFROM9201
Undocumented dbms_xdbutil_int.migrateAllXMLFrom9201;
exec dbms_xdbutil_int.migrateAllXMLFrom9201;
 
NUMTOHEX
Converts a number to hex dbms_xdbutil_int.numToHex(n IN NUMBER) RETURN RAW;
SELECT dbms_xdbutil_int.numToHex(42)
FROM dual;

SELECT dbms_xdbutil_int.numToHex(43)
FROM dual;

SELECT dbms_xdbutil_int.numToHex(47)
FROM dual;

SELECT dbms_xdbutil_int.numToHex(420128)
FROM dual;
 
NUMTOHEX2
Converts a number to hex dbms_xdbutil_int.numToHex2(n IN NUMBER) RETURN RAW;
SELECT dbms_xdbutil_int.numToHex(420128)
FROM dual;
 
PATCHREPOSITORYRESCONFIGLIST
Undocumented dbms_xdbutil_int.patchRepositoryResConfigList;
dbms_xdbutil_int.patchRepositoryResConfigList;
 
RAWTONUM
Converts RAW to NUMBER dbms_xdbutil_int.rawToNum(prefix_code IN RAW) RETURN NUMBER;
SELECT utl_raw.cast_to_raw('ABC')
FROM dual;

SELECT dbms_xdbutil_int.rawToNum(utl_raw.cast_to_raw('ABC'))
FROM dual;
 
RAWTONUM2
Converts RAW to NUMBER dbms_xdbutil_int.rawToNum2(prefix_code IN RAW) RETURN NUMBER;
SELECT dbms_xdbutil_int.rawToNum2(utl_raw.cast_to_raw('ABC'))
FROM dual;
 
SETLINKPARENTS
Undocumented dbms_xdbutil_int.setLinkParents;
exec dbms_xdbutil_int.setLnkParents;
 
SETLINKPARENTSNEW
Undocumented dbms_xdbutil_int.setLinkParentsNew;
exec dbms_xdbutil_int.setLinkParentsNew;
 
SYSTEM_INFO_EXP
Undocumented dbms_xdbutil_int.system_info_exp(
prePost       IN  BINARY_INTEGER,
connectString OUT VARCHAR2,
version       IN  VARCHAR2,
new_block     OUT BINARY_INTEGER);
RETURN VARCHAR2;
TBD
 
USESETLINKPARENTSNEW
Undocumented dbms_xdbutil_int.useSetLinkParentsNew RETURN BOOLEAN;
BEGIN
  IF dbms_xdbutil_int.useSetLinkParentsNew THEN
    dbms_output.put_line('Using ParentsNew');
  ELSE
    dbms_output.put_line('Not Using ParentsNew');
  END IF;
END;
/
 
XMLSCHEMADEPENDENCYLEVEL
Undocumented dbms_xdbutil_int.xmlSchemaDependencyLevel(
schoid IN RAW,
owner  IN VARCHAR2)
RETURN BINARY_INTEGER;
TBD
 
XMLSCHEMAGETDEPENDENCYLIST
Undocumented dbms_xdbutil_int.XMLSchemaGetDependencyList(
schoid  IN RAW,
owner   IN VARCHAR2,
depclob IN CLOB)
RETURN BINARY_INTEGER;
TBD
 
XMLSCHEMASTRIPUSERNAME
Undocumented dbms_xdbutil_int.XMLSchemaStripUsername(
schemadoc IN XMLTYPE,
username  IN VARCHAR2)
RETURN CLOB;
conn xdb/xdb

set long 1000000
set pagesize 0
set linesize 131
col xml_out format a130
col xml_len format 999999

SELECT XMLTYPE(s.getclobval()) as xml_out
FROM xdb$schema s
WHERE rownum = 1;

SELECT MIN(rowid) FROM xdb$schema;

SELECT XMLTYPE(s.getclobval()) as xml_out
FROM xdb$schema s
WHERE rowid = 'AAANXLAACAAADecAAA';

SELECT LENGTH(XMLTYPE(s.getclobval())) as xml_len
FROM xdb$schema s
WHERE rowid = 'AAANXLAACAAADecAAA';

SELECT xdb.dbms_xdbutil_int.XMLSchemaStripUsername(XMLTYPE(s.getClobVal()), 'XDB') xml_out
FROM xdb$schema s
WHERE rowid = 'AAANXLAACAAADecAAA';

col xml_out format 999999

SELECT LENGTH(xdb.dbms_xdbutil_int.XMLSchemaStripUsername(XMLTYPE(s.getClobVal()), 'XDB')) xml_len
FROM xdb$schema s
WHERE rowid = 'AAANXLAACAAADecAAA';

Related Topics
Built-in Functions
Built-in Packages
DBMS_NETWORK_ACL_ADMIN
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved