Chat now with support
Chat with Support

SharePlex 8.6.6 - Installation Guide

About this Guide Conventions used in this guide Introduction to SharePlex SharePlex pre-installation checklist Set up SharePlex in an Oracle cluster Set up SharePlex on Amazon Cloud Download SharePlex UNIX Installation and Setup Windows Installation and Setup Assign SharePlex users to security groups Basic SharePlex demonstrations Advanced SharePlex Demonstrations Solve Installation Problems Uninstall SharePlex SharePlex Utilities Appendix A: Advanced installer options Appendix B: Install SharePlex as root Appendix C: SharePlex installed items

Create and populate SharePlex groups on Windows

Assign SharePlex users to security groups > Create and populate SharePlex groups on Windows

On Windows, the SharePlex groups are created in the Windows User Accounts control panel by the SharePlex installer. To assign users to these groups, use that control panel after you install SharePlex.

Users can verify their authorization levels by issuing the authlevel command in sp_ctrl.

Basic SharePlex demonstrations

Basic SharePlex Demonstrations
Contents

 

This chapter demonstrates SharePlex replication using the sp_ctrl command-line interface. This demonstration can be run on Unix, Linux, or Windows systems.

Warning! These demonstrations are intended to introduce you to the SharePlex software. All of the demonstration components were created specifically for demonstration purposes, not deployment in a production environment. Do not use these demonstrations as the basis for establishing replication. To properly implement replication in your environment, use the SharePlex Administrator’s Guide.

Tip: The commands used in these demonstrations are described in more detail in the SharePlex Reference Manual.

These demonstrations assume that SharePlex is installed on one source system and one target system.

What you will learn

  • How to activate a configuration
  • How SharePlex replicates smoothly from source to target systems
  • How SharePlex quickly and accurately replicates large transactions
  • How SharePlex queues the data if the target system is unavailable
  • How SharePlex resumes from its stopping point when the target system is recovered
  • How SharePlex recovers after a primary instance interruption
  • How SharePlex replicates a TRUNCATE command
  • How SharePlex verifies synchronization and repairs out-of-sync rows When you complete these demonstrations, you may move on to the next chapter, which contains more advanced demonstrations of SharePlex performance and features.

Tables used in the demonstrations

The tables used in these demonstrations are source table demo_src and target table demo_dest, both of which are installed in the SharePlex schema when SharePlex is first installed. The demo tables are installed empty. In order to insure that each demo is started from a fresh state, please truncate the tables prior to beginning the demonstration.

You will replicate demo_src from a source instance on the source system (described as sysA) to demo table demo_dest in a target instance on another system, the target system (described as sysB).

For this documentation, the owner of the demo tables is assumed to be “splex,” which is the default name for the SharePlex Oracle user. If you assigned SharePlex a different user name, use that one.

You need to know the ORACLE_SID of your source and target instances. On Unix and Linux systems, the SID can be found by viewing the oratab file in the /etc directory (/var/opt/ oracle directory on Solaris platforms). You will see a display similar to this:

qa12:/qa/oracle/ora12/app/oracle/product/12.0

In the example, qa12 is the ORACLE_SID.

On Windows systems, the ORACLE_SID is in the Oracle entry in the Windows Registry.

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

Part 1: Start SharePlex

Basic SharePlex demonstrations > Part 1: Start SharePlex

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

To start SharePlex on Unix and Linux systems

Log onto the system as a SharePlex Administrator (a member of the SharePlex Admin group).

From the bin sub-directory of the SharePlex product directory (the one containing the binaries, represented by the productdir variable in the following syntax), run sp_cop and sp_ctrl.

$ cd /productdir/bin
 
$ ./sp_cop &
 
$ . /sp_ctrl

To start SharePlex on Windows systems

  1. Log onto the system as a SharePlex Administrator (a member of the SharePlex Admin group).
  2. On the Windows desktop, double-click the SpUtils shortcut to open the SharePlex Utilities dialog box.
  3. Click the SharePlex Services tab to display the SharePlex Services dialog box.
  4. In the Port list box of the SharePlex Services dialog box, select the SharePlex port number, then click Start.
  5. When the Current State text box shows that the service has started, click Close to close the dialog box.
  6. On the Windows desktop, double-click the sp_ctrl shortcut to open the sp_ctrl command prompt.

