Tchater maintenant avec le support
Tchattez avec un ingénieur du support

SharePlex 10.1.2 - Administration Guide

About this Guide Conventions used in this guide Overview of SharePlex Run SharePlex Run multiple instances of SharePlex Execute commands in sp_ctrl Set SharePlex parameters Configure data replication Configure replication to and from a container database Configure named queues Configure partitioned replication Configure replication to a change history target Configure a replication strategy Configure DDL replication Configure error handling Configure data transformation Configure security features Start replication on your production systems Monitor SharePlex Prevent and solve replication problems Repair out-of-sync data Tune the Capture process Tune the Post process Recover replication after Oracle failover Make changes to an active replication environment Apply an Oracle application patch or upgrade Back up Oracle data on the source or target Troubleshooting Tips Appendix A: Peer-To-Peer Diagram Appendix B: SharePlex environment variables

Run multiple instances of SharePlex

This chapter shows you how to configure and run multiple instances of SharePlex on one machine. For example, when replication is configured from multiple source systems to a central target system, you can run multiple instances of sp_cop to isolate the replication streams.

Contents

Run multiple instances of SharePlex from separate installations

Important! This topic assumes that there is no active configuration. It assumes you are configuring multiple instances of sp_cop as part of an initial setup of the replication environment.

This method provides a one-to-one relationship between the binaries and the variable-data directory. This procedure creates autonomous SharePlex instances, with nothing in common between them. You start, control and maintain each SharePlex instance separately, and there are no special setup requirements.

This method has the following benefits:

  • Processes are easily isolated. You do not have to set environment variables to point to the correct port and variable-data directory.
  • You can upgrade or perform other maintenance one product directory at a time, or choose not to perform those tasks.
  • You can run the same or different versions of SharePlex on the same system.

The disadvantages are:

  • You must install and upgrade each installation separately.
  • More disk space is required to store the product files.
  • In startup and shutdown scripts, and other places where you must map environment variables to SharePlex components, you must map them for each installation.

To set up multiple instances of SharePlex in this configuration:

  • Install each one separately. There should be one product directory and one variable-data directory per installation.
  • Install each one on a different TCP/IP port number.
  • Important! Make certain to create a different database account for each installation.

To install SharePlex, see the SharePlex Installation Guide.

Run multiple instances of SharePlex from one installation

Important! This topic assumes that there is no active configuration. It assumes you are configuring multiple instances of sp_cop as part of an initial setup of the replication environment.

This method provides a one-to-many relationship between a set of binaries and two or more variable-data directories. In this configuration, you create multiple variable-data directories and link each one to a unique port number, each running a separate instance of sp_cop. This method has the following benefits:

  • You install and upgrade only one installation of SharePlex. Maintenance procedures are performed for only one installation.
  • You conserve disk space, because you only store one set of SharePlex binaries and installed files.
  • The customization of the SharePlex monitoring scripts only need to be done once, in one place. For more information, see Run monitor scripts on Unix.
  • Startup and shutdown scripts only need to be created and run for one set of binaries.

The disadvantages are:

  • Processes must be directed to each instance. You must set environment variables for each instance, start sp_cop with the correct identifier for each instance, and set a port connection in sp_ctrl to ensure that commands are directed to the correct instance.
  • Upgrades apply to all instances of SharePlex.
  • All sp_cop instances are the same version of SharePlex.

How to run multiple sp_cop instances on Unix and Linux

To run multiple instances SharePlex on the same Unix or Linux machine, you run multiple instances of the sp_cop program, each running on a different port number. You link each sp_cop to a different variable-data directory. Each variable-data directory is identified by the port number of its sp_cop. Connection information to the source or target datastore is linked to each sp_cop instance.

1. Assign port numbers

Assign each instance of sp_cop a unique port number.

  • For each sp_cop instance, obtain one port number that will be used by that instance for both TCP and UDP communication.
  • For each sp_cop instance, use the same port number for the remote instances of sp_cop that will process the same replication data stream as the instance you are configuring.

The sp_cop process uses the TCP port for communication between two different systems in the network, such as data exchange between the Export and Import processes. If the ports are different, sp_cop on one system cannot connect to the sp_cop on another system to send or receive messages.

2. Create variable-data directories

For each instance of sp_cop, create a variable-data directory, and assign each to one of the port numbers you obtained. The variable-data directory contains the environment that is unique to a SharePlex instance.

  1. Install SharePlex according to the instructions in the SharePlex Installation Guide. At the end of the installation, you should have one product directory, one variable-data directory associated with a port number, and one database account. This is your base instance of SharePlex.
  2. Log in as a root user.
  3. Shut down sp_cop if it is running.
  4. Copy the original variable-data directory (with its sub-directories) to a new variable-data directory for each instance of sp_cop that you want to run. Include the port number in each name, as shown in the following examples.

    cp -p -r /splex/vardir/splex2100 /splex/vardir/splex2101

    cp -p -r /splex/vardir/splex2100 /splex/vardir/splex2102

