サポートと今すぐチャット
サポートとのチャット

SharePlex 11.0 - SharePlex Installation and Setup Guide

About this Guide Conventions used in this guide Revision History SharePlex pre-installation checklist Download the SharePlex installer Installation and setup for Oracle cluster Installation and setup for remote capture Install SharePlex on Linux and UNIX 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 Advanced SharePlex Demonstrations for PostgreSQL Solve Installation Problems Database Setup Utilities General SharePlex Utilities Uninstall SharePlex Advanced installer options Install SharePlex as root Run the installer in unattended mode SharePlex installed items

Define a Unique Key

Define a Unique Key

If a table was not created with a primary or unique key, you can specify columns to use as a key when you specify the object in the configuration file. SharePlex uses the specified columns as a unique key in its WHERE clause to locate target rows for posting.

NoteS:
  • Without a primary or unique key, SharePlex uses all of the columns of a table (or all of the columns in a column partition) as a key, which slows replication performance.
  • When a key definition is specified for a table that has a PRIMARY or UNIQUE key, the key definition overrides the defined key. This can be useful if you do not want any of the existing keys to be used by SharePlex.

Define a unique key - Oracle to Oracle

The columns that you specify as a key must meet the following criteria:

  • They cannot be LONG or LOB columns.
  • They must be able to uniquely identify a row. Otherwise, replication could return out-of-sync errors or post to incorrect target rows.
  • They must be part of the column partition if the table is configured for vertically partitioned replication. When using the exclude column notation in vertical partitioning, the excluded columns cannot be used in the key definition. For more information, see Configure Partitioned Replication.
  • Include the columns in a supplemental log group. Otherwise, SharePlex must query the database for their values.
  • Create an index on the target table and add the index to the SharePlex hints file, located in the variable-data directory, which directs the Post process to use the index.

Syntax for key definition

To create a key definition, type a space after the source object and use the following syntax, including the parentheses.

src_owner.table !key (column_list)

where:

  • !key is a required keyword.
  • column_list is a list of columns to include in the key. Separate column names with commas. A space after the comma is optional.

datasource_specification

   
src_owner.table !key (col_name, col2_name, ...)

tgt_owner.table

host@o.SID

Example
Datasource:o.ora1
scott.tab !key(name,ID)    scott.tab2    sysB@oraB

Define a unique key - PostgreSQL to PostgreSQL

The columns that you specify as a key must meet the following criteria:

  • A unique key cannot be text, char with more than 2000 characters, varchar without size or more than 4000 characters.

  • They must be able to uniquely identify a row. Otherwise, replication could return out-of-sync errors or post to incorrect target rows.
  • They must be part of the column partition if the table is configured for vertically partitioned replication. When using the exclude column notation in vertical partitioning, the excluded columns cannot be used in the key definition. For more information, see Configure Partitioned Replication.

  • Create an index on the target table, it directs the Post process to use the index.

Syntax for key definition

To create a key definition, type a space after the source object and use the following syntax, including the parentheses.

src_schema.table !key (column_list)

where:

  • !key is a required keyword.
  • column_list is a list of columns to include in the key. Separate column names with commas. A space after the comma is optional.
(missing or bad snippet)    
src_schema.table !key (col_name, col2_name, ...)

tgt_schema.table

host@r.dbname

Example
Datasource:r.dbname
scott.tab !key(name,ID)    scott.tab2    sysB@dbname

Define a unique key - PostgreSQL to Oracle

The columns that you specify as a key must meet the following criteria:

  • A unique key cannot be text, char with more than 2000 characters, varchar without size or more than 4000 characters.

  • They must be able to uniquely identify a row. Otherwise, replication could return out-of-sync errors or post to incorrect target rows.
  • They must be part of the column partition if the table is configured for vertically partitioned replication. When using the exclude column notation in vertical partitioning, the excluded columns cannot be used in the key definition. For more information, see Configure Partitioned Replication.
  • Create an index on the target table and add the index to the SharePlex hints file, located in the variable-data directory, which directs the Post process to use the index.

Syntax for key definition

To create a key definition, type a space after the source object and use the following syntax, including the parentheses.

src_schema.table !key (column_list)

where:

  • !key is a required keyword.
  • column_list is a list of columns to include in the key. Separate column names with commas. A space after the comma is optional.

datasource_specification

   
src_schema.table !key (col_name, col2_name, ...)

tgt_owner.table

host@o.SID

Example
Datasource:r.dbname
"scott"."tab" !key(name,ID)    "scott"."tab2"    sysB@o.oraB
関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択