• Non ci sono risultati.

Adding a New Database to an Existing Multiple-Source Environment

2. Start each Streams client you stopped in Step 2 on page 8-11 in "Adding Shared Objects to an Existing Multiple-Source Environment":

Use the START_CAPTURE procedure in the DBMS_CAPTURE_ADM package to start a capture process.

Use the START_PROPAGATION procedure in the DBMS_PROPAGATION_ADM package to start a propagation.

Use the START_APPLY procedure in the DBMS_APPLY_ADM package to start an apply process.

Adding a New Database to an Existing Multiple-Source Environment

Figure 8–4 shows the additional configuration steps that must be completed to add a source/destination database to a multiple-source Streams environment.

Figure 8–4 Example of Adding a Database to a Multiple-Source Environment See Also: Oracle Streams Concepts and Administration for more information about completing these tasks

Existing Source / Destination Database

Added database

links for propagations Additional configuration includes:

· A SYS.AnyData queue to stage changes from the new source database (optional)

· Each shared object prepared for instantiation

· A propagation for the added database

· Instantiation SCN set for each shared object for the added source database

· An apply process for the added source database

· Rule sets for the added propagation and apply process

· · ·

Additional

Source / Destination Databases

Added Source / Destination Database

Additional configuration includes:

· One or more SYS.AnyData queues

· Supplemental logging specifications

· Each shared object prepared for instantiation

· One or more capture processes

· One propagation for each of the other destination databases

· Instantiation SCN set for each shared object for each of the other source databases

· One apply process for each of the other source databases

· Rule sets for the capture process(es), propagation(s), and apply process(es)

· Conflict resolution if necessary

Adding a New Database to an Existing Multiple-Source Environment

Complete the following steps to add a new source/destination database to an existing multiple-source Streams environment:

1. Complete the necessary tasks to prepare each database in your environment for Streams:

Configure a Streams administrator.

Set initialization parameters relevant to Streams.

For each database that will run a capture process, prepare the database to run a capture process.

Configure network connectivity and database links.

Some of these tasks might not be required at certain databases.

2. Create any necessary ANYDATA queues that do not already exist. When you create a capture process or apply process, you associate the process with a specific ANYDATA queue. When you create a propagation, you associate it with a specific source queue and destination queue. See "Creating an ANYDATA Queue to Stage LCRs" on page 9-7 for instructions.

3. Create one or more apply processes at the new database to apply the changes from its source databases. Make sure each apply process uses rule sets that are

appropriate for applying changes. Do not start any apply process at the new database. See "Creating an Apply Process that Applies LCRs" on page 9-9 for instructions.

Keeping the apply processes stopped prevents changes made at the source databases from being applied before the instantiation of the new database is completed, which would otherwise lead to incorrect data and errors.

4. If the new database will be a source database, then, at all databases that will be destination databases for the changes made at the new database, create one or more apply processes to apply changes from the new database. Make sure each apply process uses rule sets that are appropriate for applying changes. Do not start any of these new apply processes. See "Creating an Apply Process that Applies LCRs" on page 9-9 for instructions.

5. Configure propagations at the databases that will be source databases of the new database to send changes to the new database. Make sure each propagation uses rule sets that are appropriate for propagating changes. See "Creating a

Propagation that Propagates LCRs" on page 9-7.

6. If the new database will be a source database, then configure propagations at the new database to send changes from the new database to each of its destination databases. Make sure each propagation uses rule sets that are appropriate for propagating changes. See "Creating a Propagation that Propagates LCRs" on page 9-7.

Note: Make sure no changes are made to the objects being shared at the database you are adding to the Streams environment until the instantiation at the database is complete.

See Also: Oracle Streams Concepts and Administration for more information about preparing a database for Streams

Adding a New Database to an Existing Multiple-Source Environment

7. If the new database will be a source database, and the shared objects already exist at the new database, then specify any necessary supplemental logging for the shared objects at the new database. See "Managing Supplemental Logging in a Streams Replication Environment" on page 9-3 for instructions.

8. At each source database for the new database, prepare for instantiation each database object for which changes will be applied by an apply process at the new database. Run either the PREPARE_TABLE_INSTANTIATION, PREPARE_

SCHEMA_INSTANTIATION, or PREPARE_GLOBAL_INSTANTIATION procedure in the DBMS_CAPTURE_ADM package for the specified table, specified schema, or entire database, respectively. See "Preparing Database Objects for Instantiation at a Source Database" on page 10-1 for instructions.

9. If the new database will be a source database, then create one or more capture processes to capture the relevant changes. See "Creating a Capture Process" on page 9-1 for instructions. Oracle recommends that you use only one capture process for each source database.

When you use a procedure in the DBMS_STREAMS_ADM package to add the capture process rules, it automatically runs the PREPARE_TABLE_

INSTANTIATION, PREPARE_SCHEMA_INSTANTIATION, or PREPARE_GLOBAL_

INSTANTIATION procedure in the DBMS_CAPTURE_ADM package for the specified table, specified schema, or entire database, respectively, if the capture process is a local capture process or a downstream capture process with a database link to the source database.

You must run the appropriate procedure to prepare for instantiation manually if any of the following conditions is true:

You use the DBMS_RULE_ADM package to add or modify rules.

You use an existing capture process and do not add capture process rules for any shared object.

You use a downstream capture process with no database link to the source database.

If you must prepare for instantiation manually, then see "Preparing Database Objects for Instantiation at a Source Database" on page 10-1 for instructions.

10. If the new database will be a source database, then start any capture process you created in Step 9 using the START_CAPTURE procedure in the DBMS_CAPTURE_

ADM package.

After completing these steps, complete the steps in the appropriate section:

If the objects that are to be shared with the new database already exist at the new database, then complete the steps in "Configuring Databases If the Shared Objects Already Exist at the New Database" on page 8-18.

If the objects that are to be shared with the new database do not already exist at the new database, complete the steps in "Adding Shared Objects to a New Database" on page 8-19.

Adding a New Database to an Existing Multiple-Source Environment