지금 지원 담당자와 채팅
지원 담당자와 채팅

SharePlex 10.2.1 - Installation and Setup Guide

About this Guide Conventions used in this guide SharePlex pre-installation checklist Download the SharePlex installer Installation and setup for Oracle cluster Installation and setup for remote capture Install SharePlex on Windows Assign SharePlex users to security groups Set up an Oracle environment for replication Set up replication from Oracle to a different target type Generic SharePlex demonstration-all platforms Advanced SharePlex demonstrations for Oracle Solve Installation Problems Database Setup Utilities General SharePlex Utilities Uninstall SharePlex SharePlex installed items

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;

Demonstration of data compare and repair

This demonstration shows you how to use the SharePlex compare command to compare the source and target data, and then repair rows that are out of synchronization.

  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, use the insert_demo_src script to insert rows into splex.demo_src.
  3. On the target, verify that all of the data posted to splex.demo_dest. If the command shows that data is still in the queue, issue the command again.

    sp_ctrl(target)>qstatus

  4. On the source, issue the compare command in sp_ctrl.

    sp_ctrl (source)>compare splex.demo_src

    Note: The command determines the correct target table from the configuration file.

  5. On the source, view the results of the comparison. There should be no rows out of synchronization.

    sp_ctrl(source)>compare status

  6. On the target, UPDATE splex.demo_dest to change the values of the NAME column in two or more rows. The UPDATE causes the source and target tables to be out of synchronization.

  7. On the source, issue the compare command again. It should show that the rows you updated in splex.demo_dest are out of synchronization.

    sp_ctrl(source)>compare splex.demo_src

  8. On the source, issue the repair command to repair the rows that are out of synchronization.

    sp_ctrl(source)> repair splex.demo_src

  9. On the source, verify that the repair was performed.

    sp_ctrl(source)>repair status

  10. On the target, you can manually verify that the repair was accurate by using a SELECT statement to view all rows in both tables.

    select * from splex.demo_src;

    select * from splex.demo_dest;

Demonstration of named post queues

This demonstration shows you how to use named post queues to process different tables through different, parallel Post processes to improve performance.

Clean up the replication environment

NOTE: The demonstration objects are assumed to be in the schema named splex.

  1. If you ran previous demonstrations, do the following:

    1. On the source and target, run sp_ctrl and issue the following command to shut down sp_cop.

      sp_ctrl(source)shutdown

      sp_ctrl(target)shutdown

    2. On the source and target, run the ora_cleansp or mss_cleansp utility according to the instructions in SharePlex utilities. This removes the queues from the previous demonstrations and deactivates the previous configuration.
  2. On the source, TRUNCATE the splex.demo_src. SharePlex replicates the TRUNCATE to the target.

    truncate table splex.demo_src;

Create a configuration file

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

You will configure the following:

  • demo_src on the source replicates through a post queue named q1 to target demo_dest.
  • demo_dest on the source replicates through a post queue named q2 to target demo_src.
  1. Run sp_ctrl.

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

    sp_ctrl(source)>create config postq_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 postq_config

Configuration templates

Oracle source to Oracle target

datasource:o.source_SID

splex.demo_src

splex.demo_dest

target_system:q1@o.target_SID

splex.demo_dest

splex.demo_src

target_system:q2@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:q1@r.database_name

splex.demo_dest

splex.demo_src

target_system:q2@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

Important! Make certain you created the scripts described in Prework for the demonstrations.

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.

  1. Activate the configuration.

    sp_ctrl(source)>activate config postq_config

    Note: Configuration names are case-sensitive.

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

    sp_ctrl(source)>list config

Generate data

On the source, run the following scripts to insert data into the two local demonstration tables (in this demonstration, the demo_dest table is used as a source):

  • Run the insert_demo_src script to insert 500 rows into the splex.demo_src table.
  • Run the insert_demo_dest script to insert 500 rows into the splex.demo_dest table.

View the post queues

  1. On the target, run sp_ctrl.
  2. On the target, issue the show post command with the detail option. This command shows statistics about the number of messages processed and the queues that were used.

    sp_ctrl(target)> show post detail

    In the output, the Queue field shows the name of each post queue, in this case q1 and q2, and the Operations Posted field shows the number of operations that were posted. Each queue should show 500 operations posted.

Advanced SharePlex demonstrations for Oracle

Contents

 

This chapter demonstrates selected features of SharePlex. These exercises can be run on Windows systems to demonstrate:

  • How to build and verify a replication configuration
  • How to use the compare command to verify synchronization
  • How to use partitioned replication to replicate subsets of data
  • How to use transformation to manipulate replicated data
  • How to use generic conflict resolution in peer-to-peer replication

  • Notes:
    • These are only demonstrations. Do not use them as the basis for deployment in a production environment. To properly implement replication in your environment, follow the instructions in the SharePlex Installation and Setup Guide and the SharePlex Administration Guide.
    • For more information about the commands used in the demonstrations, see the SharePlex Reference Guide.
    • The demonstrations assume that SharePlex is installed on a source system and one target system, and that any pre- and post-installation setup steps were performed. For more information, see theSharePlex Installation and Setup Guide.

  • 관련 문서

    The document was helpful.

    평가 결과 선택

    I easily found the information I needed.

    평가 결과 선택