Converse agora com nosso suporte
Chat com o suporte

SharePlex 12.0 - Installation and Setup guide

About this Guide Conventions used in this guide Installing and Setting up SharePlex on Oracle Source Database
SharePlex Pre-installation Checklist for Oracle Download the SharePlex installer Install SharePlex on Linux and UNIX Set up an Oracle environment for replication Set up replication from Oracle to a different target type Installation and Setup for Cloud-Hosted Databases for Oracle Installation and setup for remote capture Installation and setup for HA cluster Generic SharePlex demonstration for Oracle Advanced SharePlex demonstrations for Oracle Database Setup Utilities Solve Installation Problems for Oracle
Installing and Setting up SharePlex on a PostgreSQL Database as Source and Service
SharePlex Pre-installation Checklist for PostgreSQL Download the SharePlex installer for PostgreSQL Install SharePlex on Linux for PostgreSQL as a Source Set up Replication from PostgreSQL to Supported Target Types Installation and Setup for Cloud-Hosted Databases for PostgreSQL Installation and Setup for Remote Capture for PostgreSQL Install SharePlex on PostgreSQL High Availability Cluster Configure SharePlex on PostgreSQL Azure Flexible Server with High Availability Using Logical Replication Generic SharePlex Demonstration for PostgreSQL Advanced SharePlex Demonstrations for PostgreSQL Database Setup for PostgreSQL Database Setup for PGDB as a Service Installation of pg_hint_plan extension Solve Installation Problems for PostgreSQL
Installing SharePlex on a Docker container Assign SharePlex users to security groups Solve Installation Problems Uninstall SharePlex Advanced installer options Install SharePlex as root SharePlex installed items

Set up replication from Oracle to PostgreSQL

Set up replication from Oracle to PostgreSQL

Note: These instructions apply to all implementations of PostgreSQL unless otherwise noted.

Overview

SharePlex can post replicated Oracle data to a PostgreSQL target database through an Open Database Connectivity (ODBC) interface. SharePlex supports all implementations of the PostgreSQL open-source database.

These instructions contain setup instructions that are specific to this target. Install SharePlex on the source and target according to the appropriate directions in this manual before performing these setup steps.

For the versions, data types and operations that are supported when using SharePlex to replicate to this target, see the SharePlex Release Notes.

Important! Greenplum does not allow UPDATE operations to primary keys, but Oracle does. To replicate an UPDATE to a key from Oracle to Greenplum, Post deletes the target row and then inserts a new row based on the source row, including the new key value(s).

Review column names

To support replication between a source of one database type and a target of another type, the letter case of the names of the source and target columns must be the same, for example the column names on both sides in lower case or both sides in upper case. If the case differs between the source and target column names, use the column mapping feature to map the column names in the configuration file.

See SharePlex Administration Guide for more information about column mapping with SharePlex.

Configure SharePlex on the source

You need to setup SharePlex and the database on the Oracle source system. For detailed setup steps, see Configure SharePlex on the source.

Configure SharePlex on the target

Perform the following steps to configure SharePlex on the target:

  1. Make certain that the database setup meets all of the requirements in Open target checklist .

  2. Run Database Setup for PostgreSQL (pg_setup) to establish a database account and connection information for SharePlex. For more information, see Database Setup for PostgreSQL .

Set up replication from Oracle to SQL Server

Set up replication from Oracle to SQL Server

Overview

SharePlex can post replicated source data to a Microsoft SQL Server target database through an Open Database Connectivity (ODBC) interface.

These instructions contain setup instructions that are specific to this target. Install SharePlex on the source and target according to the appropriate directions in this manual before performing these setup steps.

For the versions, data types and operations that are supported when using SharePlex to replicate to this target, see the SharePlex Release Notes.

Review column names

To support replication between a source of one database type and a target of another type, the letter case of the names of the source and target columns must be the same, for example the column names on both sides in lower case or both sides in upper case. If the case differs between the source and target column names, use the column mapping feature to map the column names in the configuration file.

See SharePlex Administration Guide for more information about column mapping with SharePlex.

Configure SharePlex on the source

You need to setup SharePlex and the database on the Oracle source system. For detailed setup steps, see Configure SharePlex on the source.

Configure SharePlex on the target

Perform the following steps to configure SharePlex on the target:

  1. Make certain that the database setup meets all of the requirements in Open target checklist .

  2. Run Database Setup for SQL Server (mss_setup) to establish a database account and connection information for SharePlex. For more information, see Database setup for SQL Server.

Set up replication from Oracle to a SQL or XML file

Overview

SharePlex can post replicated Oracle data to a file formatted as SQL or XML. This data is written as a sequential series of operations as they occurred on the source, which can then be posted in sequential order to a target database or consumed by an external process or program.

