Oracle DBMS_XDBUTIL_INT
Version 12.1.0.1

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 11.2.0.3 to 12.1.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.
Purpose Internal XDB Utilities
AUTHID CURRENT_USER
Dependencies
ALL_SEQUENCES DBMS_XDB KUPW$WORKER
ALL_TRIGGERS DBMS_XDBZ KU$_JOBDESC
ALL_USERS DBMS_XDBZ0 KU$_STATUS
CHECK_UPGRADE DBMS_XDB_ADMIN KU$_XMLSCHEMA_VIEW
DBMS_ASSERT DBMS_XDB_LIB PLITBLM
DBMS_CSX_ADMIN DBMS_XMLDOM XDB$PATCHUPSCHEMA
DBMS_CSX_INT DBMS_XSLPROCESSOR XDB$STRING_LIST_T
DBMS_DATAPUMP DUAL XMLSCHEMA_LIB
DBMS_LOB GETXMLSCHEMADEPENDENCYLIST XMLTYPE
DBMS_OUTPUT GET_TABLE_NAME XMLTYPEEXTRA
DBMS_SQL IS_VPD_ENABLED XMLTYPEPI
DBMS_STANDARD    
Documented No
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
 
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$schema s;
 
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 (new 12.1)
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 (new 12.1)
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;
 
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
 
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
DBMS_NETWORK_ACL_ADMIN
Packages

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-2014 Daniel A. Morgan All Rights Reserved