Previous |
Next |
Create a user-defined type to define the information that you want to send about orders. This example creates the strmadmin.order_id_date
type for messages that will contain the order ID and order date.
To create the strmadmin.order_id_date type at each database:
Prepare your environment for messaging if you have not already done so. See "Preparing for Messaging".
In Oracle Enterprise Manager, log in to the ii1.example.com
database as the Oracle Streams administrator.
Go to the Database Home page.
Click Schema to open the Schema subpage.
Click Object Types in the User Defined Types section.
On the Object Types page, click Create to open the Create Object Type page.
Enter order_id_date
in the Name field.
Ensure that strmadmin
is selected in the Schema field.
Ensure that Predefined Type is selected for Datatype in the Attributes section.
Click Add in the Attributes section to open the Add Predefined Type Attributes page.
To add an attribute:
Enter order_id
in the Name field.
Select NUMBER
for Type.
Enter 12
in the Length field.
Click OK.
On the Create Object Type page, ensure that Predefined Type is selected in the Attributes section.
Click Add in the Attributes section to open the Add Predefined Type Attributes page.
To add an attribute:
Enter order_date
in the Name field.
Select VARCHAR2
for Type.
Enter 100
in the Length field.
Click OK.
On the Create Object Type page, click OK to create the type.
Log in to the ii2.example.com
database as the Oracle Streams administrator in Enterprise Manager.
Complete Steps 3 through 15 at the ii2.example.com
database so that both databases have the strmadmin.order_id_date
type.
Complete the steps in "Task 2: Configuring the Queues and Propagation Between Them" to continue this extended example.
Note: You can also use the CREATE
TYPE
SQL statement to create a type.