Skip Headers
Oracle® Database Workspace Manager Developer's Guide
11g Release 2 (11.2)

Part Number E11826-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

C Using Replication with Workspace Manager

Workspace Manager supports replication of all workspace-related entities (such as workspaces and savepoints), operations (such as CreateWorkspace and MergeWorkspace), and DML and DDL operations on version-enabled tables. To use replication in a Workspace Manager environment, you must understand the major replication concepts and techniques, as documented in Oracle Database Advanced Replication and Oracle Database Advanced Replication Management API Reference. However, some special guidelines and procedures apply to replication with Workspace Manager, as described in this appendix.

Workspace Manager supports multimaster replication in an asynchronous mode with certain restrictions. The main restriction imposed on the replication sites is that only the master definition site in the multimaster setup can perform workspace operations and DML and DDL operations on version-enabled tables. All other sites are disallowed from performing any write operations. All read operations, such as GotoWorkspace or SELECT queries on version-enabled tables, are allowed on all sites in the replication environment.

In a Workspace Manager replication environment, the master definition site is referred to as the writer site, and all other master sites in the multimaster group are referred to as nonwriter sites.

To call any of the Workspace Manager replication support subprograms, you must be the replication administrator at all the master sites. You must also be registered as the receiver for all groups at the local master definition site. If the master definition site is changed using the RelocateWriterSite procedure, you must be registered as the receiver for all groups at the new writer site.

C.1 Setting Up Replication with Workspace Manager

This section describes the typical steps for setting up a replication environment for a database with workspaces and version-enabled tables.

  1. Set up users and database links for replication, according to the guidelines and procedures in Oracle Database Advanced Replication.

  2. Generate replication support for the Workspace Manager environment by executing the GenerateReplicationSupport procedure at the site chosen to be the writer site. The following example creates a replication group named OWM-GROUP and designates BACKUP-SITE1.EXAMPLE.COM and BACKUP-SITE2.EXAMPLE.COM as nonwriter sites.

    DBMS_WM.GenerateReplicationSupport(
       mastersites       =>  'BACKUP-SITE1.EXAMPLE.COM, BACKUP-SITE2.EXAMPLE.COM'),
       groupname         =>  'OWM-GROUP',
       groupdescription  =>  'OWM Replication group for Example Corp.');
    

    If you need to drop replication support for the Workspace Manager environment, execute the DropReplicationSupport procedure.

    For reference and usage information about these procedures, see the sections on the GenerateReplicationSupport and DropReplicationSupport procedures in Chapter 4.

    After replication is set up, the specified group appears as a regular group in the Replication catalog. In addition, for each version-enabled table at the local master definition site, Workspace Manager creates a group with a name in the form WM$<object-id>, where <object-id> is the object ID of the table <table-name>_LT at the local site. The groups that you specify and the groups created by Workspace Manager can be managed using standard the replication API or Oracle Enterprise Manager.

C.2 Enabling and Disabling Versioning of Tables with Replication Support

After Workspace Manager replication support has been set up (as described in Section C.1), you can version-enable a table to be replicated by executing the EnableVersioning procedure on the writer site, as long as the table is defined in exactly the same way on all the nonwriter sites. For example, to enable versioning on the SCOTT.EMP table on all master sites, execute the following as the replication administrator on the writer site:

SQL> EXECUTE DBMS_WM.EnableVersioning('SCOTT.EMP');
 

This example performs the following operations:

To disable versioning on a table in a Workspace Manager replication environment, execute the DisableVersioning procedure on the writer site. For example, to disable versioning on the SCOTT.EMP table on all master sites, execute the following as the replication administrator on the writer site:

SQL> EXECUTE DBMS_WM.DisableVersioning('SCOTT.EMP');
 

This example performs the following operations:

C.3 DDL Operations with Replicated Version-Enabled Tables

To perform DDL operations on any version-enabled table, you must follow the guidelines in Section 1.8. If the version-enabled table is replicated, the following additional guidelines apply:

C.4 Relocating the Writer Site

The writer site in a Workspace Manager replication environment can be changed after the environment is set up without quiescing the master groups. Relocating the writer site is especially useful when the writer site becomes unavailable and a new writer site needs to be specified.

To relocate the writer site, execute the RelocateWriterSite procedure. For guidelines and an example, see the reference information about the RelocateWriterSite procedure in Chapter 4.

If the old writer site is not available when you relocate the writer site, you must execute the SynchronizeSite procedure after the old writer site becomes available. For guidelines and an example, see the reference information about the SynchronizeSite procedure in Chapter 4.