These instructions contain setup instructions that are specific to this target. Install SharePlex on the source and target according to the appropriate directions in this manual before performing these setup steps.

For the versions, data types and operations that are supported when using SharePlex to replicate to this target, see the SharePlex Release Notes.

Configure SharePlex on the source

On the source, create a SharePlex configuration file that specifies capture and routing information. The structure that is required in a configuration file varies, depending on your replication strategy, but this shows you the required syntax for routing data to a SQL or XML file.

Datasource:o.SID
src_owner.table !file[:tgt_owner.table] host

where:

  • SID is the Oracle SID of the source Oracle database.
  • src_owner.table is the owner and name of the source table.

  • !file is a required keyword that directs Post to write to a file.
  • tgt_owner.table is optional and specifies the owner and name of the target table. Use if either component is different from that of the source table.
  • host is the name of the target system.

Note: For more information, see Configure SharePlex to Replicate Data in the SharePlex Administration Guide.

Source configuration example:

The following example replicates the parts table in schema PROD from Oracle instance ora112 to a file on target system sysprod.

Datasource:o.ora112

PROD.parts !file sysprod

Configure SharePlex on the target

By default, SharePlex formats data to a file in XML format, and there is no target setup required unless you want to change properties of the output file (see Set up Replication from Oracle to a SQL or XML File.) To output in SQL format, use the target command to specify the SQL output as follows.

To output data in SQL format:

  1. Start sp_cop.
  2. Start sp_ctrl.
  3. Issue the following required target commands to output the records in SQL.

    Note: Use all lower-case characters.

    target x.file [queue queuename] set format record=sql

    target x.file [queuequeuename] set sql legacy=yes

    where: queue queuename constrains the action of the command to the SharePlex Post process that is associated with the specified queue.

    See Set up Replication from Oracle to a SQL or XML File for descriptions of these settings and other optional properties that you can set.

To view samples of the SQL and XML formats, see the target command documentation in the SharePlex Reference Guide.

View and change target settings

To view current property settings for output to a file, use the following command:

target x.file show

To change a setting, use the following target command.

target x.file [queue queuename] set [category] property=value

For more information, see the target command in the Target.

File storage and aging

Post writes to a series of files. The active working file is prepended with the label of current_ and is stored in the opx/current subdirectory of the variable-data directory.

Output Format Name of Current File
SQL

current_legacy.sql

XML

current_prodsys.XML

Important: Do not open or edit the current_ file.

Post uses the max_records, max_size and max_time parameters to determine the point at which to start a new active file. When this switch occurs, Post moves the processed data to a sequenced file in the opx subdirectory of the variable-data directory. The file names include the name of the post queue, the time and date, and an incrementing ID.

SQL files:

/installed/vardir> ls -1 opx

0000000000_20140305130858_legacy.sql

0000000001_20140305131130_legacy.sql

0000000002_20140305131212_legacy.sql

0000000003_20140305133835_legacy.sql

0000000004_20140305134028_legacy.sql

XML files:

/installed/vardir> ls -1 opx

0000000000_20140305130858_prodsys.XML

0000000001_20140305131130_prodsys.XML

0000000002_20140305131212_prodsys.XML

0000000003_20140305133835_prodsys.XML

0000000004_20140305134028_prodsys.XML

To force a file switch:

The current file cannot be viewed or consumed without stopping Post. To access the data in the current file, you can use the target command with the switch option to move the data to a sequenced file, from which it can then be consumed or viewed. After issuing this command, the switch occurs after Post processes a new record.

target x.file [queue queuename] switch

Set up replication from Oracle to other Open Targets

Set up replication from Oracle to other open targets

Overview

SharePlex can connect to a database that supports Open Database Connectivity (ODBC).

These instructions contain setup instructions that are specific to this target. Install SharePlex on the source and target according to the appropriate directions in this manual before performing these setup steps.

For the versions, data types and operations that are supported when using SharePlex to replicate to this target, see the SharePlex Release Notes.

Review column names

To support replication between a source of one database type and a target of another type, the letter case of the names of the source and target columns must be the same, for example the column names on both sides in lower case or both sides in upper case. If the case differs between the source and target column names, use the column mapping feature to map the column names in the configuration file.

See SharePlex Administration Guide for more information about column mapping with SharePlex.

Configure SharePlex on the source

You need to setup SharePlex and the database on the Oracle source system. For detailed setup steps, see Configure SharePlex on the source.

Configure SharePlex on the target

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

Note: Make certain that the database setup meets all of the requirements in Open target checklist .

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.
  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

Option 1: 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 data types

To support the accurate posting of replicated Oracle ALTER TABLE commands to the correct data types in an Open Target target, SharePlex maps Oracle data types to default data types for the target database. To view and change this mapping, use the typemap command.

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

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

Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação