Oracle DBMS_CSX_ADMIN
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 This package can be used by DBAs to customize the setup when transporting a tablespace containing binary XML data. The use of the package is not required in order for a transportable tablespace job to run.

By default, all binary XML tables will use the default token table set, which will be replicated during transport on the target database. To avoid the cost of transporting a potentially large token table set, the DBA may opt for registering a new set of token tables for a given tablespace. The package provides routines for token table set registration and lookup.
AUTHID CURRENT_USER
Constants
Name Data Type Value
DEFAULT_LEVEL BINARY_INTEGER 0
TAB_LEVEL BINARY_INTEGER 1
TBS_LEVEL BINARY_INTEGER 2
NOREG_LEVEL BINARY_INTEGER 3
NO_CREATE BINARY_INTEGER 0
NO_INDEXES BINARY_INTEGER 1
WITH_INDEXES BINARY_INTEGER 2
DEFAULT_TOKS BINARY_INTEGER 0
NO_DEFAULT_TOKS BINARY_INTEGER 1
Dependencies
DBMS_ASSERT DBMS_STATS KU$_STATUS
DBMS_CSX_INT DBMS_XDBUTIL_INT PLITBLM
DBMS_DATAPUMP KU$_JOBDESC1210 USER_TABLESPACES
DBMS_PRIV_CAPTURE KU$_PARAMVALUE1010 USER_USERS
DBMS_STANDARD KU$_PARMAMVALUES1010  
Documented Yes
First Available 11.1.0.6
Security Model Owned by XDB with EXECUTE granted to the DBA role
Source $ORACLE_HOME/rdbms/admin/dbmsxdba.sql
Subprograms
 
CopyDefaultTokenTableSet
Copy a token table set dbms_csx_admin.copyDefaultTokenTableSet(
tsno       IN  NUMBER,
qnametable OUT VARCHAR2,
nmspctable OUT VARCHAR2,
pttable    OUT VARCHAR2);
DECLARE
 tsno number;
 stmt VARCHAR2(2000);
 qntab VARCHAR2(34);
 nmtab VARCHAR2(34);
 pttab VARCHAR2(34);
BEGIN
  stmt := 'select ts# from ts$ where (name = ''' || 'CSXTS' || ''')';
  EXECUTE IMMEDIATE stmt INTO tsno;

  dbms_csx_admin.copydefaulttokentableset(
  tstabno => tsno, qntab, nmtab, pttatb);

  COMMIT;
END;
/
 
GatherTokenTableStats
Gather stats on default token tables dbms_csx_admin.GatherTokenTableStats;
exec dbms_csx_admin.GatherTokenTableStats;
 
GetTokenTableInfo
Given the table name and the owner, returns the guid of the token table set where token mappings for this table can be found. Returns also the names of the token tables, and whether the token table set is the default one

Overload 1
dbms_csx_admin.GetTokenTableInfo(
ownername  IN  VARCHAR2,
tablename  IN  VARCHAR2,
guid       OUT RAW,
qnametable OUT VARCHAR2,
nmspctable OUT VARCHAR2,
level      OUT NUMBER,
tabno      OUT NUMBER);
TBD
Overload 2 dbms_csx_admin.GetTokenTableInfo(tabno IN NUMBER, guid OUT RAW) RETURN BOOLEAN;
TBD
 
GetTokenTableInfoByTablespace
Given a tablespace number, returns the guid and the token table names for the tablespace. If there is no entry in XDB$TTSET for the tablespace, it assumes the default guid is issued, and returns TRUE in isdefault. ContainTokTabs is set to TRUE if the token tables for guid are in the tablespace. dbms_csx_admin.GetTokenTableInfoByTablespace(
tsname        IN  VARCHAR2,
tablespaceno  IN  NUMBER,
guid          OUT RAW,
qnametable    OUT VARCHAR2,
nmspctable    OUT VARCHAR2,
isdefault     OUT BOOLEAN,
containTokTab OUT BOOLEAN);
TBD
 
Instance_Info_Exp
Undocumented dbms_csx_admin.instance_info_exp(
name      IN  VARCHAR2,
schema    IN  VARCHAR2,
prepost   IN  PLS_INTEGER,
isdba     IN  PLS_INTEGER,
version   IN  VARCHAR2,
new_block OUT PLS_INTEGER)
RETURN VARCHAR2;
TBD
 
NamespaceIDTable
Undocumented dbms_csx_admin.namespaceIDTable RETURN VARCHAR2;
SELECT dbms_csx_admin.namespaceIDTable FROM dual;
 
PathIDTable
Undocumented dbms_csx_admin.pathIDTable RETURN VARCHAR2;
SELECT dbms_csx_admin.pathIDTable FROM dual;
 
QNameIDTable
Undocumented dbms_csx_admin.QNameIDTable RETURN VARCHAR2;
SELECT dbms_csx_admin.QNameIDTable FROM dual;
 
RegisterTokenTableSet
Registers a token table set: adds an entry in XDB$TTSET corresponding to the new token table set, and creates (if required) the token tables (with the corresponding indexes). dbms_csx_admin.registerTokenTableSet(
tstabno     IN NUMBER DEFAULT NULL,
guid        IN RAW    DEFAULT NULL,
flags       IN NUMBER DEFAULT TBS_LEVEL,
tocreate    IN NUMBER DEFAULT WITH_INDEXES,
defaulttoks IN NUMBER DEFAULT DEFAULT_TOKS);
DECLARE
 tsno NUMBER;
 stmt VARCHAR2(2000);
BEGIN
  stmt := 'SELECT ts# FROM ts$ WHERE (name = ''' || 'CSXTS' || ''')';
  EXECUTE IMMEDIATE stmt into tsno;
  dbms_csx_admin.registertokentableset(tstabno => tsno,
  guid => NULL,
  flags => dbms_csx_admin.tbs_level,
  tocreate => dbms_csx_admin.with_indexes,
  defaulttoks => dbms_csx_admin.default_toks);

  COMMIT;
END;
/

Related Topics
DBMS_CSX_INT
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