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.
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:
You can run the same or different versions of SharePlex on the same system.
The disadvantages are:
To set up multiple instances of SharePlex in this configuration:
To install SharePlex, see the SharePlex Installation Guide.
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:
The disadvantages are:
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.
Assign each instance of sp_cop a unique port number.
The sp_cop process listens on each system on TCP and UDP ports for communications from SharePlex processes on other systems in the network, such as a command or 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.
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.
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
For each variable-data directory that you created, perform this procedure to set the port number that you reserved for this instance of SharePlex.
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
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
For each sp_cop instance, establish the connections that SharePlex will use to access the source or target data of this SharePlex instance.
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
Run the appropriate Database Setup utility for the database. For more information, see Database Setup Utilities in the SharePlex Reference Guide.
You can now run separate instances of sp_cop and sp_ctrl as needed.
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
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 &
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
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.
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.
Repeat the installation procedure for each SharePlex instance that you want to create, with the following differences:
All instances are controlled from the SpUtils utility.
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
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.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Conditions d’utilisation Confidentialité Cookie Preference Center