| PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
This package provides access to some SQL data definition language (DDL) statements from stored procedures. It also provides special administration operations that are not available as DDLs.
This chapter contains the following topics:
This package runs with the privileges of the calling user, rather than the package owner SYS.
The ALTER_COMPILE procedure commits the current transaction, performs the operation, and then commits again.
This procedure is equivalent to the following SQL statement:
ALTER PROCEDURE|FUNCTION|PACKAGE [<schema>.] <name> COMPILE [BODY]
DBMS_DDL.ALTER_COMPILE ( type VARCHAR2, schema VARCHAR2, name VARCHAR2);
| Parameter | Description |
|---|---|
|
|
Must be either |
|
|
If |
|
|
Name of the object (case-sensitive). |
This procedure alters the given object table table_schema.table_name so it becomes not the default referenceable table for the schema affected_schema. This is equivalent to SQL
ALTER TABLE [<table_schema>.]<table_name> NOT REFERENCEABLE FOR <affected_ schema>
which is currently not supported or available as a DDL statement.
DBMS_DDL.ALTER_TABLE_NOT_REFERENCEABLE ( table_name IN VARCHAR2, table_schema IN DEFAULT NULL, affected_schema IN DEFAULT NULL);
This procedure simply reverts for the affected schema to the default table referenceable for PUBLIC; that is., it simply undoes the previous ALTER_TABLE_REFERENCEABLE call for this specific schema. The affected schema must a particular schema (cannot be PUBLIC).
The user that executes this procedure must own the table (that is, the schema is the same as the user), and the affected schema must be the same as the user.
If the user executing this procedure has ALTER ANY TABLE and SELECT ANY TABLE and DROP ANY TABLE privileges, the user doesn't have to own the table and the affected schema can be any valid schema.
This procedure alters the given object table table_schema.table_name so it becomes the referenceable table for the given schema affected_schema. This is equivalent to SQL
ALTER TABLE [<table_schema>.]<table_name> REFERENCEABLE FOR <affected_schema>
which is currently not supported or available as a DDL statement.
DBMS_DDL.ALTER_TABLE_REFERENCEABLE table_name IN VARCHAR2, table_schema IN DEFAULT NULL, affected_schema IN DEFAULT NULL);
When you create an object table, it automatically becomes referenceable, unless you use the OID AS clause when creating the table. The OID AS clause makes it possible for you to create an object table and to assign to the new table the same EOID as another object table of the same type. After you create a new table using the OID AS clause, you end up with two object table with the same EOID; the new table is not referenceable, the original one is. All references that used to point to the objects in the original table still reference the same objects in the same original table.
If you execute this procedure on the new table, it will make the new table the referenceable table replacing the original one; thus, those references now point to the objects in the new table instead of the original table.
This function returns TRUE if the specified DML or DDL trigger is set to fire once. Otherwise, it returns FALSE.
A fire once trigger fires in a user session but does not fire in the following cases:
EXECUTE_ERROR or EXECUTE_ALL_ERRORS procedure in the DBMS_APPLY_ADM package
DBMS_DDL.IS_TRIGGER_FIRE_ONCE trig_owner IN VARCHAR2, trig_name IN VARCHAR2) RETURN BOOLEAN;
| Parameter | Description |
|---|---|
|
|
Schema of trigger |
|
|
Name of trigger |
This procedure sets the specified DML or DDL trigger's firing property. Use this procedure to control a DML or DDL trigger's firing property for changes:
EXECUTE_ERROR or EXECUTE_ALL_ERRORS procedure in the DBMS_APPLY_ADM package.DBMS_DDL.SET_TRIGGER_FIRING_PROPERTY trig_owner IN VARCHAR2, trig_name IN VARCHAR2, fire_once IN BOOLEAN);
You can specify one of the following settings for a trigger's firing property:
fire_once parameter is set to TRUE for a trigger, then the trigger does not fire for these types of changes.fire_once parameter is set to FALSE for a trigger, then the trigger fires for these types of changes.Regardless of the firing property set by this procedure, a trigger continues to fire when changes are made by means other than the apply process or apply error execution. For example, if a user session or an application makes a change, then the trigger continues to fire, regardless of the firing property.
| See Also:
Oracle Streams Concepts and Administration for more information about the apply process and controlling a trigger's firing property |