立即与支持人员聊天
与支持团队交流

SharePlex 11.2 - Installation and Setup Guide

About this Guide Conventions used in this guide Revision History Installing and Setting up SharePlex on an Oracle Source
SharePlex Pre-installation Checklist for Oracle Download the SharePlex installer Install SharePlex on Linux and UNIX Set up an Oracle environment for replication Set up replication from Oracle to a different target type Installation and Setup for Cloud-Hosted Databases for Oracle Installation and setup for remote capture Installation and setup for HA cluster Generic SharePlex demonstration for Oracle Advanced SharePlex demonstrations for Oracle Database Setup Utilities Solve Installation Problems for Oracle
Installing and Setting up SharePlex on a PostgreSQL Database as Source and Service
SharePlex Pre-installation Checklist for PostgreSQL Download the SharePlex installer for PostgreSQL Install SharePlex on Linux for PostgreSQL as a Source Set up Replication from PostgreSQL to Supported Target Types Installation and Setup for Cloud-Hosted Databases for PostgreSQL Installation and Setup for Remote Capture for PostgreSQL Install SharePlex on PostgreSQL High Availability Cluster Generic SharePlex Demonstration for PostgreSQL Advanced SharePlex Demonstrations for PostgreSQL Database Setup for PostgreSQL Database Setup for PGDB as a Service Solve Installation Problems for PostgreSQL
Assign SharePlex users to security groups Solve Installation Problems Uninstall SharePlex Advanced installer options Install SharePlex as root SharePlex installed items

Prework for the demonstrations

Before you run the basic demonstrations, have the following items available.

Tables used in the demonstrations

You will replicate splex.demo_src from the source system to splex.demo_dest on the target system. These tables are installed by default into the SharePlex schema, which in these demonstrations is "splex." Your SharePlex schema may be different. Verify that these tables exist.

Description of the demo tables.
Column Name Data Type Null?
NAME varchar2(30)  
ADDRESS verchar2(60)  
PHONE varchar2(12)

 

INSERT scripts

  • Create a SQL script named insert_demo_src that inserts and commits 500 rows into the splex.demo_src table. You will run this script during some of the demonstrations.
  • If you will be using the demonstration of named post queues, create a SQL script named insert_demo_dest that inserts and commits 500 rows into the splex.demo_dest table. You will run this script during some of the demonstrations.

Start SharePlex

Start SharePlex

The following are instructions for starting SharePlex and the sp_ctrl command-line interface on Unix and Linux. Start SharePlex on the source and target systems.

To start SharePlex on Unix and Linux systems:

  1. Log onto the system as a SharePlex Administrator (a member of the SharePlex Admin group).
  2. From the bin sub-directory of the SharePlex product directory ( productdir in the following syntax), run sp_cop and sp_ctrl.

    $cd /productdir/bin

    $./sp_cop &

    $. /sp_ctrl

Create and activate a configuration

Create and activate a configuration for Oracle

SharePlex gets its replication instructions from a configuration file, which defines the objects that are to be replicated. The file specifies following:

  • The datasource (source database) — the identifier of the source database.
  • The source objects — the names of the objects that contain the data to be replicated.
  • The target objects — the names of the target objects that will receive the replicated data.
  • The routing map — the name of the target system and, if the target is a database, its identifier.

Note: This demonstration demonstrates replication from one database to another. It does not cover replication to a file or a messaging container.

Create a configuration file

Perform these steps on the source system. The demonstration objects are assumed to be in the schema named splex.

Perform the following steps to create a configuration file:

  1. Run sp_ctrl.

  2. Issue the following command to create a configuration file named sample_config in the default text editor.

    sp_ctrl(source)> create config sample_config

  3. In the text editor, build your configuration file based on the appropriate template, as shown in the Configuration templates. Allow no spaces between the characters in a component (source specification, target specification, routing map), and place at least one space between each component.

  4. Save the file, then exit the editor. SharePlex automatically saves the file in the config sub-directory of the variable-data directory.
  5. In sp_ctrl, verify that the configuration file will activate successfully.

    sp_ctrl(source)>verify config sample_config

Configuration templates
Oracle source to Oracle target

datasource:o.source_SID

splex.demo_src

splex.demo_dest

target_system@o.target_SID

where:

  • source_SID is the ORACLE_SID of the source database.
  • target_system is the name or IP address of the target system.
  • target_SID is the ORACLE_SID of the target database.
Oracle source to Open Target

datasource:o.source_SID

splex.demo_src

splex.demo_dest

target_system@r.database_name

where:

  • source_SID is the ORACLE_SID of the source database.
  • target_system is the name or IP address of the target system.
  • database_name is the name of the Open Target database.

