To establish multiple instances of sp_cop on one system 1 Install SharePlex in the normal manner according to the instructions in the SharePlex Installation and Demo Guide. SharePlex uses the default port of 2100. The following instructions assume, as an example, that the SharePlex product directory (containing the binaries) are installed in a directory named /splex/proddir, and the SharePlex variable-data directory is installed in a directory named /splex/vardir. (Your directories can be named any way you choose.) Now you will create a variable-data directory for each sp_cop. In this example, we will create two, one using port 2101 and one using port 2200. 2 Tar the original vardir [needs to be done as root] (variable-data directory) and its subdirectories. These commands put the resulting tar file in /splex (one directory up). Pay close attention to the dots in the tar com-mand. $ cd /splex/vardir $ tar cvf ../splex.tar . 3 Make new variable-data directories, each named for the port number (or another unique identifier) to be used by an sp_cop instance. (Note: In this example, we used 2101 for the first variable-data directory created, because the default port of 2100 has already been reserved for the original SharePlex installation on this system.) $ mkdir /splex/vardir/splex2101 (for the first instance of sp_cop) $ mkdir /splex/vardir/splex2200 (for the second instance of sp_cop) 4 Change directories into the variable-data directory made for port number 2101 (/splex/vardir/splex2101). $ cd /splex/vardir/splex2101 5 Untar the original variable-data directory structure into this directory. $ tar xvf /splex/splex.tar. 6 Repeat steps 4 and 5 for the other port?s variable-data directory. $ cd /splex/vardir/splex2200 $ tar xvf /splex/splex.tar 7 You now need to set the port number for each variable-data directory that you have created. Within each of these directories is a paramdb file. This is where user-defined SharePlex parameters are stored. A SharePlex Administrator must perform this operation. Please refer to page 345 for instructions on setting the port numbers. 8 (Perform this step only if you are already replicating.) Log on as a SharePlex Administrator and run the clean_vardir.sh script for each port/variable-data directory that you have created. This removes the duplicated replication queues from the new directories and makes sure each directory is in a fresh state. Before you run clean_vardir.sh for a directory, you must export the correct SP_SYS_VARDIR environment variable for that directory. Syntax: bourne or korn shell $ export SP_SYS_VARDIR=/splex/vardir/splex2101 $ /splex/proddir/bin/clean_vardir.sh $ export SP_SYS_VARDIR=/splex/vardir/splex2200 $ /splex/proddir/bin/clean_vardir.sh To establish the Oracle users for each instance of sp_cop Each variable-data directory for which you want to run an instance of sp_cop requires an Oracleuser account. This allows the SharePlex Post processes established by sp_cop to perform the necessary changes to the target tables. To create the accounts, run the SharePlex ora_setup programfor each sp_cop instance, twice in this example. To keep each account straight, we recom-mend that you name the accounts to reflect their port numbers, i.e. ?splex2101,? ?splex2200.? Each time before you run ora_setup, you will need to export the SP_SYS_VARDIR environ-mentvariable that points to the correct variable-data directory. Please refer to "Running ora_setup" on page 400 for instructions on running ora_setup. To run multiple instances of sp_cop on one system To run the multiple sp_cop sessions, you start a session of sp_cop for each variable-data direc-tory. Follow these steps: 1 Export the SP_SYS_VARDIR environment variable to point to the first variable-data direc-tory (/splex/vardir/splex2101 in the example given). $ export SP_SYS_VARDIR=/splex/vardir/splex2101. 2 Start sp_cop by typing the absolute path name and the ?uportnumber argument, where ?port-number? is the port number assigned to the first variable-data directory?s sp_cop instance. This points SharePlex to the correct port and allows you to see that sp_cop instance whenyou use the ps command. Use the & argument to run sp_cop in the background. $ /splex/proddir/bin/sp_cop -u2101 & 3 To r un sp_ctrl for that instance of sp_cop, start sp_ctrl and issue the port command as shown in the syntax. $ ./sp_ctrl sp_ctrl(sysA)> port 2101 4 Repeat the preceding steps for each variable-data directory/port. Example syntax for a second variable-data directory: $ export SP_SYS_VARDIR=/splex/vardir/splex2200 $ /splex/proddir/bin/sp_cop -u2200 & $ ./sp_ctrl sp_ctrl(sysB)> port 2200