Chat now with support
Chat with Support

SharePlex 8.6.6 - Administration Guide

About this Guide Conventions used in this guide Overview of SharePlex Run SharePlex Run multiple instances of SharePlex Execute commands in sp_ctrl SharePlex parameters Prepare an Oracle environment for replication Create a configuration file Configure replication to Open Target targets Configure a replication strategy Configure partitioned replication Configure named queues Configure SharePlex to maintain a change history target Replicate Oracle DDL Set up error handling Transform data Configure SharePlex security features Activate replication in your production environment Monitor SharePlex Prevent and solve replication problems Repair out-of-sync Data Procedures to maintain Oracle high availability Make changes to an active replication environment Apply an Oracle application patch or upgrade Back up Oracle data on the source or target Tune the Capture process Tune the Post process Appendix A: Peer-To-Peer Diagram Appendix B: SharePlex environment variables

Configure replication to an SAP ASE target

Configure replication to Open Target targets > Configure replication to an SAP ASE target

Overview

SharePlex can post replicated Oracle data to an SAP ASE target database through an Open Database Connectivity (ODBC) interface. These instructions guide you through the configuration processes that are required to support this target.

Note: For the platforms, datatypes and operations that are supported when using SharePlex to replicate to a Sybase target, see the SharePlex Release Notes.

Configure SharePlex on the source

Configure SharePlex and the database on the source system as follows.

Enable supplemental logging

To replicate to an Open Target target, enable PK/UK supplemental logging in the Oracle source database. SharePlex must have the Oracle key information to build an appropriate key on the target.

Set SP_OCT_USE_SUPP_KEYS parameter

To replicate to an Open Target database target, set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. This parameter directs SharePlex to use the columns set by Oracle's supplemental logging as the key columns when a row is updated or deleted. When both supplemental logging and this parameter are set, it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key.

See the SharePlex Reference Guide for more information about this parameter.

Configure replication

On the source, create a SharePlex configuration file that specifies capture and routing information. The components that are required in a configuration file vary, depending on your replication strategy. However, the most important part of the configuration file as it relates to replication to an Open Target target is the portion of the routing map after the @ symbol.

Note: See Create configuration files for additional information about creating a configuration file.

To configure replication to an Open Target target, use the following syntax in the configuration file:

Datasource:o.SID

src_owner.table

tgt_owner.table

host@r.database_name

where:

  • SID is the Oracle SID of the source Oracle database..
  • src_owner.table is the owner and name of the source table.
  • tgt_owner.table is the owner and name of the target table.*
  • host is the name of the target system.
  • r. identifies the target as non-Oracle.
  • database_name is the name of the target database. Important! database_name must be the actual name of the database, not a data source name (DSN).

* Important! If target owner or table name is defined in the database as anything other than UPPERCASE, be certain to:

  • Type the name in the correct case.
  • Enclose the name in quotation marks, for example "MySchema"."MyTable".

Source configuration example

The following configuration file replicates table HR.EMP from Oracle instance ora112 to target table Region1.Emp in database mydb on target system sysprod. The target table is case-sensitive.

Datasource:o.ora112

HR.EMP "Region1"."Emp" sysprod@r.mydb

Configure SharePlex on the target

Configure SharePlex and the database on the target system as follows.

Install the ODBC driver

Make certain to download the correct ODBC driver for your database.

Set up ODBC

  1. Install and test the ODBC driver that is appropriate for your target database. SharePlex provides the OTS utility for testing the ability of SharePlex to connect to and post through ODBC. For more information, see the OTS documentation in the utilities section of the SharePlex Reference Guide.
  2. On the target system, configure ODBC connection information for use by Post to connect to the target database. You have the following options for configuring this connection information:

    • On Windows, create a user or system DSN (Data Source Name) by using Data Sources (ODBC) in the Administrative Tools section of the Windows control panel. See the Windows documentation or your system administrator. If using a DSN, you must set the Post user name and password for the target database with the connection comand. See Set connection information with the connection command.
    • On Unix and Linux, you can do either of the following:

      • Configure a user or system DSN on the target system according to the instructions provided with the database. Test the DSN by using it to connect to the target database. If the connection is successful, copy the ODBC configuration files to the odbc subdirectory of the SharePlex variable-data directory. Set the LD_LIBRARY_PATH environment variable to the location of the database ODBC driver.

        or...

      • Set the ODBC connection information in the Post configuration. See Set connection information with the connection command.

Set connection information with the connection command

Use the connection command to:

  • Set the Post user name and password if you created a DSN.
  • Set all of theODBC connection information if a DSN does not exist.

