Converse agora com nosso suporte
Chat com o suporte

SharePlex 12.0 - Administration Guide

Revision History About this Guide Conventions used in this guide Overview of SharePlex Run SharePlex Run multiple instances of SharePlex Execute commands in sp_ctrl Set SharePlex parameters Configure data replication Configure replication to and from a container database Configure named queues Configure partitioned replication Configure replication to a change history target Configure a replication strategy Configure DDL replication Configure error handling Configure data transformation Configure security features Assign SharePlex users to security groups Start replication on your production systems Monitor SharePlex Prevent and solve replication problems Repair out-of-sync data Tune the Capture process Tune the Post process Recover replication after Oracle failover Make changes to an active replication environment Apply an Oracle application patch or upgrade Back up Oracle data on the source or target Troubleshooting Tips Appendix A: Peer-To-Peer Diagram Appendix B: SharePlex environment variables

Set the SharePlex port number

Set the SharePlex Port Number

The SharePlex processes use TCP to communicate with each other between different systems and uses UDP to communicate within a system. The default TCP and UDP port numbers for SharePlex are both set to 2100 at the time of installation. For some deployments of SharePlex you may need to change the TCP or UDP port numbers.

Before selecting a port number, review the following points:

  • If your replication strategy requires multiple instances of sp_cop on a system, you must set a unique port number for each one. For more information, see Run Multiple Instances of SharePlex.
  • When an non-default port is required, the same number must be used for both the TCP and UDP ports, and it must be used for the TCP and UDP ports of all other instances of sp_cop that are involved in the same replication configuration. If the ports are different, sp_cop on one system cannot connect to the sp_cop on another system to send or receive messages and data.

Supported databases

All databases supported by SharePlex on all supported platforms

Set the SharePlex port on Unix and Linux systems

To set the port number on Unix and Linux systems, a SharePlex Administrator must set both the TCP and UDP port parameters in the SharePlex environment. If there is an active configuration, you will be instructed to stop access to the source objects and shut down sp_cop.

To finish setting the port in an active configuration:

  1. (If using multiple variable-data directories] Export the SP_SYS_VARDIR environment variable to point to the correct variable-data directory for the port you are setting.

    ksh shell:

    export SP_SYS_VARDIR=/full_path_of_variable-data_directory

    csh shell:

    setenv SP_SYS_VARDIR=/full_path_of_variable-data_directory

  2. Export the following environment variables.

    ksh shell:

    export SP_COP_TPORT=port

    export SP_COP_UPORT=port

    csh shell:

    setenv SP_COP_TPORT port

    setenv SP_COP_UPORT port

    where: port is the new port number

  3. Change directories to the SharePlex product directory.
  4. Start sp_cop and sp_ctrl.

    Note:If you are using multiple variable-data directories, start sp_cop with the -uport option, where port is the port number that you have chosen for the variable-data directory that you exported.

    ./sp_cop [-uport] &

  5. Run sp_ctrl.

    ./sp_ctrl

  6. In sp_ctrl, set the following SharePlex parameters.

    sp_ctrl> set param SP_COP_TPORT port

    sp_ctrl> set param SP_COP_UPORT port

  7. Do one of two things:

    • If there is not an active configuration, use the shutdown command in sp_ctrl to stop sp_cop. The next time you start sp_cop, the new port number takes effect.

      NOTE: If you do not have an active configuration, you are finished setting the port number.

    • If there is an active configuration, continue to the next step.

  8. Stop access to the replicating objects on the source system, then issue the flush command in sp_ctrl on the source system to clear the queues.

    sp_ctrl> flush o.database_identifier

    where: database_identifier is o. followed by the Oracle SID, TNS alias, or PDB name that SharePlex uses to connect to the source database (depends on whether the database is a regular Oracle instance, RAC, or PDB in a container database).

  9. On the source system, issue the qstatus command to verify that all of the messages reached the target system.

    sp_ctrl> qstatus

    Continue to issue the command until the export queue is empty.

  10. On the target system, issue the qstatus command to verify that all of the messages were posted to the database. Continue to issue the command until the post queue is empty.
  11. On the target system, issue the status command to verify that Post stopped.

    sp_ctrl> status

  12. Shut down SharePlex on the source and target systems.

    sp_ctrl> shutdown

  13. Start sp_cop on the source and target systems.

    Note:If you are using multiple variable-data directories, start sp_cop with the -uport option, where port is the port number that you have chosen for the variable-data directory that you exported.

    ./sp_cop [-uport] &

  14. Run sp_ctrl on the target system.
  15. Start the Post process.

    sp_ctrl> start post

  16. Allow users to access the replicating objects.
  17. Use the status command on the source and target systems to verify that all SharePlex processes are running.

    sp_ctrl> status

Set the SharePlex port on Windows systems

On Windows systems, SharePlex port numbers are stored in the Windows Registry. If it becomes necessary to change a port number, this is the SharePlex entry location:

\HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex.

  1. Log onto Windows as a SharePlex Administrator using your system password and user name. Your user name must be assigned to the SharePlexAdmin group.
  2. Run the SpUtils utility.
  3. Select the SharePlex Services tab.
  4. Under Port, select the port number for the instance of SharePlex whose port you want to change.
  5. Under SharePlex Service Status, click Stop.
  6. Click Close.
  7. From the Start menu, select Run.
  8. In the Run dialog box, type regedit to open the Registry Editor.
  9. In the Registry Editor, under \HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex, right click the current port number, then select Rename.
  10. Replace the highlighted port number with the new number.
  11. Click the new port number to highlight it.
  12. In the Name column of the right-hand pane, right-click the SP_SYS_VARDIR entry that is associated with the new port number, then select Modify.
  13. In the Edit String dialog, change the port number (only the port number) in the path to the new port number, then click OK.
  14. Exit the Registry Editor.
  15. In the Windows file explorer, navigate to the variable-data directory for which you changed the port number (the one whose name still shows the old port number).
  16. Right click the name, and then use the Rename command to change only the port number in the name to the new port number.
  17. Run the SpUtils utility, then select the SharePlex Services tab.
  18. Under Port, select the new port number.
  19. Under SharePlex Service Status, click Install to establish the SharePlex service under the new port.
  20. After Current State shows that the service is installed, click Start to start the service.

Initial Database Synchronization for PostgreSQL to PostgreSQL Replication

This section provides information about how initial synchronization of the database is performed when replicating data from PostgreSQL to PostgreSQL (cloud target databases).

You can set up an active replication between the following source and target platform combinations:

  • On-Prem Logical Source to Aurora Target

  • On-Prem Physical Source to Aurora Target

  • Azure Flexi Server Source to Aurora Target

  • Aurora Source to Azure Flexi Target

  • Aurora Source to On-Prem Target

To set up an active replication:

  1. Run the pg_setup utility on both the source and target servers to prepare the environment.

  2. Start SharePlex and execute the stop post command on the target server:

    sp_ctrl (pslrhel7linux01:4073)> stop post

    It ensures that even if a configuration file is not activated on the source, the Poster queue will be created but remain stopped.

  3. Close access to the source database for users.

  4. Activate the configuration file on the source.

    sp_ctrl> activate config <config_file_name>

    This creates the necessary replication slot as defined in pg_setup.

  5. In the source database, create a snapshot while keeping the session open:

    begin transaction isolation level REPEATABLE READ;

    select pg_export_snapshot();

  6. Use the following snapshot to run pg_dump on the source:

    pg_dump --snapshot=00000003-000001BC-1 -d <database_name> -Fc -b -v -f dump04172024.sql -n <schemas>

    For example:

    pg_dump --snapshot=00000003-000001BC-1 -d testdb -Fc -b -v -f dump04172024.sql -n splex --username=splex

  7. Resume user access to the source database while pg_dump is in progress.

  8. Use the dump file to execute pg_restore on the target database after pg_dump is completed:

    pg_restore -v -h pslaurorapgdb01.cihp157rpcvu.us-west-1.rds.amazonaws.com -U splex -d auroratest -j2 dump04172024.sql -n splex

  9. Once pg_restore is executed, log in to the target database and check the tables.

  10. After successful restoration, start the post queue on the target server using start post in sp_ctrl:

    sp_ctrl> start post

  11. Validate replication to ensure everything is working correctly.

 

Apply an Oracle application patch or upgrade

This chapter contains procedures to follow when you need to apply an application patch or upgrade and there is an active replication configuration. These procedures apply to Oracle databases.

Contents

Before you patch or upgrade an application

Review the following topics before you patch or upgrade an application on a system where SharePlex replication is active.

Which procedure to use?

There are different procedures for applying an application patch or upgrade to an Oracle database while replication is in process. Which one to choose depends on what changes the patch or upgrade makes.

Changes made by the patch/upgrade Steps to take

If the patch/upgrade applies DDL that is not supported by SharePlex. For details on the DDL that SharePlex supports, see the SharePlexSharePlex Release Notes.

Manually apply the patch/upgrade to the source and target by following either of these procedures:

Apply Patch/Upgrade to Source then Copy it to Target

Apply Patch/Upgrade to Source and Target

If the patch/upgrade does any of the following:

  • Performs DML changes.
  • Performs supported DDL on the source system. For details on the DDL that SharePlex supports, see the SharePlexSharePlex Release Notes.
  • Changes users and security on source system (other than SharePlex)

Manually apply the patch/upgrade to the source, then allow SharePlex to replicate the changes to the target. Follow this procedure:

Apply Patch to Source and Replicate it to the Target

Note: Because this procedure assumes that SharePlex can replicate all of the changes that the patch or upgrade applies, the patch/upgrade is not applied to the target.

The effect of patches and upgrades on partitioned replication

A patch or upgrade can make changes that affect the column partitions of vertically partitioned replication in your configuration file. Take the following into account when you perform this procedure.

If the patch or upgrade does this to a table: Do this:
Adds columns that do not satisfy the column partition of the table (Optional) Drop the columns from the target table after the patch or upgrade is applied.
Adds columns that need to be in the column partition of the table Add those columns to the source and target column partition lists in the configuration file.
Drops columns that are part of the column partition of the table

Remove those columns from the source and target column partition lists in the configuration file.

Changes the name of a column that is in the column partition of a table Change the column name in the source and target column partition lists in the configuration file.

For more information, see Configure Vertically Partitioned Replication.

Naming conventions used

In these procedures, the "source" system is one of the following:

  • The source system of a single-direction replication configuration, including cascading replication.
  • All source systems of a consolidated replication configuration.
  • The trusted source system in a peer-to-peer replication configuration.

In these procedures, the "target" system is one of the following:

  • The target system of a single-direction replication configuration, including cascading and consolidated replication.
  • The secondary systems in a peer-to-peer replication configuration.

In this procedure, the SharePlex commands in the procedure apply to all sp_cop instances that apply to the replication strategy you are using (for example, all sp_cop processes on a target in consolidated replication).

Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação