1 PACKAGE dbms_csx_admin AUTHID CURRENT_USER IS
2
3 DEFAULT_LEVEL CONSTANT BINARY_INTEGER := 0;
4 TAB_LEVEL CONSTANT BINARY_INTEGER := 1;
5 TBS_LEVEL CONSTANT BINARY_INTEGER := 2;
6 NOREG_LEVEL CONSTANT BINARY_INTEGER := 3;
7
8 NO_CREATE CONSTANT BINARY_INTEGER := 0;
9 NO_INDEXES CONSTANT BINARY_INTEGER := 1;
10 WITH_INDEXES CONSTANT BINARY_INTEGER := 2;
11
12 DEFAULT_TOKS CONSTANT BINARY_INTEGER := 0;
13 NO_DEFAULT_TOKS CONSTANT BINARY_INTEGER := 1;
14
15 ---------------------------------------------
16 -- TTS support: multiple token repositories
17 ----------------------------------------------
18 -- PROCEDURE RegisterTokenTableSet
19 -- Registers a token table set: adds an entry in XDB$TTSET corresponding
20 -- to the new token table set, and creates (if required) the token tables
21 -- (with the corresponding indexes).
22 -- PARAMETERS
23 -- tstabno - tablespace/table number of the tablespace/table using
24 -- - the set of token table we register
25 -- guid - globally unique identifier of the token table set
26 -- - if NULL, a new identifier is created, provided the user is SYS
27 -- flags - TAB_LEVEL for table level,
28 -- - TBS_LEVEL for tablespace level
29 -- - NOREG_LEVEL if the TTSET table needs not be updated
30 -- tocreate - NO_CREATE if no token tables are created
31 -- - NO_INDEXES if token tables are created, but no indexes
32 -- - WITH_INDEXES if token tables and corresponding indexes are created
33 -- defaulttoks - if DEFAULT_TOKS, insert default token mappings
34 -- NOTE
35 -- It is an error if flags = DEFAULT_LEVEL since the default token table set
36 -- already exists if XDB is installed.
37 ----------------------------------------------
38 procedure RegisterTokenTableSet(tstabno IN NUMBER DEFAULT NULL,
39 guid IN RAW DEFAULT NULL,
40 flags IN NUMBER DEFAULT TBS_LEVEL,
41 tocreate IN NUMBER DEFAULT WITH_INDEXES,
42 defaulttoks IN NUMBER DEFAULT DEFAULT_TOKS);
43
44 procedure CopyDefaultTokenTableSet(tsno IN NUMBER,
45 qnametable OUT VARCHAR2,
46 nmspctable OUT VARCHAR2,
47 pttable OUT VARCHAR2);
48
49
50 -------------------------------------------------
51 -- PROCEDURE GetTokenTableInfo
52 -- Given the table name and the owner, returns the guid of the
53 -- token table set where token mappings for this table can be found.
54 -- Returns also the names of the token tables, and whether the token
55 -- table set is the default one.
56 -- NOTE
57 -- It should be called only for CSX tables; otherwise, it will not return an
58 -- error, just the default guid and token table names.
59 -- Returns error if there is no default token table set.
60 -- Needs SYS privileges.
61 -------------------------------------------------
62 procedure GetTokenTableInfo(ownername IN VARCHAR2, tablename IN VARCHAR2,
63 guid OUT RAW, qnametable OUT VARCHAR2, nmspctable OUT VARCHAR2,
64 level OUT NUMBER, tabno OUT NUMBER);
65
66 function GetTokenTableInfo(tabno IN NUMBER, guid OUT RAW) return BOOLEAN;
67
68
69 ---------------------------------------------------------------
70 -- PROCEDURE GetTokenTableInfoByTablespace
71 -- Given a tablespace number, returns the guid and the token
72 -- table names for this tablespace. If there is no entry
73 -- in XDB$TTSET for this tablespace, it assumes the default
74 -- guid is isued, and returns TRUE in isdefault.
75 -- containTokTabs is set to TRUE if the token tables for guid
76 -- are actually in this tablespace. (This is needed for procedural actions
77 -- for TTS.)
78 -- NOTE
79 -- Requires SYS privileges.
80 ---------------------------------------------------------------
81
82 procedure GetTokenTableInfoByTablespace(tsname IN VARCHAR2, tablespaceno IN NUMBER,
83 guid OUT RAW, qnametable OUT VARCHAR2,
84 nmspctable OUT VARCHAR2,
85 isdefault OUT BOOLEAN,
86 containTokTab OUT BOOLEAN);
87
88 FUNCTION instance_info_exp(name IN VARCHAR2,
89 schema IN VARCHAR2,
90 prepost IN PLS_INTEGER,
91 isdba IN PLS_INTEGER,
92 version IN VARCHAR2,
93 new_block OUT PLS_INTEGER) RETURN VARCHAR2;
94
95 -- returns default path-id token table
96 function PathIdTable return varchar2;
97 -- returns default qname-id token table
98 function QnameIdTable return varchar2;
99 -- returns default namespace-id token table
100 function NamespaceIdTable return varchar2;
101 -- procedure to gather stats on default token tables
102 procedure GatherTokenTableStats;
103 END dbms_csx_admin;