To set connection information

  1. Create a user account for SharePlex in the target database. This account must be granted the privileges to connect, query the metadata structures of the database, create and update tables in the SharePlex database or schema, and perform full DML and supported DDL operations. Make certain that this user can connect successfully to the database through ODBC outside SharePlex.
  2. Run sp_ctrl.
  3. Execute the connection command with the set option, once for each keyword.

    connection r.database_name set keyword=value

Option1: Input when a DSN exists
Keyword Value to enter

user

The database user assigned to SharePlex

password

The password for the SharePlex user

dsn

The DSN of the database.

IMPORTANT! user, password, and dsn are the only required keywords if a DSN exists.

 

Option 2: Input when a DSN does not exist (Unix and Linux)
Keyword Value to enter

user

The database user assigned to SharePlex

password

The password for the SharePlex user

port

The database port number.

server

The name or IP address of the database server.

driver

The full path to the ODBC driver on the database server.

 

Option 3: Connect string when a DSN does not exist (Unix and Linux)
Keyword Value to enter

user

The database user assigned to SharePlex

password

The password for the SharePlex user

connect_string A user-defined connection string. When using your own connection string, make certain it includes all of the required elements to make a successful ODBC connection, but omit the user name and password. Use the connection command with the user and password options to supply user information.

Connection command examples

DSN exists

connection r.mydb set user=myuser

connection r.mydb set password=mypassword

connection r.mydb set dsn=mydsn

DSN does not exist

connection r.mydb set user=myuser

connection r.mydb set password=mypassword

connection r.mydb set port=1234

connection r.mydb set server=server1

connection r.mydb set driver=/database/ODBC/lib/databasedriver.so

DSN does not exist, use connection string

connection r.mydb set user=myuser

connection r.mydb set password=mypassword

connection r.mydb set connect_string=”driver=/database/ODBC/lib/databasedriver.so;server=server1;port=1234;uid=myuser;pwd=mypassword”

Remove a connection value

Use connection with the reset option to remove SharePlex connection settings.

To remove a specific connection value

connection r.database_name reset keyword

To remove all connection values

connection r.database_name reset

Examples

connection r.mydb reset port

connection r.mydb reset

View connection values

Use connection with the show option to view SharePlex connection settings.

To view connection values for a database

connection r.database_name show

To view connection settings for all local databases

connection show all

Configure replication to a SAP HANA target

Configure replication to Open Target targets > Configure replication to a SAP HANA target

Overview

SharePlex can post replicated Oracle data to a HANA target database through an Open Database Connectivity (ODBC) interface. These instructions guide you through the configuration processes that are required to support this target.

Note: For the datatypes and operations that are supported when using SharePlex to replicate to a HANA target, see the SharePlex Release Notes.

Configure SharePlex on the source

Configure SharePlex and the database on the source system as follows.

Enable supplemental logging

To replicate to an Open Target target, enable PK/UK supplemental logging in the Oracle source database. SharePlex must have the Oracle key information to build an appropriate key on the target.

Set SP_OCT_USE_SUPP_KEYS parameter

To replicate to an Open Target database target, set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. This parameter directs SharePlex to use the columns set by Oracle's supplemental logging as the key columns when a row is updated or deleted. When both supplemental logging and this parameter are set, it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key.

See the SharePlex Reference Guide for more information about this parameter.

Configure replication

On the source, create a SharePlex configuration file that specifies capture and routing information. The components that are required in a configuration file vary, depending on your replication strategy. However, the most important part of the configuration file as it relates to replication to an Open Target target is the portion of the routing map after the @ symbol.

Note: See Create configuration files for additional information about creating a configuration file.

To configure replication to an Open Target target, use the following syntax in the configuration file:

Datasource:o.SID

src_owner.table

tgt_owner.table

host@r.database_name

where:

  • SID is the Oracle SID of the source Oracle database..
  • src_owner.table is the owner and name of the source table.
  • tgt_owner.table is the owner and name of the target table.*
  • host is the name of the target system.
  • r. identifies the target as non-Oracle.
  • database_name is the name of the target database. Important! database_name must be the actual name of the database, not a data source name (DSN).

* Important! If target owner or table name is defined in the database as anything other than UPPERCASE, be certain to:

  • Type the name in the correct case.
  • Enclose the name in quotation marks, for example "MySchema"."MyTable".

Source configuration example

The following configuration file replicates table HR.EMP from Oracle instance ora112 to target table Region1.Emp in database mydb on target system sysprod. The target table is case-sensitive.

Datasource:o.ora112

HR.EMP "Region1"."Emp" sysprod@r.mydb

Configure SharePlex on the target

  1. If you have not done so already, install the appropriate ODBC driver for the target HANA database.

  2. If you did not do so when you installed SharePlex, run the hana_setuputility, which establishes a SharePlex database account and connection information. See the SharePlex Reference Guide for more information about this utility.

Configure replication to a Teradata target

Configure replication to Open Target targets > Configure replication to a Teradata target

Overview

SharePlex can post replicated Oracle data to a Teradata target database through an Open Database Connectivity (ODBC) interface. These instructions guide you through the configuration processes that are required to support this target.

Note: For supported Teradata versions and drivers and the datatypes and operations that are supported when using SharePlex to replicate to a Teradata target, see the SharePlex Release Notes.

Configure SharePlex on the source

Configure SharePlex and the database on the source system as follows.

Enable supplemental logging

To replicate to an Open Target target, enable PK/UK supplemental logging in the Oracle source database. SharePlex must have the Oracle key information to build an appropriate key on the target.

Set SP_OCT_USE_SUPP_KEYS parameter

To replicate to an Open Target database target, set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. This parameter directs SharePlex to use the columns set by Oracle's supplemental logging as the key columns when a row is updated or deleted. When both supplemental logging and this parameter are set, it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key.

See the SharePlex Reference Guide for more information about this parameter.

Configure replication to Teradata

On the source, create a SharePlex configuration file that specifies capture and routing information. The components that are required in a configuration file may vary, depending on your replication strategy. The following template shows the basic required components to replicate to a Teradata target.

Note: See Create configuration files for additional information about creating a configuration file.

Datasource:o.ora_SID

oracle_schema.src_table

teradata_db.targ_table

target_host@r.teradata_db

where:

  • ora_SID is the source Oracle instance
  • oracle_schema is the Oracle schema (owner) of src_table
  • src_table is an Oracle source table or wildcard specification
  • teradata_db is a Teradata database that contains targ_table
  • targ_table is a Teradata target table or wildcard specification
  • target_host is the target system that hosts Teradata

* Important! If target owner or table name is defined in the database as anything other than UPPERCASE, be certain to:

  • Type the name in the correct case.
  • Enclose the name in quotation marks, for example "MySchema"."MyTable".

Configure SharePlex on the target

  1. If you have not done so already, install the appropriate ODBC driver for the target Teradata database. See the SharePlex Release Notes for supported database and driver versions.
  2. Create a Data Source Name (DSN) for SharePlex to use to connect to Teradata.
  3. If you did not do so when you installed SharePlex, run the td_setuputility, which performs the following target setup:

    • Establish a SharePlex database user and login credentials.
    • Establish an internal connection string based on the DSN and user credentials.
    • Install tables and indexes for use by SharePlex into a specified database.

    See the SharePlex Reference Guide for more information about this utility.

Configure replication to other Open Target databases

Configure replication to Open Target targets > Configure replication to other Open Target databases

Overview

SharePlex can connect to a database that supports Open Database Connectivity (ODBC). For the platforms, datatypes and operations that are supported by SharePlex, see the SharePlex Release Notes.

Note: The SharePlex-supported Open Target targets are listed in the SharePlex Release Notes. Other targets may be in beta testing. For more information about the SharePlex beta program, see the SharePlex Release Notes.

Configure SharePlex on the source

Configure SharePlex and the database on the source system as follows.

Enable supplemental logging

To replicate to an Open Target target, enable PK/UK supplemental logging in the Oracle source database. SharePlex must have the Oracle key information to build an appropriate key on the target.

Set SP_OCT_USE_SUPP_KEYS parameter

To replicate to an Open Target database target, set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. This parameter directs SharePlex to use the columns set by Oracle's supplemental logging as the key columns when a row is updated or deleted. When both supplemental logging and this parameter are set, it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key.

See the SharePlex Reference Guide for more information about this parameter.

Configure replication

On the source, create a SharePlex configuration file that specifies capture and routing information. The components that are required in a configuration file vary, depending on your replication strategy. However, the most important part of the configuration file as it relates to replication to an Open Target target is the portion of the routing map after the @ symbol.

Note: See Create configuration files for additional information about creating a configuration file.

To configure replication to an Open Target target, use the following syntax in the configuration file:

Datasource:o.SID

src_owner.table

tgt_owner.table

host@r.database_name

where:

  • SID is the Oracle SID of the source Oracle database..
  • src_owner.table is the owner and name of the source table.
  • tgt_owner.table is the owner and name of the target table.*
  • host is the name of the target system.
  • r. identifies the target as non-Oracle.
  • database_name is the name of the target database. Important! database_name must be the actual name of the database, not a data source name (DSN).

* Important! If target owner or table name is defined in the database as anything other than UPPERCASE, be certain to:

  • Type the name in the correct case.
  • Enclose the name in quotation marks, for example "MySchema"."MyTable".

