09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating a Transformation<br />

Usage Notes<br />

To use this feature, you must be granted execute privileges on dbms_transform.<br />

You must also have execute privileges on the user-defined types that are the source<br />

and destination types of the transformation, and have execute privileges on any<br />

PL/SQL function being used in the transformation function. The transformation<br />

cannot write the database state (that is, perform DML) or commit or rollback the<br />

current transaction.<br />

Syntax<br />

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in<br />

each programmatic environment. Use the following syntax references for each<br />

programmatic environment:<br />

PL/SQL (DBMS_AQADM Package): <strong>Oracle</strong>9i Supplied PL/SQL Packages and<br />

<br />

Types Reference, DBMS_TRANSFORM.CREATE_TRANSFORMATION procedure<br />

Visual Basic (OO4O): There is no applicable syntax reference for this use case<br />

Java (JDBC): <strong>Oracle</strong>9i Supplied Java Packages Reference<br />

Examples<br />

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in<br />

each programmatic environment. Examples are provided in the following<br />

programmatic environments:<br />

PL/SQL (DBMS_AQADM): Creating a Transformation on page 9-35<br />

VB (OO4O): Example not provided.<br />

Java (JDBC): none<br />

PL/SQL (DBMS_AQADM): Creating a Transformation<br />

dbms_transform.create_transformation(schema => 'scott',<br />

name => 'test_transf', from_schema => 'scott',<br />

from_type => 'type1', to_schema => 'scott',<br />

to_type => 'type2',<br />

transformation => 'scott.trans_func(source.user_data)');<br />

Or you can do the following:<br />

dbms_transform.create_transformation(schema => 'scott',<br />

name => 'test_transf',<br />

from_schema => 'scott',<br />

from_type => 'type1,<br />

Administrative Interface 9-35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!