Part 2: Create and Activate a Configuration

Basic SharePlex demonstrations > Part 2: Create and Activate a Configuration

SharePlex gets its replication instructions from “configurations,” which are user-defined specifications that tell SharePlex what to do. For each group of objects that you want to replicate, you create a configuration file. Configurations reside on the source system and define:

  • The datasource (source database) — the ORACLE_SID of the Oracle database on the source system that contains the data to be replicated.
  • The source objects — the names of the objects within the source database that contain the data to be replicated. You can replicate some or all of the tables and sequences within a database.
  • The target objects — the names of the objects in the database on the target system that will receive the replicated data.
  • The routing map — the route for transporting the data. This includes the target system( s), any intermediary systems, and the target database’s ORACLE_SID. (An intermediary system is not used in this demonstration.)

To create the demonstration configuration

  1. Create a replication configuration named sample_config by issuing the create config command in sp_ctrl on the source system. This opens the default text editor, which is vi for Unix and Linux systems and WordPad for Windows systems.

    sp_ctrl(sysA)> create config sample_config

    Refer to Template 1 below as you construct your configuration.

    Template 1: Basic demonstration configuration sample_config

    datasource:o.source_SID  

     

    splex.demo_src splex.demo_dest targetsys@o.target_SID
  2. On the first non-commented line of the file, type the following, leaving no space between any of the items.

    datasource:o.source_SID

    (Substitute the ORACLE_SID of the source instance for source_SID.) This tells SharePlex where to find the table whose data will be replicated. The o. tells Share- Plex that Oracle data is being replicated.

  3. On the next line, enter the owner name (splex) and table name (demo_src) of the source table, separating the two items with a dot (.) but no spaces. Using the owner’s name with a table name ensures that SharePlex replicates the correct table, since different tables in different schemas in a database could have the same name.

    splex.demo_src
  4. Type at least a few spaces or a tab to create a second column. Do not press Enter.
  5. In the second column, enter the owner name (splex) and table name (demo_dest) of the target table, separating the two items with a dot (.) but no spaces.

    splex.demo_dest
  6. Type a few spaces or a tab to create a third column. Do not press Enter.

  7. In the third column, type the following items with no space between them. This creates the routing map for your configuration, telling SharePlex where to put the replicated data.

    • the name of the target system
    • the @ symbol
    • the letter o
    • a dot (.)
    • the target instance SID

    Example:

    sysB@o.oraB

  8. Save the file and exit the editor. This returns you to the sp_ctrl prompt.
  9. [OPTIONAL] To view the configuration, issue the view config command in sp_ctrl on the source system:

    sp_ctrl(sysA)> view config sample_config
  10. Activate the configuration in sp_ctrl on the source system. Configuration names are case-sensitive.

    sp_ctrl(sysA)> activate config sample_config
  11. To confirm that your configuration is active, type the following sp_ctrl command on the source system to display a list of all configurations. The sample_config configuration should appear under “File Name,” and the word “Active” should appear under “State.”

    sp_ctrl(sysA)> list config

Tip: If your configuration activation fails, use the view config sample_config command in sp_ctrl to view the file. Compare it to Template 1 on page 95 and make sure all of the information you entered is correct. For example, check for extra spaces that are not supposed to be there, or for missing components, such as the o. before the SID. For other configuration troubleshooting tips, refer to Chapter 3 of the SharePlex Reference Manual.

To correct mistakes in the configuration file:

Use the edit config sample_config command in sp_ctrl to correct mistakes in the configuration file before you activate it (or if the activation failed). This command opens the file in the text editor, and you can make the changes by editing the file. Save the changes, and re-try the activation. To change an active configuration, you must copy it to a new file first with the copy config command, and then edit and activate the copy. For more information about the copy config command, see the SharePlex Reference Manual.

Related Documents