Source configuration example

The following configuration file replicates table HR.EMP from Oracle instance ora112 to target table Region1.Emp in database mydb on target system sysprod. The target table is case-sensitive.

Datasource:o.ora112

HR.EMP "Region1"."Emp" sysprod@r.mydb

Configure SharePlex on the target

Configure SharePlex and the database on the target system as follows.

Install the ODBC driver

Make certain to download the correct ODBC driver for your database.

Set up ODBC

  1. Install and test the ODBC driver that is appropriate for your target database. SharePlex provides the OTS utility for testing the ability of SharePlex to connect to and post through ODBC. For more information, see the OTS documentation in the utilities section of the SharePlex Reference Guide.
  2. On the target system, configure ODBC connection information for use by Post to connect to the target database. You have the following options for configuring this connection information:

    • On Windows, create a user or system DSN (Data Source Name) by using Data Sources (ODBC) in the Administrative Tools section of the Windows control panel. See the Windows documentation or your system administrator. If using a DSN, you must set the Post user name and password for the target database with the connection comand. See Set connection information with the connection command.
    • On Unix and Linux, you can do either of the following:

      • Configure a user or system DSN on the target system according to the instructions provided with the database. Test the DSN by using it to connect to the target database. If the connection is successful, copy the ODBC configuration files to the odbc subdirectory of the SharePlex variable-data directory. Set the LD_LIBRARY_PATH environment variable to the location of the database ODBC driver.

        or...

      • Set the ODBC connection information in the Post configuration. See Set connection information with the connection command.

Set connection information with the connection command

Use the connection command to:

  • Set the Post user name and password if you created a DSN.
  • Set all of theODBC connection information if a DSN does not exist.

To set connection information

  1. Create a user account for SharePlex in the target database. This account must be granted the privileges to connect, query the metadata structures of the database, create and update tables in the SharePlex database or schema, and perform full DML and supported DDL operations. Make certain that this user can connect successfully to the database through ODBC outside SharePlex.
  2. Run sp_ctrl.
  3. Execute the connection command with the set option, once for each keyword.

    connection r.database_name set keyword=value

Option1: Input when a DSN exists
Keyword Value to enter

user

The database user assigned to SharePlex

password

The password for the SharePlex user

dsn

The DSN of the database.

IMPORTANT! user, password, and dsn are the only required keywords if a DSN exists.

 

Option 2: Input when a DSN does not exist (Unix and Linux)
Keyword Value to enter

user

The database user assigned to SharePlex

password

The password for the SharePlex user

port

The database port number.

server

The name or IP address of the database server.

driver

The full path to the ODBC driver on the database server.

 

Option 3: Connect string when a DSN does not exist (Unix and Linux)
Keyword Value to enter

user

The database user assigned to SharePlex

password

The password for the SharePlex user

connect_string A user-defined connection string. When using your own connection string, make certain it includes all of the required elements to make a successful ODBC connection, but omit the user name and password. Use the connection command with the user and password options to supply user information.

Connection command examples

DSN exists

connection r.mydb set user=myuser

connection r.mydb set password=mypassword

connection r.mydb set dsn=mydsn

DSN does not exist

connection r.mydb set user=myuser

connection r.mydb set password=mypassword

connection r.mydb set port=1234

connection r.mydb set server=server1

connection r.mydb set driver=/database/ODBC/lib/databasedriver.so

DSN does not exist, use connection string

connection r.mydb set user=myuser

connection r.mydb set password=mypassword

connection r.mydb set connect_string=”driver=/database/ODBC/lib/databasedriver.so;server=server1;port=1234;uid=myuser;pwd=mypassword”

Remove a connection value

Use connection with the reset option to remove SharePlex connection settings.

To remove a specific connection value

connection r.database_name reset keyword

To remove all connection values

connection r.database_name reset

Examples

connection r.mydb reset port

connection r.mydb reset

View connection values

Use connection with the show option to view SharePlex connection settings.

To view connection values for a database

connection r.database_name show

To view connection settings for all local databases

connection show all

Map datatypes

To support the accurate posting of replicated Oracle ALTER TABLE commands to the correct datatypes in an Open Target target, you need to map Oracle datatypes to the datatypes of the target database. Use the target command with the set datatype option to perform this mapping.

Note: For DML operations, SharePlex queries the target database to determine the appropriate datatype mapping for replicated data.

To map datatypes

target r.database [queue queuename ] set datatype src_datatype=tgt_datatype

Where: src_datatype is the Oracle datatype and tgt_datatype is the target datatype to which you are mapping the Oracle datatype.

See the SharePlex Release Notes for mapping options.

For more information about the target command, see the SharePlex Reference Guide.

Related Documents