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

SharePlex 11.0 - SharePlex Reference Guide

About this guide Conventions used in this guide Revision History SharePlex Commands for Oracle SharePlex Commands for PostgreSQL SharePlex parameters General SharePlex utilities Database Setup utilities Oracle Cloud Infrastructure SharePlex environment variables

Drop Partition Scheme command for PostgreSQL

Use the drop partition scheme command to remove a partition scheme from the SharePlex replication configuration. This command also removes all of the row partitions that are specified for the partition scheme.

Reactivate the configuration file if the command affects a table that is already being replicated. SharePlex will only lock tables for which there are configuration changes.

For more information about how to configure horizontally partitioned replication, see the SharePlex Administration Guide.

Usage

Supported sources: PostgreSQL
Supported targets: PostgreSQL, Oracle, SQL Server, and Kafka
Issues on: source system
Related commands: add partition, modify partition, drop partition, view partitions

Syntax

Basic command

drop partition scheme scheme_name

Syntax Description
Syntax Component Description
scheme_name The name of the partition scheme.
Example

sp_ctrl> drop partition scheme sales

Edit config for PostgreSQL

Use the edit config command to modify an inactive configuration file. This command opens the configuration in SharePlex’s default text editor. Modify and save the configuration using the tools provided by the editor.

To modify an active configuration, it is recommended that you copy the active configuration with the copy config command, and then edit the copy with the edit config command. When you activate the copy, the original configuration deactivates.

To view a list of configurations on a system, use the list config command. To view the contents of a configuration, use the view config command.

Usage

Supported sources: PostgreSQL
Supported targets: PostgreSQL, Oracle, SQL Server, and Kafka
Issued for: source system
Related commands: activate config, copy config, create config, list config, rename config, verify config, view config

Syntax

Basic command
edit config filename
Syntax description
Component Description
filename

The name of the configuration that you want to edit. Configuration names are case-sensitive.

Example:

sp_ctrl(sysA)>edit config sales

Flush command for PostgreSQL

Use the flush command to stop the Post process at a certain point. It puts a marker in the data stream and automatically stops the Post process at the marker point. You can issue this command at a certain time or date – when month-end reports need to be generated, for example – and the data on the target system will reflect what was on the source system at the time the command was issued.

When you are performing backups, or when following certain documented SharePlex procedures, you issue the flush command after you stop user access on the source system to ensure that the last transaction gets posted to the target database before Post is stopped.

Starting Post again

Changes generated after the flush command accumulate in the queues and are applied to the target instance after you start Post again. Post remains stopped until the start post command is issued. Post keeps a record of where it stopped and resumes posting from that point to maintain synchronization.

Important: If users continue making changes on the source system while Post is stopped, data will accumulate in the post queue and possibly consume all available disk space. Remember to start Post as soon as permissible.

Note: The Status command for post will show "stopped due to flush"

Usage

Supported sources: PostgreSQL
Supported targets: PostgreSQL, Oracle, SQL Server, and Kafka
Issued for: source system

Syntax

Basic command Command options
flushdatasource

[tohost]

[queuequeuename]

[tohostqueuequeuename]

[tohost@target_SID]

[tohost@target_SIDqueuequeuename]

Syntax description
Component Description
datasource

This argument specifies the source data that the command will affect. Without additional options, it flushes the data through all queues on all target systems and stops Post.

datasource is expressed as r.dbname, where dbname is the database name of the source PostgreSQL instance.

Example: sp_ctrl(sysA)>flush r.dbname1

In the above example, the data for instance r.dbname1 is flushed to all target systems.

tohost

This option flushes all of the data replicating to a designated target system. Replication to other target systems is unaffected.

Example: sp_ctrl(sysA)> flush r.dbname1 to sysB

In the above example, the data is flushed from dbname1 to sysB.

queuequeuename

This option flushes data for a designated post queue. It flushes data flowing through all queues of that name on all target systems. This option is most useful when there are named post queues.

Example: sp_ctrl(sysA)> flush r.dbname1 queue sales

In the above example, the data is flushed for post queue sales on all target systems that have a post queue of that name.

tohostqueue queuename

This option flushes data for a designated post queue on a designated target system. Other post queues on that and other target systems are unaffected.

Example: sp_ctrl(sysA)> flush r.dbname1 to sysB queue sales

In the above example, the data is flushed for post queue sales on sysB.

tohost@datadest

This option flushes data to a designated target instance on a designated target system. It does not affect:

  • Other target instances on that system.
  • Other target instances with the same ORACLE_SID / database name on other target systems

In the syntax:

  • host is the target system’s name.
  • datadest is expressed as o.SID, where SID is the ORACLE_SID of the target instance.
  • datadest is expressed as r.dbname, where dbname is the database name of the PostgreSQL target instance.

Examples:

sp_ctrl(sysA)> flush r.dbname1 to sysB@r.dbname2 (PostgreSQL to PostgreSQL implementation)

In the above example, the data is flushed to database dbname2 on sysB.

sp_ctrl(sysA)> flush r.dbname1 to sysB@o.oraB (PostgreSQL to Oracle implementation)

In the above example, the data is flushed to Oracle instance oraB on sysB.

tohost@datadestqueuequeuename

This option flushes data for a designated post queue and target instance on a designated target system. It does not affect:

  • Other post queues for that instance or any other target instance on that system.
  • Other post queues on any other target system.

In the syntax:

  • host is the target system’s name.
  • datadest is expressed as o.SID, where SID is the ORACLE_SID of the target instance.
  • queuename is the name of the post queue.

Examples:

sp_ctrl(sysA)> flush r.dbname1 to sysB@r.dbname2 queue sales (PostgreSQL to PostgreSQL implementation)

In the above example, the data is flushed for post queue sales for target PostgreSQL database dbname2 on sysB.

sp_ctrl(sysA)> flush r.dbname1 to sysB@o.oraB queue sales (PostgreSQL to Oracle implementation)

In the above example, the data is flushed for post queue sales for target instance oraB on sysB.

 

List config for PostgreSQL

Use the list config command to view a list of all active and inactive configurations on a source system.

The command displays the following information:

  • File Name: The name of the configuration, the time and date that it was modified, and the size of the file.
  • State: Whether the configuration is active or inactive. Active means the configuration file is currently involved in replication. Inactive means the configuration is not currently involved in replication.
  • Datasource: The PostgreSQL instance containing the objects being replicated by the configuration.
  • Internal Name: The name of the internal copy of the active configuration. This is the file that SharePlex actually replicates from. Its name is displayed under the State heading wherever there is an active configuration.

Usage

Supported sources: PostgreSQL
Supported targets: PostgreSQL, Oracle, SQL Server, and Kafka
Authorization level: Viewer (3)
Issued for: source system
Related commands: view config, show config

Syntax

Basic command
list config
相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级