Oracle® Database 2 Day + Data Replication and Integration Guide 11g Release 1 (11.1) Part Number B28324-01 |
|
|
View PDF |
This chapter describes how to complete common tasks that are required in many data replication and integration environments.
This chapter contains the following sections:
To access data in multiple locations, you must first ensure that each location can be uniquely identified. Next, you must establish a communication path between these locations.
The unique identifier for each database is referred to as its global database name. By setting the initialization parameter GLOBAL_NAMES
to TRUE
, you guarantee that each database in your federated environment can be uniquely identified. A database forms a global database name by prefixing the database network domain, specified by the DB_DOMAIN
initialization parameter at database creation, with the individual database name, specified by the DB_NAME
initialization parameter.
To set the GLOBAL_NAMES initialization parameter to TRUE at a database:
Log in to Enterprise Manager as an administrative user with SYSDBA
privilege.
Go to the Database Home page for the database instance.
Click Server to open the Server subpage.
Click Initialization Parameters in the Database Configuration section.
If you are using a server parameter file, then click SPFile. Otherwise, proceed to the next step.
On the Initialization Parameters page, enter GLOBAL_NAMES
in the search tool.
Click Go.
Set the GLOBAL_NAMES
initialization parameter to TRUE
.
Click Apply to save your changes.
Ensure that you set the parameter permanently in either the server parameter file or in your initialization parameter file.
Complete Steps 1 through 9 for each database in your distributed environment. By default, the GLOBAL_NAMES
initialization parameter is set to FALSE
. Therefore, it must be set to TRUE
explicitly at each database.
If you were directed to this topic from another topic, then go back to the topic now:
See Also:
Oracle Database Reference for more information about the GLOBAL_NAMES
initialization parameter
If you plan to use any of the components of Oracle Streams in your environment, then configure an Oracle Streams administrator. Oracle Streams components include:
Queues
Capture processes
Propagations
Apply processes
Rules and rule sets
An Oracle Streams administrator configures and manages these components at each database where they are used. See the following topics in this guide for information about these components:
To configure an Oracle Streams administrator, either create a new user with the appropriate privileges or grant these privileges to an existing user. You should not use the SYS
or SYSTEM
user as an Oracle Streams administrator, and the Oracle Streams administrator should not use the SYSTEM
tablespace as its default tablespace.
To create an Oracle Streams administrator named strmadmin:
The Oracle Streams administrator should use a dedicated tablespace that is not used by any other user.
To create a new tablespace for the Oracle Streams administrator:
Log in to Enterprise Manager as an administrative user.
Go to the Database Home page for the database instance.
Click Server to open the Server subpage.
Click Tablespaces in the Storage section.
On the Tablespaces page, click Create.
The Create Tablespace page appears, showing the General subpage.
Enter streams_tbs
in the Name field.
Click Add in the Datafiles section to open the Add Datafile page.
Enter streams_tbs.dbf
in the File Name field.
Check the directory in the File Directory field and change it if necessary.
Change the size in the File Size field to 25
and ensure that the list is set to MB
.
Select Automatically extend datafile when full (AUTOEXTEND) in the Storage section.
Enter 5
in the Increment field and set the list to MB
.
Set the Maximum File Size. Typically, it is best to leave it set to Unlimited
.
Click Continue.
On the Create Tablespace page, click OK.
Complete the steps in "Example: Creating an Oracle Streams Administrator" to finish creating the Oracle Streams administrator.
This topic describes creating an Oracle Streams administrator that uses the tablespace configured in "Example: Creating the Tablespace for the Oracle Streams Administrator".
To create a new Oracle Streams administrator named strmadmin:
Log in to Enterprise Manager as an administrative user.
Go to the Database Home page for the database instance.
Click Server to open the Server subpage.
Click Users in the Security section.
On the Users page, click Create.
The General subpage of the Create User page appears.
Enter strmadmin
in the Name field.
Enter a password for the new user in the Enter Password and Confirm Password fields.
Enter an appropriate password for the administrative user. See Oracle Database 2 Day + Security Guide for information about choosing passwords.
Click the flashlight icon for the Default Tablespace field to select the streams_tbs
tablespace created in "Example: Creating the Tablespace for the Oracle Streams Administrator".
Click the flashlight icon for the Temporary Tablespace field to select a temporary tablespace for the new user.
Click Roles.
The Roles subpage of the Create User page appears.
Click Edit List.
The Modify Roles page appears.
Move DBA from the Available Roles list to the Selected Roles list.
Click OK.
On the Create User page, click OK to create the user.
If you were directed to this topic from another topic, then go back to the topic now:
"Example: Configuring Read-Only Hub-and-Spoke Replication with Local Capture"
"Example: Configuring Read-Only Hub-and-Spoke Replication with Downstream Capture"
"Example: Configuring Read/Write Hub-and-Spoke Replication with Capture Processes"
"Example: Configuring Read/Write Hub-and-Spoke Replication with Synchronous Captures"
Queues store messages in an Oracle Streams environment. In an Oracle Streams messaging environment, queues store the messages produced and consumed by applications and users. In an Oracle Streams replication environment, queues store messages that contain information about database changes. Typically, each database in an Oracle Streams environment has one or more queues.
ANYDATA
queues make it easy to store messages of almost any type. When you use an ANYDATA
queue, you can, for example, store several different types of application messages in the same queue. ANYDATA
queues must be used to store information about database changes in an Oracle Streams replication environment.
To create an ANYDATA queue and its associated queue table:
In Oracle Enterprise Manager, log in to the database as the Oracle Streams administrator.
Go to the Database Home page.
Click Data Movement to open the Data Movement subpage.
Click Setup in the Streams section.
On the Oracle Streams: Setup Options page, click Messaging.
The Streams page appears, showing the Messaging subpage.
Click Create to open the Create Queue: Queue Type page.
Select Normal Queue, SYS.ANYDATA Datatype.
A queue of the ANYDATA
data type enables you to store messages of almost any type in a single queue.
Click Continue to open the Create Queue: Normal Queue, SYS.ANYDATA Datatype page.
Enter the name of the queue in the Name field. A typical queue name used in Oracle Streams environments is streams_queue
, but you can enter a different name.
Enter the name of the queue table owner and the queue table name in the Queue Table field. Typically, the Oracle Streams administrator owns Oracle Streams queues, and a typical queue table name is streams_queue_table
. Therefore, you can enter strmadmin.streams_queue_table
, or you can enter a different owner and name.
Ensure that the name of the Oracle Streams administrator is entered in the Queue User field.
Optionally enter a description for the queue in the Description field.
Click Finish to create the queue table and the queue.
If you were directed to this topic from another topic, then go back to the topic now:
"Task 2: Configuring the Queues and Propagation Between Them"
"Example: Configuring Read/Write Hub-and-Spoke Replication with Synchronous Captures"
See Also:
To establish a communication path between two locations in a distributed database environment, you must create a database link. A database link is a pointer that defines a one-way communication path from one database to another database. An Oracle database uses database links to enable users on one database to access objects in a remote database. A local user can use a database link to a remote database even if the local user is not a user on the remote database.
Because the GLOBAL_NAMES
initialization parameter is set to TRUE
for each database in your distributed environment, you use a global database name when you establish a link between two databases. Doing so ensures that each database link connects to the correct remote database.
Before you can create a database link between two databases, you must configure network connectivity so that the databases can communicate with each other. See Oracle Database 2 Day DBA for information about configuring network connectivity between databases.
To create a database link from the ii1.net database to the ii2.net database:
Log in to Enterprise Manager as an administrative user, such as the Oracle Streams administrator strmadmin
or SYSTEM
. The database link is created in the schema of this user.
Go to the Database Home page for the ii1.net
database instance.
Click Schema to open the Schema subpage.
Click Database Links in the Database Objects section.
On the Database Links page, click Create to open the Create Database Link page.
Enter the name of the database link in the Name field. The name should be the global name of the database to which you are linking. In this example, the database link name is ii2.net
.
In the Net Service Name field, enter the net service name of the database to which you are linking. In this example, the net service name is ii2.net
.
Select Fixed User in the Connect As section.
In the Username field, enter the user name of the user who will own the database link. The database link connects to this user on the remote database. In this example, you can enter an administrative user, such as system SYSTEM
, the Oracle Streams administrator strmadmin
, or a regular database user, such as oe
.
In the Password and Confirm Password fields, enter the password for the specified user on the remote database.
Click OK to create the database link.
If you were directed to this topic from another topic, then go back to the topic now:
"Example: Running a Stored Procedure in a Remote Oracle Database"
"Configuring Oracle Databases to Work with Non-Oracle Databases"
"Task 2: Configuring the Queues and Propagation Between Them"
"Example: Configuring Read-Only Hub-and-Spoke Replication with Local Capture"
"Example: Configuring Read-Only Hub-and-Spoke Replication with Downstream Capture"
"Example: Configuring Read/Write Hub-and-Spoke Replication with Capture Processes"
"Example: Configuring Read/Write Hub-and-Spoke Replication with Synchronous Captures"