Activate the configuration

Perform these steps on the source system. When you activate a configuration, SharePlex is ready to capture transactional changes that are made to the specified source data.

Perform the following steps to activate a configuration file:

  1. Activate the configuration.

    sp_ctrl(source)> activate config sample_config

    Note: Configuration names are case-sensitive.

  2. Confirm that the configuration activated successfully. The name sample_config should appear under File Name, and the word Active should appear under State.

    sp_ctrl(source)> list config

Troubleshooting tips

If your configuration activation fails, isue the view config sample_config command to view the file. Compare it to the template and make sure all of the information you entered is correct. Make certain you specified the correct database identifier. Check your syntax for extra spaces or missing components.

Because the configuration file is not active, you can edit it directly with the following command:

sp_ctrl(source)> edit config sample_config

Save the changes, then re-try the activation.

Note: To change an active configuration, you must copy it to a new file first, and then edit and activate the copy. For more information, see Add or Change Table Specifications in an Active Configuration in the SharePlex Installation and Setup Guide.

Demonstration of replication

This section demonstrates the speed and accuracy of SharePlex replication. It can also be used to verify that SharePlex was installed and configured correctly.

Verify replication startup

This test verifies that replication is working properly.

Perform these steps in the native SQL interface of the database:

  1. On the source, TRUNCATE splex.demo_src to make certain it is empty. SharePlex replicates the TRUNCATE to the target.

    truncate table splex.demo_src;

  2. Insert and commit a record into splex.demo_src:

    insert into splex.demo_src values (‘Jim’, ‘123 Main Street’, ‘123-456-7890’);

    commit;

  3. Verify that the record exists in splex.demo_dest on the target system:

    select * from splex.demo_dest;

    The query should show the replicated record, and only that record.

Verify replication of large data volumes

This test verifies that SharePlex replicates large volumes of data quickly and accurately.

Perform these steps in the native SQL interface of the database:

  1. On the source, TRUNCATE splex.demo_src to make certain it is empty. SharePlex replicates the TRUNCATE to the target.

    truncate table splex.demo_src;

  2. Run the insert_demo_src script to insert 500 rows into the splex.demo_src table.
  3. Verify that all of the record exist in splex.demo_dest on the target system:

    select count (*) from splex.demo_dest;

    The count should match the number of records inserted by the Inserts script.

Verify queuing and continuity of replication

This test shows you how:

  • SharePlex queues replicated data on the source system if the target system is unavailable.
  • SharePlex resumes replication from where it left off when the target becomes available.
  1. On the source, TRUNCATE splex.demo_src to make certain it is empty. SharePlex replicates the TRUNCATE to the target.

    truncate table splex.demo_src;

  2. On the target, shut down SharePlex to simulate that this system is unavailable.

    sp_ctrl(source)> shutdown

  3. On the source, run the insert_demo_src script to insert records into splex.demo_src.
  4. On the source, issue the following command to show the status of the local SharePlex queues.

    sp_ctrl(source)> qstatus

    The output should show a backlog of messages.

    Notes:

    • If SharePlex on the target were running instead of stopped, there would be no messages in the queue. Replication of 500 rows (and the clearing of the queues) would typically happen faster than the time it took to run the script and then issue the qstatus command. To confirm that the queues are storing the records, continue to issue the command. The backlog value should be the same each time.
    • If your environment permits it, you can perform the same test with the same results by unplugging the network connection to the source system before you run the script.
  5. On the target, start sp_cop to allow replication to resume.
  6. On the target, run sp_ctrl.

  7. On the target, verify that the SharePlex processes started.

    sp_ctrl(target)> status

  8. On the target, verify that the records inserted by the script on the source system now exist in the target database.

    select count (*) from splex.demo_dest;

    The count should match the number of records inserted by the Inserts script.

Verify SharePlex capture recovery

This test shows how SharePlex recovers after an interruption to data capture:

  1. On the source, TRUNCATE splex.demo_src to make certain it is empty. SharePlex replicates the TRUNCATE to the target.

    truncate table splex.demo_src;

  2. On the source, stop the Capture process.

    sp_ctrl(source)> stop capture

  3. On the source, run the Insert script to generate a transaction to splex.demo_src.

  4. On the source, start the Capture process.

    sp_ctrl(source)> start capture

  5. On the source, verify that Capture is running and that it processed the data. Look at Capture state and Operations captured.

    sp_ctrl(source)> status

  6. On the target, use the native SQL interface to verify that all records inserted by the script on the source now exist in the target database.

    select count (*) from splex.demo_dest;

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级