3. Define the port numbers in the SharePlex environment

For each variable-data directory that you created, perform this procedure to set the port number that you reserved for this instance of SharePlex.

  1. Export the SP_SYS_VARDIR variable to point to one of the new variable-data directories, for example splex2101 in the preceding example.

    ksh shell:

    export SP_SYS_VARDIR=/full_path_of_variable-data_directory

    csh shell:

    setenv SP_SYS_VARDIR=/full_path_of_variable-data_directory

  2. Export the SP_COP_TPORT and SP_COP_UPORT variables to point to the port number of the variable-data directory that you exported.

    ksh shell:

    export SP_COP_TPORT=port

    export SP_COP_UPORT=port

    csh shell:

    setenv SP_COP_TPORT port

    setenv SP_COP_UPORT port

  3. Log in as SharePlex Administrator.
  4. Run the clean_vardir.sh script. The script removes duplicate replication queues and restores each one to a fresh state. See clean_vardir.sh in the SharePlex Reference Guide for more information.
  5. In the rim sub-directory of the exported variable-data directory, delete the shstinfo.ipc and shmaddr.loc files. (These files may not exist if sp_cop has never been started for this variable-data directory.)
  6. Repeat these steps for each additional variable-data directory.

4. Establish connections to the source or target datastore

For each sp_cop instance, establish the connections that SharePlex will use to access the source or target data of this SharePlex instance.

  1. Export the SP_SYS_VARDIR variable to point to one of the new variable-data directories, for example splex2101 in the example.

    ksh shell:

    export SP_SYS_VARDIR=/full_path_of_variable-data_directory

    csh shell:

    setenv SP_SYS_VARDIR=/full_path_of_variable-data_directory

  2. Run the appropriate Database Setup utility for the database. For more information, see Database Setup Utilities in the SharePlex Reference Guide.

  3. Repeat these steps for each additional variable-data directory.

5. Start sp_cop instances

You can now run separate instances of sp_cop and sp_ctrl as needed.

  1. Export the SP_SYS_VARDIR environment variable to point to the variable-data directory of the first sp_cop instance.

    ksh shell:

    export SP_SYS_VARDIR=/full_path_of_variable-data_directory

    csh shell:

    setenv SP_SYS_VARDIR=/full_path_of_variable-data_directory

  2. Start sp_cop with the -u option, where port is the port assigned to the sp_cop instance.

    /splex/proddir/bin/sp_cop -u port &

  3. In sp_ctrl, use the port command to set the session to the port number of the sp_cop instance you want the commands to affect.

    ./sp_ctrl

    port number

  4. Repeat these steps for each instance of sp_cop that you want to run.

Note: If you receive an error message similar to the following, find out if someone else started a session of sp_cop using the same port number and variable-data directory. If permissible, kill the processes associated with that session, then start sp_cop again.

Error cleaning up previous shared memory segment ###.

Cannot delete because there are users attached.

Check if SharePlex processes are running and kill them if necessary.

How to run multiple sp_cop instances on Windows

To run multiple instances of SharePlex on the same Windows machine, you install and run a SharePlex service for each instance, each with a different port number and variable-data directory.

1. Install the instances

  1. Install SharePlex on the source and target systems according to the directions in the SharePlex Installation Guide. This creates your initial instance of SharePlex.
  2. Repeat the installation procedure for each SharePlex instance that you want to create, with the following differences:

    • Use the same product directory for each instance.
    • Select or create a different variable-data directory for each instance.
    • Select a different port number for each instance. The installation program locates available ports, which you can override if necessary.
    • When prompted for a license key, use the same license key for all instances. Make certain to select the correct port each time.
    • When you run the Database Setup utility, use the correct port number for the instance, and use a different name for each database account.

2. Start the SharePlex instances

All instances are controlled from the SpUtils utility.

  1. Log onto Windows as a SharePlex Administrator (member of the spadmin group).
  2. Run the SpUtils utility.
  3. Select the SharePlex Services tab.
  4. Select the port number for the instance of SharePlex that you want to start.
  5. Under SharePlex Service Status, click Start. This starts the service for that instance.
  6. When the Current State text box shows that the service has started, you can start another instance of SharePlex.
  7. Run Sp_Ctrl for the instance.
  8. In Sp_Ctrl, use the port command to set the session to the port number of the sp_cop instance you want the commands to affect.

    sp_ctrl > port number

Execute commands in sp_ctrl

This chapter contains instructions for using the sp_ctrl command interface to execute commands that configure, control, and monitor SharePlex. The sp_ctrl program resides in the bin sub-directory of the SharePlex product directory.

Note: See the SharePlex Reference Guide for more information about the commands shown in this topic.

Contents
Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation