Overview of Replica Creation


Replica creation includes these phases:

  1. Store-and-forward configuration: If you will use store-and-forward, you must configure the shipping.conf file (UNIX) or MultiSite Control Panel (Windows) at the exporting and importing replicas. See Configuring the Store-and-Forward Facility.
  2. Activation: If you are replicating a database set for the first time, you must activate the database set.
  3. Export: Enter a mkreplica –export command, which creates a new replica object and a replica creation packet.
  4. Transport: Send the replica-creation packet to one or more other sites.
  5. Database creation: At the location where the new replica is to be created, create empty vendor databases for the schema repository and each user database replica.
  6. Import: At the location where the new replica is to be created, import the replica-creation packet by using mkreplica –import.

This procedure is the same for all methods of packet delivery and for all platforms.

The following sections describe the phases in more detail.

Activating a Database

Before you can create the first replica of a database, you must activate the database set (a schema repository and its associated user databases). After you activate a database set, you can replicate it multiple times. A database set needs to be activated only once.

When you activate a database set, you assign it a clan name and site name and specify its synchronization server (the host that handles packets).

You activate a database set with the activate command. For more information, see the activate reference page.

Exporting a Replica-Creation Packet

You create a replica by generating replica-creation packets and sending them to the sites that will host the database replicas. You do this with the mkreplica –export command. For more details about using mkreplica –export, see the mkreplica reference page.

During the export phase of replica creation, the replica creation command locks the database while copying it. The database is locked for the entire length of time the command runs; logins are not allowed.

Before running the mkreplica –export command on a database:

The time required to create the packet depends on the size of the database and can be up to twice as long as the time required to make a copy of the database or run a backup procedure. Therefore, you must schedule the export phase of replica creation during nonbusiness hours for your site. You must also cancel any scheduled backups for the duration of the export phase.

In this example, a replica of the PRODA user database and its schema repository is created. The new site is named sanfran_hub and uses the synchronization server goldengate. This example uses store-and-forward to ship the replica-creation packets.

multiutil mkreplica –export –clan telecomm –site boston_hub –family PRODA 
–user susan –password passwd –maxsize 50m –fship –workdir c:\temp\packets 
–sclass cq_default goldengate:sanfran_hub 

Creating Empty Vendor Databases

Before you import a replica-creation packet, you must create an empty vendor database to contain the replica data. For instructions about creating vendor databases and a list of supported databases for MultiSite, see the installation information for Rational ClearQuest.

Note: To prevent data corruption, the code page, or character set, of your vendor databases should match the data code page value of your database set. For more information about code pages and the data code page value, see the Administrator’s Guide for Rational ClearQuest.

Caution: Do not create a ClearQuest database before receiving a database replica. A ClearQuest database is created when you import a replica packet into an empty vendor database. If you have created a ClearQuest database with the Maintenance Tool or ClearQuest Designer, the replica import fails.

Importing a Replica-Creation Packet

When you import a replica-creation packet, you import raw data into existing vendor databases. Replica-creation packets do not contain databases; they contain the metadata and record data that form a database. Packets are not vendor specific and can be used to create a schema repository or user database from any supported vendor database.

When you import a replica, remember the following:

To import a replica-creation packet, run the mkreplica –import command to import the replica data into the empty vendor database you’ve created. Enter the database parameters and login information for both the schema repository and user database you are importing.

Adding Additional Replicas

If you want to add a new user database replica to an existing site, you do not need to create a vendor database for the schema repository. If the new replica is in the same clan, the mkreplica –import command associates the new replica with the existing schema repository in the site. See the mkreplica reference page.

Recovering from a Failed Import

If the mkreplica –import process is interrupted or fails for any reason, follow these steps:

  1. Verify when the import failed. mkreplica –import generates error messages containing this information.
  2. Delete the vendor database where the import failed and create a new vendor database:
    • If the import failed during the import of the schema repository, delete the vendor database for the schema repository and create a new one.
    • If the import failed after a successful import of the schema repository, delete the vendor database for the user database replica and create a new one.
  3. Run mkreplica –import again.