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
PL/SQL package containing functions called by export to dynamically link in PL/SQL logic in the export process.
AUTHID
CURRENT_USER
Constants
Name
Data Type
Value
Function codes for the expact$ table
func_pre_table
(execute before loading table)
NUMBER
1
func_post_tables
(execute after loading all tables)
NUMBER
2
func_pre_row
(execute before loading row)
NUMBER
3
func_post_row
(execute after loading row)
NUMBER
4
func_row
(execute in lieu of loading row)
NUMBER
5
Dependencies
DBMS_ASSERT
DBMS_METADATA_UTIL
DBMS_UTILITY
DBMS_EXPORT_EXTENSION_I
DBMS_SQL
EXTIDX_IMP_LIB
DBMS_I_INDEX_UTL
DBMS_SYS_SQL
Documented
No
Exceptions
Error Code
Reason
unExecutedActions
A function was not called with the same parameters until it returned NULL indicating an internal error in EXPORT.
Checks to see if a partition has made use of a template partition clause
dbms_export_extension.check_match_template(pobjno IN INTEGER)
RETURN INTEGER;
TBD
FUNC_INDEX_DEFAULT
Returns default$ from col$ for a function-base index and converts it to VARCHAR2 from LONG
dbms_export_extension.func_index_default(
tabobj IN NUMBER,
colname IN VARCHAR2)
RETURN CLOB;
SELECT object_name, object_id, col#, name
FROM dba_objects o, col$ c
WHERE o.object_id = c.obj#
AND o.object_type = 'TABLE'
AND c.default$ IS NOT NULL
AND rownum < 11;
Acts as intermediary between export and the ODCIIndexGetMetadata method on a domain index's implementation type which allows the index to return PL/SQL-based "metadata" such as policy info.
Strings are returned representing pieces of PL/SQL blocks to execute at import time.
dbms_export_extension.get_domain_index_metadata(
index_name IN VARCHAR2,
index_schema IN VARCHAR2,
type_name IN VARCHAR2,
type_schema IN VARCHAR2,
version IN VARCHAR2,
newblock OUT PLS_INTEGER,
gmflags IN NUMBER DEFAULT -1, -- Post-v1 DI only
datapump_debug IN NUMBER DEFAULT -1,
partition_name IN VARCHAR2 DEFAULT NULL )
RETURN VARCHAR2;
TBD
GET_DOMAIN_INDEX_TABLES
Acts as intermediary between export and the ODCIIndexUtilGetTableNames method on a domain index's implementation type allowing theindex to return list of secondary table names
(separated by comma) that are to be exported and imported to speed up rebuild of domain indexes during import.
dbms_export_extension.get_domain_index_tables(
index_name IN VARCHAR2,
index_schema IN VARCHAR2,
type_name IN VARCHAR2,
type_schema IN VARCHAR2,
read_only IN PLS_INTEGER,
version IN VARCHAR2,
get_tables IN PLS_INTEGER)
RETURN VARCHAR2;
TBD
GET_OBJECT_COMMENT
Reurns the source string for COMMENT OPERATOR and COMMENT INDEXTYPE
dbms_export_extension.get_object_comment(
objid IN NUMBER,
objtype IN NUMBER)
RETURN VARCHAR2;
TBD
GET_OBJECT_SOURCE
Used to get the source string for CREATE OPERATOR and CREATE INDEXTYPE.
The function is passed the object number and the object type and the string returned is the SQL statement needed to create the operator or the index type.
As you will note in the demo, at right, if you don't pass it the right object_id it returns NULL.
dbms_export_extension.get_object_source(
objid IN NUMBER,
objtype IN NUMBER)
RETURN VARCHAR2;
SELECT object_id
FROM dba_objects
WHERE object_name = 'TAB$';
OBJECT_ID
----------
4
SELECT type# FROM obj$ WHERE obj# = 4;
TYPE#
----------
2
SELECT dbms_export_extension.get_object_source(4, 2)
FROM dual;
SELECT dbms_export_extension.get_object_source(4, 2)
*
ERROR at line 1:
ORA-16540: invalid argument
ORA-06512: at "SYS.DBMS_EXPORT_EXTENSION", line 297
GET_V2_DOMAIN_INDEX_TABLES
Acts as intermediary between export and the ODCIIndexUtilGetTableNames method on a domain index's implementation type.
Unlike the initial (v1) implementation, the _v2_ 0/1 value which export will use to determine if all the secondary objects associated with a domain index should be exported (1) or not (0)
dbms_export_extension.get_v2_domain_index_tables(
index_name IN VARCHAR2,
index_schema IN VARCHAR2,
type_name IN VARCHAR2,
type_schema IN VARCHAR2,
read_only IN PLS_INTEGER,
version IN VARCHAR2,
get_tables IN PLS_INTEGER,
gmflags IN NUMBER)
RETURN INTEGER;
TBD
INSERT_SECOBJ
Inserts an entry into the table odci_secobj$,
dbms_export_extension.insert_secobj(
secobjschema IN VARCHAR2,
secobjname IN VARCHAR2);
col idxschema format a10
col idxname format a10
col secobjschema format a13
col secobjname format a15