Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
Logical Change Record Types, 2 of 6
This type represents a DDL change to a database object.
If you create or modify a DDL LCR, then make sure the ddl_text
is consistent with the base_table_name
, base_table_owner
, object_type
, object_owner
, object_name
, and command_type
attributes.
Creates a SYS.LCR$_DDL_RECORD
object with the specified information.
STATIC FUNCTION CONSTRUCT( source_database_name IN VARCHAR2, command_type IN VARCHAR2, object_owner IN VARCHAR2, object_name IN VARCHAR2, object_type IN VARCHAR2, ddl_text IN CLOB, logon_user IN VARCHAR2, current_schema IN VARCHAR2, base_table_owner IN VARCHAR2, base_table_name IN VARCHAR2, tag IN RAW DEFAULT NULL, transaction_id IN VARCHAR2 DEFAULT NULL, scn IN NUMBER DEFAULT NULL) RETURN SYS.LCR$_DDL_RECORD;
Parameter | Description |
---|---|
|
The database where the DDL statement occurred. If you do not include the domain name, then the local domain is appended to the database name automatically. For example, if you specify |
|
The type of command executed in the DDL statement. This parameter should be set to a non- See Also: The "SQL Command Codes" table in the Oracle Call Interface Programmer's Guide for a complete list of command types The following command types are not supported in DDL LCRs: ALTER MATERIALIZED VIEW ALTER MATERIALIZED VIEW LOG ALTER SUMMARY CREATE SCHEMA CREATE MATERIALIZED VIEW CREATE MATERIALIZED VIEW LOG CREATE SUMMARY DROP MATERIALIZED VIEW DROP MATERIALIZED VIEW LOG DROP SUMMARY RENAME The snapshot equivalents of the materialized view command types are also not supported. |
|
The user who owns the object on which the DDL statement was executed |
|
The database object on which the DDL statement was executed |
|
The type of object on which the DDL statement was executed. The following are valid object types: CLUSTER FUNCTION INDEX LINK OUTLINE PACKAGE PACKAGE BODY PROCEDURE SEQUENCE SYNONYM TABLE TRIGGER TYPE USER VIEW
|
|
The text of the DDL statement. This parameter should be set to a non- |
|
The user whose session executed the DDL statement |
|
The schema that is used if no schema is specified explicitly for the modified database objects in This parameter should be set to a non- |
|
If the DDL statement is a table related DDL (such as |
|
If the DDL statement is a table related DDL (such as |
|
A binary tag that enables tracking of the LCR. For example, this tag may be used to determine the original source database of the DDL statement if apply forwarding is used. See Also: Oracle9i Streams for more information about tags |
|
The identifier of the transaction |
|
The SCN at the time when the change record for a captured LCR was written to the redo. The SCN value is meaningless for a user-created LCR. |
Subprogram | Description |
---|---|
Common Subprograms |
See "Common Subprograms for LCR$_ROW_RECORD and LCR$_DDL_RECORD" for a list of subprograms common to the |
Executes the LCR under the security domain of the current user |
|
Returns the base (dependent) table name |
|
Returns the base (dependent) table owner |
|
Returns the default schema (user) name |
|
Gets the DDL text in a |
|
Returns the logon user name |
|
Returns the type of the object involved for the DDL |
|
Sets the base (dependent) table name |
|
Sets the base (dependent) table owner |
|
Sets the default schema (user) name |
|
Sets the DDL text |
|
Sets the logon user name |
|
Sets the object type |
Executes the DDL LCR under the security domain of the current user. Any apply process handlers that would be run for an LCR are not run when the LCR is applied using this procedure.
MEMBER PROCEDURE EXECUTE();
Returns the base (dependent) table name.
MEMBER FUNCTION GET_BASE_TABLE_NAME RETURN VARCHAR2;
Returns the base (dependent) table owner.
MEMBER FUNCTION GET_BASE_TABLE_OWNER RETURN VARCHAR2;
Returns the current schema name.
MEMBER FUNCTION GET_CURRENT_SCHEMA RETURN VARCHAR2;
Gets the DDL text in a CLOB
.
The following is an example of a PL/SQL procedure that uses this procedure to get the DDL text in a DDL LCR:
CREATE OR REPLACE PROCEDURE ddl_in_lcr (ddl_lcr in SYS.LCR$_DDL_RECORD) IS ddl_text CLOB; BEGIN DBMS_OUTPUT.PUT_LINE( ' -----------------------------------------' ); DBMS_OUTPUT.PUT_LINE( ' Displaying DDL text in a DDL LCR: ' ); DBMS_OUTPUT.PUT_LINE( ' -----------------------------------------' ); DBMS_LOB.CREATETEMPORARY(ddl_text, TRUE); ddl_lcr.GET_DDL_TEXT(ddl_text); DBMS_OUTPUT.PUT_LINE('DDL text:' || ddl_text); DBMS_LOB.FREETEMPORARY(ddl_text); END; /
MEMBER FUNCTION GET_DDL_TEXT ddl_text IN OUT CLOB);
Parameter | Description |
---|---|
|
The DDL text in the DDL LCR |
Returns the logon user name.
MEMBER FUNCTION GET_LOGON_USER RETURN VARCHAR2;
Returns the type of the object involved for the DDL.
MEMBER FUNCTION GET_OBJECT_TYPE RETURN VARCHAR2;
Sets the base (dependent) table name.
MEMBER PROCEDURE SET_BASE_TABLE_NAME( base_table_name IN VARCHAR2);
Parameter | Description |
---|---|
|
The name of the base table |
Sets the base (dependent) table owner.
MEMBER PROCEDURE SET_BASE_TABLE_OWNER( base_table_owner IN VARCHAR2);
Parameter | Description |
---|---|
|
The name of the base owner |
Sets the default schema (user) name.
MEMBER PROCEDURE SET_CURRENT_SCHEMA( current_schema IN VARCHAR2);
Parameter | Description |
---|---|
|
The name of the schema to set as the current schema. This parameter should be set to a non- |
Sets the DDL text.
MEMBER PROCEDURE SET_DDL_TEXT( ddl_text IN CLOB);
Parameter | Description |
---|---|
|
The DDL text. This parameter should be set to a non- |
Sets the logon user name.
MEMBER PROCEDURE SET_LOGON_USER( logon_user IN VARCHAR2);
Parameter | Description |
---|---|
|
The name of the schema to set as the logon user |
Sets the object type.
MEMBER PROCEDURE SET_OBJECT_TYPE( object_type IN VARCHAR2);
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|