ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
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.
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;
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);
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.
dbms_csx_admin.getTokenTableNames(
ownername IN VARCHAR2,
tablename IN VARCHAR2,
qnametable OUT VARCHAR2,
nmspctable OUT VARCHAR2,
pttable OUT VARCHAR2);
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;
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);