Chat now with support
Chat with Support

SharePlex 8.6.6 - Upgrade Guide

Run SharePlex on Unix and Linux

On Unix and Linux systems, you start SharePlex by running the sp_cop program. After you activate a configuration, sp_cop spawns the necessary child replication processes on the same system. Each instance of sp_cop that you start is a parent to its own set of child replication processes. The sp_cop process must be started on each system that is part of the replication configuration.

You can start sp_cop in one of two ways:

  • From the operating system command line.
  • At system startup as part of the startup file.

IMPORTANT: Run SharePlex from either the korn (ksh) or C shell (csh) shell.

  • Do not use the Bourne shell (sh), because the way it handles background processes is not compatible with SharePlex. If you must use the Bourne shell, switch shells to ksh or csh to run SharePlex, then exit the shell and return to the Bourne shell.
  • If using an Exceed X window emulator, switch from the default shell of POSIX to the ksh shell, then run sp_cop from the ksh shell only.

Startup sequence on Unix and Linux

When you start systems that are involved in replication, start the components in this order:

  1. Start the system.
  2. Start the source and target databases.
  3. Start SharePlex.
  4. Start sp_ctrl.
  5. Verify that the SharePlex processes are started by issuing the lstatus command in sp_ctrl.

    sp_ctrl> lstatus

  6. Allow users on the system.

Start SharePlex on Unix and Linux

To start SharePlex, you must log onto the system as a SharePlex Administrator. Your user name must be assigned to the SharePlex admin group in the /etc/group file. For more information about user groups, see Assign SharePlex users to security groups.

Table 19: SharePlex startup syntax

Method Startup syntax
From root, with full path $ /productdir/bin/sp_cop [-uidentifier] [-s] &
CD to the product directory

$ cd /productdir/bin

$ ./sp_cop [-uidentifier] [-s] &

From a startup script


cd productdir\bin

nohup sp_cop [-uidentifier] [-s] &

Table 20: Description of SharePlex startup syntax

Argument Description
& Causes SharePlex to run in the background.
nohup Directs the startup of SharePlex to continue in the background after the current user logs out.
  • Starts sp_cop without starting the SharePlex replication processes (Capture, Read, Export, Import, Post). Without -s, the replication processes start automatically if there is an active configuration.
  • To start the replication processes after you start sp_cop with the -s option, use the startup command. The startup command starts all processes at once. Processes cannot be started individually after starting sp_cop with -s. Use the stop command if you must stop individual processes. See the SharePlex Reference Guide for more information about these commands.
  • -uidentifier

    Starts sp_cop with a unique identifier. Use this option when there are multiple instances of sp_cop running on a system, which is required for some SharePlex configurations. For more information, see Run multiple instances of SharePlex.

    Some suggestions for identifier are:

    • the SharePlex port number (such as -u2100)
    • the identifier of the database for which replication is running (such as -uora12c)
    • any descriptive identifier (such as -utest)

    Identify SharePlex processes on Unix and Linux

    Every session of sp_cop has a process ID number. The ID is returned after startup and then the command prompt reappears. If a configuration was activated during a former session of sp_cop, replication begins immediately. Without an active configuration, sp_cop runs passively in the background.

    On Unix and Linux systems, you can use the ps -ef | grep sp_ command to view the SharePlex processes that are running.

    • The sp_cop process is the root process.
    • The following child processes are spawned by sp_cop on a source system:

      • Command and Control process (sp_cnc)
      • Capture (sp_ocap)
      • Read (sp_ordr)
      • Export (sp_xport)
    • The following child processes are spawned by sp_cop on a target system:

      1. Command and Control process (sp_cnc)

      2. Import (sp_mport)
      3. Post (sp_opst_mt if the database is Oracle or sp_xpst if the database is Open Target)

    Each child process has the same -uidentifier as its parent sp_cop process. This makes it easier to identify related processes when multiple session of sp_cop are running.

    Stop SharePlex on Unix and Linux

    To stop SharePlex, issue the shutdown command in sp_ctrl. This is a graceful shutdown that saves the state of each process, performs a checkpoint to disk, read/releases buffered data, and removes child processes. Data in the queues remains safely in place, ready for processing when sp_cop starts again. The shutdown process can take some time if SharePlex is processing large operations.

    You can use the force option with the shutdown command to forcefully shut down replication if necessary. It terminates sp_cop immediately, bypassing normal shutdown procedures. See the SharePlex Reference Guide for more information about this command.

    Shutdown Considerations on Unix and Linux

    You can safely shut down SharePlex for a short time while there is still transactional activity. The next time you start SharePlex, replication resumes at the correct place in the redo logs or the archive logs, if needed. However, the best practice is to leave SharePlex running while there is transactional activity. Otherwise, SharePlex may need to process a large volume of redo backlog when you start it again, and there will be latency between the source and target data.

    If the redo logs wrap and the archive logs cannot be accessed, resynchronization of the source and target data may be the only option. Take this possibility into account whenever you stop SharePlex while redo is still being generated.

    Note: If you want to shut down both SharePlex and the database, shut down SharePlex first. Otherwise, SharePlex will interpret that the database is failing and generate a warning message.

    As an alternative to stopping SharePlex, you can use the stop command in sp_ctrl to stop individual SharePlex replication processes as needed. See the SharePlex Reference Guide for more information about this command.

    Related Documents

    The document was helpful.

    Select Rating

    I easily found the information I needed.

    Select Rating