Strategies for information availability
With SharePlex, you can put a replica database to work as a reliable, continuously updated alternate database that can be used in many different ways. The following strategies enable you to get the right data to the people who need it, when they need it.
Note: Support for these topologies may vary depending on the type of database involved.
Figure 1: SharePlex replication strategies at a glance
Reporting instances
Targets maintained by SharePlex are ideal for offloading report and query processing because they are accessible while being kept up-to-date, and they can be optimized with keys and indexes designed for optimal query performance. You can run reports all day long, without complaints about performance from your OLTP users. Even during busy reporting times such as the end of the month or quarter, application response time will be unaffected by heavy reporting. And, your organization’s decision-makers will appreciate the accuracy of the data reflected in the reports. For more information, see Configure Replication to Share or Distribute Data.
Broadcast and cascade
When many remote users access or use data stored in a primary database, you can move their processing to one or more secondary databases that are kept current through SharePlex replication. That way, you can keep the primary database and system optimized for transactions. SharePlex also can cascade data through an intermediary system to remote systems, providing access for remote users who have no direct network connection to the primary database. For more information, see Configure Replication through an Intermediary System
Data warehousing
SharePlex can replicate from numerous source systems to one target system. This configuration is ideal for consolidating data in a data warehouse or a data mart so that information is available enterprise-wide for queries and reports. You have control over the data that is replicated and the option to transform any data to conform to a different target structure. These capabilities enable you to populate your data warehouse with the specific, timely information that users need to make good decisions. For more information, see Configure Replication to Maintain a Central Datastore.
High availability and disaster recovery
SharePlex can be used to maintain duplicate databases over local or wide-area networks. Production can move to the alternate sites in an emergency or in a planned manner when routine maintenance is performed on the primary server. SharePlex replication enables the secondary database to be used for queries and reporting. For more information, see Configure Replication to Maintain High Availability.
Peer-to peer
SharePlex supports replication among multiple source databases where applications on each system can make changes to the same data while SharePlex maintains synchronization. In this strategy, the databases are usually mirror images of each other, with all objects existing in their entirety on all systems. Although similar in benefit to a high-availability strategy, the difference between the two is that peer-to-peer allows concurrent changes to the same data, while high availability permits changes to the secondary database only in the event that the primary database goes offline. A few ways to use peer-to-peer replication are to maintain the availability and flexibility of a database by enabling access from different locations or to distribute heavy online transaction processing volumes among multiple access points. For more information, see Configure Peer-to-Peer Replication .
Test before you deploy
Before you implement SharePlex on production systems, make certain to perform tests in a mirror of the production environment to ensure that you configured SharePlex properly to support your requirements. Testing can uncover issues such as configuration errors and unexpected environmental issues, for example network or resource issues that affect replication performance or availability.
Additionally, it is assumed that your organization has in place an infrastructure that supports the use of enterprise applications such as SharePlex. These include, but are not limited to, the following:
- Availability and use of the database and SharePlex documentation
- Training programs for users
- Rollout and upgrade plans that ensure minimal interruption to business. When SharePlex is implemented as part of an application’s infrastructure, it is strongly recommended to test new application functionality in conjunction with SharePlex in a non-production environment.
- Database or system maintenance procedures that consider SharePlex dependencies, such as the proper shutdown of SharePlex processes and the preservation of unprocessed transaction records and replication queues to accommodate system or database maintenance.
- Sufficient security that prevents unauthorized persons from accessing SharePlex data records or making configuration changes.
The SharePlex Professional Services team can help you prepare for, install, and deploy SharePlex in your environment.
Run SharePlex
This chapter contains instructions for running SharePlex on UNIX, Linux, and Windows.
Contents
Run SharePlex on UNIX
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:
- Start the system.
- Start the source and target databases.
- Start SharePlex.
- Start sp_ctrl.
-
Verify that the SharePlex processes are started by issuing the lstatus command in sp_ctrl.
sp_ctrl> lstatus
- 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, see Assign SharePlex Users to Security Groups.
Table 1: SharePlex startup syntax
From root, with full path |
$ /productdir/bin/sp_cop [-uidentifier] & |
CD to the product directory |
$ cd /productdir/bin
$./sp_cop [-uidentifier] & |
From a startup script |
#!/bin/ksh
cd productdir\bin
nohup sp_cop [-uidentifier] & |
Table 2: Description of SharePlex startup syntax
& |
Causes SharePlex to run in the background. |
nohup |
Directs the startup of SharePlex to continue in the background after the current user logs out. |
-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.
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.
Run SharePlex on Linux for PostgreSQL
On Linux systems, 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.
Warning! 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.
Start SharePlex on 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, see Assign SharePlex users to security groups in the SharePlex Administrator's guide.
Table 3: SharePlex startup syntax
From root, with full path |
$ /productdir/bin/sp_cop [-uidentifier] & |
CD to the product directory |
$cd /productdir/bin
$./sp_cop [-uidentifier] & |
From a startup script |
#!/bin/ksh
cd productdir\bin
nohup sp_cop [-uidentifier] & |
Table 4: Description of SharePlex startup syntax
& |
Causes SharePlex to run in the background. |
nohup |
Directs the startup of SharePlex to continue in the background after the current user logs out. |
-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 in the SharePlex Administrator Guide.
Some suggestions for identifier are:
- the SharePlex port number (such as -u2100)
- the identifier of the database for which replication is running (such as -pg13c)
- any descriptive identifier (such as -utest)
|
Identify SharePlex processes on 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 Linux systems, you can use the ps -ef | grep sp_ command to view the SharePlex processes that are running.
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 Linux
Before shutting down the SharePlex process user should deactivate the active configuration and check the following processes:
- Capture/read/export on source
- Import/post on target are not running
For more information on this, see the Deactivate Config in the SharePlex Reference Guide.
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 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 WAL files, 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 WAL files backlog when you start it again, and there will be latency between the source and target data.
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.