You are on page 1of 355

 

Dell™ SharePlex™ 8.6 (8.6.5)
Administrator Guide
Revision 1

Copyright© 2016 Dell Inc. All rights reserved.
This guide contains proprietary information protected by copyright. The software described in this guide is furnished under a
software license or nondisclosure agreement. This software may be used or copied only in accordance with the terms of the
applicable agreement. No part of this guide may be reproduced or transmitted in any form or by any means, electronic or
mechanical, including photocopying and recording for any purpose other than the purchaser’s personal use without the
written permission of Dell Software Inc.
The information in this document is provided in connection with Dell Software products. No license, express or implied, by
estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Dell
Software products. EXCEPT AS SET FORTH IN DELL SOFTWARE’S TERMS AND CONDITIONS AS SPECIFIED IN THE LICENSE
AGREEMENT FOR THIS PRODUCT, DELL SOFTWARE ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED
OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL DELL BE LIABLE FOR
ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION,
DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY
TO USE THIS DOCUMENT, EVEN IF DELL SOFTWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Dell Software
makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and
reserves the right to make changes to specifications and product descriptions at any time without notice. Dell Software does
not make any commitment to update the information contained in this document.
If you have any questions regarding your potential use of this material, contact:
Dell Software Inc.
Attn: LEGAL Dept
5 Polaris Way
Aliso Viejo, CA 92656
Refer to our web site (www.software.dell.com) for regional and international office information.

SharePlex 8.6 (8.6.5)
Updated - September 2016

SharePlex 8.6 (8.6.5) Administrator Guide 2

Contents

About this Guide 18
Other SharePlex documentation 18

Conventions used in this guide 19

About Dell Software 20
Contacting Dell Software 20
Technical support resources 20

Overview of SharePlex 21
About source and target data 21
About sp_cop 22
About sp_ctrl 22
About the SharePlex architecture 22
SharePlex Directories 23
SharePlex Tables 24
SharePlex queues 25
SharePlex processes 26
How SharePlex replicates data 27
Understand the concept of synchronization 28
Characteristics of synchronized tables 28
Hidden out-of-sync conditions 29
Strategies for information availability 30
Reporting instances 30
Broadcast and cascade 30
Data warehousing 30
High availability and disaster recovery 30
Test before you deploy 31

Run SharePlex 33
Run SharePlex on Unix and Linux 33
Startup sequence on Unix and Linux 34
Start SharePlex on Unix and Linux 34
Identify SharePlex processes on Unix and Linux 35
Stop SharePlex on Unix and Linux 35
Shutdown Considerations on Unix and Linux 36
Run SharePlex on Windows 36
Startup Sequence on Windows 36

SharePlex 8.6 (8.6.5) Administrator Guide 3

Start and stop SharePlex on Windows 37
Set SharePlex startup status on Windows 37
Set SharePlex process priority on Windows 37
Identify SharePlex processes on Windows 38
Shutdown Considerations on Windows 39

Run multiple instances of SharePlex 40
Run multiple instances of SharePlex from separate installations 40
Run multiple instances of SharePlex from one installation 41
How to run multiple sp_cop instances on Unix and Linux 41
How to run multiple sp_cop instances on Windows 44

Execute commands in sp_ctrl 45
How to run sp_ctrl 45
Start sp_ctrl 45
Exit sp_ctrl 46
Define a default port for sp_ctrl 46
Define a default host for sp_ctrl 46
Set a default editor for sp_ctrl 46
Change the editor on Unix or Linux 47
Change the editor on Windows 47

Prepare an Oracle environment for replication 48
Set up Oracle redo logging to support SharePlex 48
Set the appropriate logging level 48
Ensure that the correct key is logged 49
Configure the archive logs 49
Set up Oracle database objects for replication 51
Ensure row uniqueness 51
The role of keys 51
Tables without a key or unique index 51
Keys with nulls 52
Changes to key values 52
Indexes 53
Bitmap indexes 53
Prevent triggers from firing on the target 54
Configure integrity constraints 54
Foreign key constraints 55
ON DELETE CASCADE constraints 55
Check constraints 55
Prevent access to target objects 55

SharePlex 8.6 (8.6.5) Administrator Guide 4

Configure sequences 56
Set up an Oracle database to support SharePlex 57
Adjust OPEN_CURSORS to support Post cursors 57
Adjust the PROCESSES parameter to support connections 57
Adjust the log buffer size to improve posting 58
Adjust the SharePlex transaction table based on user volume 58
Control conversion of character sets 58
Replication between an Oracle source and Oracle targets 58
Replication between an Oracle source and non-Oracle targets 59
Set up SharePlex to support Oracle data 60
LOBs, LONGs, VARRAYs, and XML 60
Tune SharePlex based on Oracle data volume 61
Set system process priority 62
Enable Oracle direct path loads 62
Use compression 62
Enable capture on Exadata machines 63
Configure support of Data Pump exports 63
Set up TDE Support 63
Required privilege to capture TDE-protected data 63
Configure SharePlex to capture TDE-protected data 63

Create configuration files 65
Ensure compatible source-target mapping 65
How to create a configuration file 66
Create a configuration file 66
Structure of a configuration file 67
Additional configuration options 69
Database specifications in a configuration file 69
Target specifications in a configuration file 70
Routing specifications in a configuration file 71
Replicate to one target 71
Replicate to multiple targets 71
Replicate between objects on the same system 72
Routing Limitations 72
Configuration examples by datasource and target 72
Replicate from a regular Oracle instance to a regular Oracle instance 73
Replicate from a regular Oracle instance to an Open Target database 73
Replicate from a regular Oracle instance to a file in XML or SQL format 73
Replicate from a regular Oracle instance to a JMS queue or topic 74
Replicate from a regular Oracle instance to a Kafka topic 74

SharePlex 8.6 (8.6.5) Administrator Guide 5

Replicate from and to an Oracle pluggable database (PDB) in a container database (CDB)* 74
Replicate to maintain a change history target 75
Use a script to build a configuration file 75
Replicate to, or from, a PDB 75
Capture from a PDB 75
Replicate to a PDB 76
Examples 76
Use Wildcards to specify multiple objects 77
How to control wildcard support 77
Requirements and limitations of wildcard support 77
Supported wildcard syntax 77
Specify wildcarded names in the configuration file 78
Validate a wildcard specification 79
Examples 79
Define a unique key 80
Syntax for key definition 81
Example 81
Filter DML Operations 81
Configure a DML filter 81
Examples 81
View current DML filters 82
Restrictions 82
Map source and target columns 82
Guidelines for using column mapping 82
Configure column mapping 83
Configuration example 83
Build a configuration file using a script 83
Supported databases 84
Use config.sql 84
Use build_config.sql 85

Configure replication to Open Target targets 87
Configure replication to a Microsoft SQL Server target 88
Overview 88
Configure SharePlex on the source 88
Enable supplemental logging 88
Set SP_OCT_USE_SUPP_KEYS parameter 88
Configure replication 88
Configure SharePlex on the target 89
Configure replication to an EDB™ Postgres Advanced Server® target 90

SharePlex 8.6 (8.6.5) Administrator Guide 6

Overview 90
Configure SharePlex on the source 90
Enable supplemental logging 90
Set SP_OCT_USE_SUPP_KEYS parameter 90
Configure replication 90
Configure SharePlex on the target 91
Configure replication to an SAP ASE target 92
Overview 92
Configure SharePlex on the source 92
Enable supplemental logging 92
Set SP_OCT_USE_SUPP_KEYS parameter 92
Configure replication 92
Configure SharePlex on the target 93
Install the ODBC driver 93
Set up ODBC 93
Set connection information with the connection command 94
Configure replication to a HANA target 97
Overview 97
Configure SharePlex on the source 97
Enable supplemental logging 97
Set SP_OCT_USE_SUPP_KEYS parameter 97
Configure replication 97
Configure SharePlex on the target 98
Configure replication to a Teradata target 99
Overview 99
Configure SharePlex on the source 99
Enable supplemental logging 99
Set SP_OCT_USE_SUPP_KEYS parameter 99
Configure replication to Teradata 99
Configure SharePlex on the target 101
Configure replication to other Open Target databases 102
Overview 102
Configure SharePlex on the source 102
Enable supplemental logging 102
Set SP_OCT_USE_SUPP_KEYS parameter 102
Configure replication 102
Configure SharePlex on the target 103
Install the ODBC driver 103
Set up ODBC 103

SharePlex 8.6 (8.6.5) Administrator Guide 7

5) Administrator Guide 8 .6 (8. Set connection information with the connection command 104 Map datatypes 106 Configure Replication to a JMS target 107 Overview 107 Configure SharePlex on the source 107 Enable supplemental logging 107 Set SP_OCT_USE_SUPP_KEYS parameter 107 Configure replication 107 Configure SharePlex on the target 108 Configure SharePlex on an Active MQ target 108 Configure SharePlex on an IBM MQ target 109 View and change JMS settings 111 Set recovery options 112 Control memory settings 113 Configure debugging 113 About the XML 114 Schema record template 114 Operation record template 115 Configure Replication to a Kafka target 119 Overview 119 Guidelines for posting to Kafka 119 Configure SharePlex on the source 119 Enable supplemental logging 119 Set SP_OCT_USE_SUPP_KEYS parameter 119 Configure replication 120 Configure SharePlex on the target 120 View and change Kafka settings 121 Set recovery options 121 About the XML 122 Schema record template 122 Operation record template 123 Configure Replication to a SQL or XML file target 128 Overview 128 Configure SharePlex on the source 128 Configure SharePlex on the target 129 View and change target settings 129 Command examples 130 About the SQL 131 About the XML 131 SharePlex 8.6.

6.5) Administrator Guide 9 . Schema record template 131 Operation record template 132 File storage and aging 136 Configure a replication strategy 138 Configure replication to share or distribute data 138 Supported targets 138 Capabilities 139 Requirements 139 Conventions used in the syntax 139 Replicate within the local system 140 Replicate to a remote target system 140 Replicate to multiple target systems 141 Confgure replication to maintain a central data store 142 Supported targets 142 Capabilities 142 Requirements 142 Deployment options 143 Deploy with one instance of SharePlex on the target system 143 Deploy with multiple instances of SharePlex on the target system 144 Configuration 145 Recommended target configuration 146 Configure replication to maintain multiple peer databases 146 Supported targets 147 Capabilities 147 Requirements 147 Overview 147 Deployment 149 Evaluate the data 150 Configure replication 153 Develop conflict resolution routines 155 How to write a routine using the SharePlex generic interface 155 How to use use the SharePlex prepared routines 160 List the routines in conflict_resolution.6 (8.SID 161 Where to find the conflict resolution file 161 How to make entries in the conflict resolution file 162 Configure replication through an intermediary system 163 Supported targets 163 Capabilities 164 Requirements 164 SharePlex 8.

Conventions used in the syntax 164 Deployment options 165 Cascade with posting on intermediate system 165 Cascade with pass-through on intermediary system 167 Configure replication to maintain high availability 167 Supported targets 168 Capabilities 168 Requirements 168 Conventions used in the syntax 169 Configuration 169 Make the system ready for failover 169 Perform recovery procedures 170 Configure partitioned replication 171 Configure horizontally partitioned replication 171 Guidelines for using horizontally partitioned replication 171 How it works 172 Define partitions and schemes 174 How to create a column condition 177 Specify partition schemes in the configuration file 180 Configure vertically partitioned replication 181 Guidelines for using vertically partitioned replication 182 Configure vertically partitioned replication 182 Configure named queues 186 Configure named export queues 186 Benefits of named export queues 187 Considerations when using named export queues 188 Configure a named export queue 188 How to identify named export queues 189 Configure named post queues 189 Benefits of named post queues 190 Considerations when using named post queues 191 Configure a named post queue 191 How to identify a named post queue 192 Configure replication to maintain a change history target 193 Overview of the change-history target 193 Capabilities 193 Supported targets 194 Operations supported 194 SharePlex 8.6.6 (8.5) Administrator Guide 10 .

6 (8..6.5) Administrator Guide 11 . Operations not supported 194 How SharePlex maintains change history 194 Configure change history 195 Create a change-history configuration file 195 Additional change history configuration options 196 Customize column names 196 Add the before image to each change row 196 Include all columns of an operation in the history 196 Disable change history of an operation type 196 Set rules and filters 197 Include COMMITs 197 Set up DDL Replication 198 DDL that SharePlex supports 198 Control DDL replication 198 Default DDL support 199 Expanded Auto-Add support 199 DDL support for objects outside the replication configuration 200 Filter DDL Replication 200 Best practices for ALTER TABLE DDL 203 Tables with VARRAY or ABSTRACT types 203 Tables with system-specific metadata 203 Tables that are renamed 204 Tables with system-generated interval partitions/subpartitions 204 ALTER TABLE.MOVE 204 DDL logging and error handling 205 Set up error handling 206 Continue to post when there is a DML error 206 Continue posting on Oracle and SharePlex errors 206 Continue posting on ODBC errors 207 Continue to Post when there is a DDL error 208 Increase the number of retries on error 209 Stop Post when data is out-of-sync 209 Transform data 210 Overview of transformation 210 Supported databases 210 Supported replication strategies 210 Supported operations 211 Considerations when using transformation 211 SharePlex 8..

Deploy transformation 212 Create transformation routines 212 Complete the transformation file 217 Configure SharePlex security features 219 Secure connections to SharePlex 219 Requirements 219 Secure data with SSH 220 Requirements 220 Encrypt data across the network 222 Encryption guidelines 222 Enable encryption on the source system 222 Set the key size on the source system 223 Create an encryption key on the source system 223 Set the key on the source and target 223 Example 223 View and reset encryption 224 Assign SharePlex users to security groups 224 Overview of SharePlex security groups 224 Description of the SharePlex security groups 224 Create and populate SharePlex groups on Unix and Linux 225 Create and populate SharePlex groups on Windows 226 Activate replication in an Oracle production environment 227 What is activation? 227 Activation commands 228 Activate a configuration file 228 View activation status 229 View configuration statistics 229 Deactivate a configuration file 229 Requirements for activating a configuration 229 Required authorization level 229 Required setup 230 Test the configuration before activation 231 Frequently Asked Questions about activation 231 How to activate multiple configuration files 232 Activate replication with an Oracle hot backup on an active database 233 Preliminary considerations 233 Procedures 234 Activation with hot backup: all strategies except cascading 234 Activation with hot backup: cascading replication 236 SharePlex 8.5) Administrator Guide 12 .6.6 (8.

5) Administrator Guide 13 . Activate replication with an Oracle hot backup on a quiet database 238 Preliminary considerations 238 Procedure 239 Activate replication with Oracle transportable tablespaces 241 Preliminary considerations 241 Procedure 242 Activate replication with cold copy/transfer methods 243 Preliminary considerations 243 Procedure 244 Monitor SharePlex 246 View and terminate SharePlex processes 246 View and terminate processes on Unix and Linux 246 View and terminate SharePlex processes on Windows 247 View SharePlex processes on Windows 247 Terminate SharePlex processes on Windows 248 View events and errors 248 Monitor with sp_ctrl commands 250 Run monitor scripts on Unix 252 Requirements for using the monitoring scripts 252 Monitor capture with sp_logmon 253 Prepare to run sp_logmon 253 Run sp_logmon 254 Monitor events with sp_eventmon 254 Prepare to run sp_eventmon 255 Run sp_eventmon 255 Monitor processes with sp_ps 257 Prepare to run sp_ps 257 Run sp_ps 258 Monitor queues with sp_qstatmon 258 Prepare to run sp_qstatmon 258 Run sp_qstatmon 259 Run a monitor script on Windows 260 Monitor replication with SNMP 262 Enable SNMP 262 Configure the SNMP agent 262 Custom MIB parameters 263 Configure the SNMP traps 263 Prevent and solve replication problems 264 Find the solution in the SharePlex Knowledge Base 264 SharePlex 8.6 (8.6.

5) Administrator Guide 14 .6.Solve Oracle setup problems 265 Solve configuration file problems 265 A configuration was accidentally deleted 265 Solve configuration file errors 266 Solve activation problems 267 SharePlex cannot locate the configuration file 267 Some objects failed to activate 267 Activation failed completely 268 Activation takes too long 268 The reconcile command is slow to complete 269 Common activation errors 269 Solve replication problems 270 Replication is too slow 270 Post is too slow 271 Capture stopped 274 Post stopped 275 Other problems and solutions 276 Common replication errors 277 Solve DDL replication problems 282 DDL is not replicating 282 Replicated DDL is not completely displayed in the Event Log 283 Solving queue problems 283 SharePlex is running out of disk space 283 There is a “failure to write and open queue” error 284 The queues are corrupted 285 The post queue seems too large 285 Solve Synchronization Problems 285 How SharePlex reports out-of-sync conditions 285 Detect false out-of-sync conditions 286 Common out-of-sync conditions and solutions 287 Correct the problem first 291 Resynchronize data 291 Solve compare command errors 291 Kill compare processes 292 Solve other replication problems 293 SharePlex does not run on a Windows system 293 A “Can’t unlink file” error occurs on Windows systems 294 Common connection errors 294 Common command errors 295 SharePlex 8.6 (8.

5) Administrator Guide 15 .6.6 (8. How to resynchronize source and target tables 296 How to restore the archive logs 301 How to release semaphores after process failure 301 How to resolve disk space shortage 303 How to conserve disk space on the target 304 How to restore disk space 304 How to find the ORACLE_SID and ORACLE_HOME 305 Repair out-of-sync Data 307 Overview of Compare and Repair 307 Overview of the server and client processes 307 How locks are managed 308 Before you use Compare and Repair 308 How to use the repair and compare commands 309 When to run a repair 310 How to run the compare and repair commands 310 Procedures to Maintain Oracle High Availability 311 Recover replication if the primary system fails 311 Supported databases 311 Requirements 311 Procedure 1: Move replication to the secondary system 312 Procedure 2: Move replication to the restored primary system 312 Recover replication if the secondary Oracle instance fails 316 Supported databases 316 Requirements 316 Procedure 316 Move replication during planned failover and failback 318 Supported databases 318 Requirements 319 Procedure 319 Make changes to an active replication environment 322 Change an active configuration file 322 Add or change table specifications in an active configuration 323 Supported databases 323 Procedure 323 Add Oracle sequences to an active replication configuration 324 Supported databases 324 Enable auto-add of sequences 324 Add sequences if auto-add is not enabled 324 SharePlex 8.

6.5) Administrator Guide 16 . Add a sequence if the sequence does not populate a column 324 Add a sequence if the sequence populates a column 325 Remove objects from replication 326 Supported databases 326 Procedure 326 Make DDL changes in an active replication configuration 327 Supported databases 327 Requirements 327 Procedure 327 Make Oracle changes that affect replication 328 Supported databases 328 Move the location of ORACLE_HOME 328 Change the target ORACLE_SID 328 Change the SharePlex database account 329 Supported databases 329 Procedure 329 Change the name or IP address of a replication host 330 Description 330 Supported databases 331 Guidelines for using provision 331 Run provision 331 Undo changes made by provision 332 Known issues 332 Set the SharePlex port number 332 Set the SharePlex port on Unix and Linux systems 333 Set the SharePlex port on Windows systems 334 Apply an Oracle application patch or upgrade 336 Before you patch or upgrade an application 336 Which procedure to use? 336 The effect of patches and upgrades on partitioned replication 337 Naming conventions used 338 Apply patch/upgrade to source then copy it to target 338 Supported databases 338 When to use this procedure 338 Overview of the procedure 339 Apply the patch/upgrade 339 Apply patch/upgrade to source and target 340 Supported databases 340 When to use this procedure 340 SharePlex 8.6 (8.

5) Administrator Guide 17 . Overview of the procedure 341 Apply the patch/upgrade 341 Apply patch to source and replicate it to the target 342 Supported databases 342 When to use this procedure 342 Apply the patch/upgrade 342 Back up Oracle data on the source or target 343 Perform a partial backup of the source system 343 Perform a full backup on the source system 344 Tune the Capture process 345 Disable LOB Mapping 345 Tune Capture on Exadata 345 Tune checkpointing 346 Tune the Post process 347 Use Oracle INDEX hints 347 Tune SQL Caching 348 Enable or disable SQL Cache 348 Oracle 349 Open Target 349 Tune SQL Cache for best performance 349 Adjust open cursors 350 Skip large maintenance transactions 350 Make small transactions faster 351 Increase the level of concurrency 351 Reduce the number of commits 352 Split a large transaction into a smaller one 352 Appendix A: Peer-To-Peer Diagram 353 Appendix B: SharePlex variables 354 SharePlex 8.6 (8.6.

dell.6 (8.  l See the SharePlex Upgrade Guide for instructions for upgrading a current installation of SharePlex to this version. and troubleshooting replication  l Failover/failback in a high-availability environment  l Performing administrative operations on replication systems Other SharePlex documentation For the complete SharePlex documentation set.6.com/SharePlex  l See the SharePlex Reference Guide for reference information that you will need from time to time.  l See the SharePlex Installation Guide for instructions for installing SharePlex and performing initial setup.  l See the SharePlex Release Notes for information about new features. enhancements. tuning. bug fixes and known issues in this release. monitor and control replication  l SharePlex tuning parameters  l SharePlex utilities  l SharePlex error messages  l See the SharePlex Preinstallation Checklist for tasks that must be finished before installing or running SharePlex.software. go to: http://documents. SharePlex 8. It includes detailed information about:  l sp_ctrl commands that administer. About this Guide This manual provides instructions for:  l Operating SharePlex  l Planning your replication strategy  l Preparing the environment for replication  l Configuring replication  l Starting replication  l Monitoring.5) Administrator Guide 18 .

select Print. programs. Example: From the File menu. other names are expressed in capital letters using the default font. or “pipe” character ( | ) within brackets or braces indicates that you can use only one of the enclosed components. are expressed in Courier New.  l {Braces} enclose available required arguments. and options within dialog boxes are expressed in Arial Bold. Click Apply.  l [Brackets] represent optional command components and may also be used in example command strings to emphasize required user defined variables in long strings. Target systems (or secondary systems) are referred to as SysB. directories and files are expressed in Arial Bold.  l Italics represent variables defined. Examples: The sp_ctrl program is located in the bin directory. the source system (or primary system) is referred to as SysA. dialog boxes.  l Bold represents required components of a command or option that must be typed as shown. System displays. System names are expressed generically or fictitiously. Conventions used in this guide Conventions used in this manual The following typographic conventions are used in this guide. Example: abort service {service | all} Names of commands. SharePlex 8. such as prompts and command output. named or entered by the user. SysC. Examples: sp_ctrl(sysA)> User is a viewer (level=3) Windows menu items. Example: reconcile queue {queuename} for {datasource-datadest} [onhost]  l A vertical bar.6 (8. Find the value for ORACLE_HOME.  l Bold Italics represents required user defined variables in example command strings.6. Open the oramsglst file. When necessary.5) Administrator Guide 19 . and so forth. SysD.

software.com.6 (8. For trial software. 24 hours a day.com/support/. go to http://software.com/company/contact-us. go to Trial Downloads.dell. and manage Service Requests (cases)  l View Knowledge Base articles  l Obtain product notifications  l Download software. For more information. visit www.aspx Technical support resources Technical support is available to customers who have purchased Dell software with a valid maintenance contract and to customers who have trial versions. 365 days a year. In addition.  l View how-to videos  l Engage in community discussions  l Chat with a support engineer SharePlex 8. the portal provides direct access to product support engineers through an online Service Request system. About Dell Software Dell listens to customers and delivers worldwide innovative technology. business solutions and services they trust and value. Contacting Dell Software Technical Support: Online Support Product Questions and Sales: (800) 306-9329 Contact Us : http://software. The Support Portal provides self-help tools you can use to solve problems quickly and independently.dell. The site enables you to:  l Create. update.dell. To access the Support Portal.6.5) Administrator Guide 20 .

It explains concepts surrounding SharePlex replication and provides an overview of SharePlex capabilities. or in-sync.6 (8. adjusting for any transformation that is performed and for any time lag in the replication stream. SharePlex 8. This data resides on the source system. see the SharePlex Release Notes. This chapter provides an overview of how SharePlex replication works. 1 Overview of SharePlex SharePlex provides high-speed.6.This data resides on the target system.5) Administrator Guide 21 . This means that the state of the source data is reflected accurately by the target data. Contents About source and target data About sp_cop About sp_ctrl About the SharePlex architecture SharePlex Directories SharePlex Tables SharePlex queues SharePlex processes How SharePlex replicates data Understand the concept of synchronization Characteristics of synchronized tables Hidden out-of-sync conditions Strategies for information availability Test before you deploy About source and target data SharePlex replication uses the concepts of source and target. The object of replication is to keep the source and target data synchronized.  l The source data is the primary data that is to be replicated. For more information about the platforms and databases that SharePlex supports.  l The target data is a full or subset copy of the primary data. log-based replication that supports a variety of topology configurations in heterogeneous database environments.

and it initiates all of the other background processes that perform specific tasks. Capture can keep pace with the changes that are made to the source data. About sp_ctrl Use sp_ctrl to issue the commands that start. For more information about the replication processes. Users do not interact with sp_cnc itself.6. The sp_ ctrl program interacts internally with the sp_cnc (command and control) process. but by then there could be unacceptable latency between source and target data.  l Only a SharePlex Administrator (member of the SharePlex admin group) can start or stop sp_cop. You can customize the SharePlex configuration to add additional queues and processes for the purpose of isolating data streams or improving performance. It also maintains communication with other systems in the replication network. configure. That way. sp_cop runs in the background. About sp_cop The sp_cop program coordinates the SharePlex replication processes: (Capture. Once started.  l If Capture loses pace with the rate at which source transactions are generated. In that case. Read. Export. You can replicate data from one source to many targets in a direct or cascading configuration. Post) and the SharePlex queues. Import.  l Start sp_cop as soon as (or before) users access the data on the source system. If SharePlex has not captured all of the changes before the logs wrap.As changes are made to source data.5) Administrator Guide 22 . The target data can take the form of any of the SharePlex-supported target types: tables in a database. or XML or SQL records in a file that can be consumed by other software programs. stop.6 (8. In general. it might be more practical to resynchronize the data. see About the SharePlex architecture. so that all SharePlex processes are ready to start processing transactions. it reads the archive logs.  l sp_cop must be started on all source and target systems involved in replication. SharePlex continuously replicates them to the target system.   About the SharePlex architecture This topic explains the basic components of SharePlex replication. the redo logs could wrap before Capture is finished reading them. and you can replicate from many sources to one target. which is the child process of sp_cop that executes the commands. NOTE: This topic explains the default configuration of SharePlex. SharePlex 8. messages in a JMS queue or Kafka topic. Log wrap is when the online Oracle redo logs reach their maximum size and number and Oracle starts writing new logs over the existing ones. most SharePlex users have little interaction with sp_cop other than to start and stop it. direct and monitor SharePlex activities.

do not attempt to run it. db Configuration internal database for each activation of a configuration file. Utilities meant for general use in a production environment are documented in the published SharePlex documentation. licensing and upgrades lib SharePlex shared libraries util SharePlex utilities . dump Core files (if a process fails) SharePlex 8. Some directories contain hidden files that are essential for replication. Some files appear empty but must exist under their original names because they are referenced by one or more SharePlex processes. data Status Database. respectively. (Unix and Linux only) Hidden internal directory that contains raw executables. where the SharePlex programs and libraries are stored. Contents directory bin SharePlex executable files data Default parameter settings install (Unix and Linux only) Scripts related to installation. configuration activation information. log files and other components that comprise the current replication environment are stored. NOTE: These directories are often referred to as productdir and vardir.6. Do not use the modules contents of this directory to launch processes. but the basic structure appears as follows.SharePlex Directories SharePlex uses two main directories: The product directory: This is the SharePlex installation directory. user-defined parameter settings. Contents directory config Configuration files for this installation of SharePlex. Contact Dell Technical Support first. Files and directories can vary from version to version of SharePlex. If you do not find documentation for a program in a SharePlex directory. . Some items in the directories are for use only under the supervision of Dell Technical Support.5) Administrator Guide 23 . Do not remove. The directory structure and files within the two main SharePlex directories differs slightly between the UNIX and Windows platforms. rename or edit any files or directories installed by SharePlex. where the queue files.app. SharePlex product directory Sub.meta-inf (Unix and Linux only) Hidden internal directory that contains meta information used during the installation process. and other user-defined files that direct replication activities. The variable-data directory: This is the SharePlex working directory.6 (8. SharePlex variable-data directory Sub.

SharePlex 8. SHAREPLEX_ Used as a temporary table by the compare and repair commands. temp Used by the copy and append features and other SharePlex sync-related processes. MARKER SHAREPLEX_ANALYZE Used by the analyze command. DATAEQUATOR_ INSERT_TEMP SHAREPLEX_ Used as a temporary table by the compare and repair commands. SharePlex Tables Much of the replication process is controlled and tracked through a series of internal tables that are installed into the source or target database during the installation of SharePlex. CHANGE_OBJECT SHAREPLEX_ Used for the flush. DATAEQUATOR_ DELETE_TEMP SHAREPLEX_DDL_ Used to refine control of DDL that is enabled for replication by the SP_OCT_ CONTROL REPLICATE_ALL_DDL parameter. state Information about the current state of SharePlex when a configuration is active.5) Administrator Guide 24 . SHAREPLEX_DATA Used by the SharePlex wallet. SHAREPLEX_ Used by the compare and repair commands and the Post process to synchronize their DATAEQUATOR operations. so do not alter them in any way. SHAREPLEX_ Used by users to stop and resume replication for an object. SHAREPLEX_ACTID Used by Capture to checkpoint its state. They are essential for SharePlex to operate. DEMO_DEST Used as the target table for the SharePlex demonstrations.6 (8. such as the object and sequence caches. COMMAND SHAREPLEX_CONFIG Used by the activation and Capture processes to mark the start of a new activation. Table* Description DEMO_SRC Used as the source table for the SharePlex demonstrations. Sub. SHAREPLEX_ACT_ Not currently used. Contents directory log SharePlex log files rim Queue files (working data files) save Information about active and inactive configurations. DATAEQUATOR_ UPDATE_TEMP SHAREPLEX_ Used as a temporary table by the compare and repair commands. abort and purge commands.6.

6 (8. SHAREPLEX_SYNC_ Used by the copy command and the Read and Post processes to sync their operations. system. Data is not read-released (deleted) from one queue until it is written to the next one. asynchronous transport of data. Data travels through the queues in the sequence in which it was generated. or database slows down or fails.6. repair. Queues are part of a checkpoint recovery system that facilitates safe. Data accumulates in the queues on the source and target systems if the network. SHAREPLEX_MARKER Used by the Read process when PK/UK logging is not enabled. and copy commands to provide a unique job ID. MARKER SHAREPLEX_TRANS Used by the Post process to store checkpoints and to mark transactions that were applied in a master-to-master configuration. or when a replication process stops. SHAREPLEX_ Used by the activation and Capture processes to provide wildcard specifications by WILDCARD which Capture determines whether a newly created table should be replicated. * Additionally.5) Administrator Guide 25 . SHAREPLEX_JOBS_ Used by the disable jobs and enable jobs commands. A SharePlex 8. repair. SHAREPLEX_ Used by users to define horizontal partitioning for a table in the replication PARTITION configuration. When the problem or outage is resolved. SharePlex queues Queues store the replicated data as it is transported from the source system to the target system. CONFIG SHAREPLEX_LOB_ Used by the Capture process when processing VARRAYs stored as LOB. SharePlex resumes processing from the point where it stopped. PARTITION_CACHE SHAREPLEX_ROUTES Used by the activation and Read processes to provide the target table name and routing for every table in replication. repair. SHAREPLEX_ Used by the Capture process to map Oracle partition IDs to tables in replication. Table* Description SHAREPLEX_JOBS Used by the sp_cnc process and the compare. SHAREPLEX_OBJMAP Used by the activation and Capture processes to define the objects in replication. SharePlex creates the SHAREPLEX_JOBID sequence for use by the sp_cnc process and the compare. SharePlex replication uses the following queues:  l Capture Queue: The capture queue resides on the source system and stores captured data for further processing by SharePlex. There is one capture queue for each data source that is being replicated. CACHE SHAREPLEX_LOBMAP Used by the Capture process to map LOBIDs and rows when a table with LOB columns does not have PK/UK logging enabled. SHAREPLEX_LOGLIST Used by the Capture process to track inactive RAC instances. and copy commands to store STATS information about a job. SHAREPLEX_JOB_ Used by the sp_cnc process and the compare. and copy commands to store information about a job.

 l The Import process: The Import process is the second half of the Export/Import transport pair.  l The Read process: The Read process operates on the source system to read data from the capture queue and add routing information to the data. There is a separate Capture process for each datasource being replicated. SharePlex processes SharePlex replicates data through a series of replication processes that are started by the main SharePlex process. The Export process is the first part of the Export/Import transport pair.oraA. For example. for example o. By default. For example. a source system has one Export process for each of its target systems. The Capture process is named sp_ocap (Oracle Capture). For example.oraA-o. In this case the Export and Import processes are not created.6 (8. There is one Import process for each Export process. On each target system. The Read process is named sp_ordr (Oracle Reader). there are two post queues. there are two Export processes. By default. NOTE: All SharePlex queue files are created and maintained in the rim sub-directory of the SharePlex variable-data directory.5) Administrator Guide 26 .  l Export Queue: The export queue resides on the source system. Each Export process controls transmission of all data that is being replicated from a source system to a target system. sp_cop.  l The Export process: The Export process operates on the source system to read data from the export queue and send it across the network to the target system. It holds data that has been processed by SharePlex and is ready for transport to the target system. NOTE: It is possible to replicate data between Oracle instances on the same system. there is one post queue for the replication stream between a datasource and its target. the Read process sends it to the Export queue.  l The Post process: The Post process operates on the target system to read the post queue and apply the replicated operations to the target.6. A default export queue is identified by the name of the source system on which it resides. where it accumulates until the Read process is ready for it. After processing the data. for example. if there are two source systems (each with an Export process) replicating data to a target system. See Configure named post queues. The Post process is sp_opst_mt when configured to post to an Oracle database and sp_xpst when configured to post to an Open Target target.  l The Capture process: The Capture process reads the transaction logs or archive logs on the source system for changes to objects that are configured for replication by SharePlex. See Configure named export queues. Multiple Post processes can operate simultaneously on a system. if OraA and OraB are both replicating to OraC. capture queue is identified by the datasource. SysA. each functioning concurrently and independently. if there are two target systems. The Read process places data directly into a post queue on that system. It holds data that is ready for writing to the target. which moves data between systems over a TCP/IP network. A default post queue is identified by the name of the source system plus the datasource and the target. for example SysA (o. The Capture process writes the data to the capture queue. there are two Import processes on the target. The Import process is named sp_mport. SharePlex 8. You can instruct SharePlex to create additional named post queues for more complex replication strategies. The Export process is named sp_xport.  l Post Queue: The post queue resides on the target system. You can instruct SharePlex to create additional named export queues for more complex replication strategies. There is a Post process for each post queue on a target system. there is one export queue on a source system regardless of the number of active configurations or target systems. It operates on the target system to receive data and build a post queue.oraB).

This method ensures optimal performance. SharePlex detects when the network is available again and resumes transmission. When the network is unavailable.5) Administrator Guide 27 .6. you specify which data to replicate and the target to which it is applied. Other operations. have the inverse effect: There could be one record for numerous operations. while conserving communication bandwidth. In the configuration file. such as array inserts of small records. reliability and restart capabilities. SharePlex 8. A message can reflect a SQL operation or an internal SharePlex operation. but most of the time it is an INSERT. For example.6 (8. In general. using an asynchronous stream protocol with TCP/IP connections that is very efficient for large data transfers. DELETE. TRUNCATE or a supported DDL operation. UPDATE.All communication and movement of data by SharePlex is handled by an internal messaging and transport system. How SharePlex replicates data SharePlex reads the blocks of the redo logs and replicates transactional changes that are made to objects that are specified in a configuration file. providing a fast and reliable replication solution. SharePlex processes recover from network failures. you can assume that the number of messages shown in the status output for a process or queue approximately corresponds to the same number of SQL operations. unless you are replicating numerous changes to LONGs and BLOBs. an array insert of 70. Large operations like those on LONG or LOB columns can require more than one message because a message has a size limitation. For more information about configuration files. data is queued on the source system. COMMIT. SharePlex creates one or more messages that are sent from the Capture process to the Read process.000 rows might be accommodated with only 700 messages. When a configuration is activated. and from the Read process to all of the other replication processes in the replication stream. including WAN environments. depending on the data. SharePlex can replicate over any TCP/IP network. see Create configuration files From the information that it has about an operation. SharePlex replicates only the changes made to the source data.

The Post process does not perform integrity checks on those targets.6.  l If the change is an INSERT. It does not apply to file. which contain a record of every operation replicated by Post. Characteristics of synchronized tables The basic characteristics of synchronized source and target tables are as follows (unless the transformation feature is used).  l Corresponding columns in source and target tables have the same structure and datatypes.  l If a row exists in the source database. even though only one statement was issued on the source. some of which may be identical over time. The pre-image (also known as the before image) is the value of each changed column before the UPDATE. Post applies a WHERE clause to compare the key values and the before values of the SQL operations that it processes. where Post performs integrity checks to make certain that only one row in the target matches the row change that is being replicated.5) Administrator Guide 28 . the Post process compares a pre-image of the values of the source columns to the existing values of the target columns.The Post process reads messages from the post queue and applies the replicated data changes to the target. SharePlex uses all of the columns in the row to build an INSERT statement. In the case of non-database targets. Kafka. except LONG and LOB columns. Post applies the following logic:  o If all of the current values in the target row are the same as the INSERT values. Post outputs data records in the format required by the target. it exists in the target. If not. In the case of a database target.6 (8. If the pre-image and the existing target values match. Post uses the following logic to validate synchronization between source and target tables:  l Post applies a replicated INSERT but a row with the same key already exists in the target. Post constructs SQL statement to apply the data. For example. and change-history targets. Understand the concept of synchronization The concept of synchronization applies mainly to table-to-table replication. If a table lacks a key. Post considers the rows to be in-sync and discards the operation. then Post logs the operation to an error file and SharePlex returns an “out- of-sync” error. SharePlex uses only the key to build a WHERE clause to locate the correct row. The following explains the default ways that SharePlex builds SQL statements on the target system. SharePlex simulates one by using the values of all of the columns. Before applying changes to the database. Ensuring data integrity is the responsibility of the Post process. JMS.  l Data values in corresponding rows are identical.  l If the change is a DELETE. including the values of the key. SharePlex issues multiple statements on the target to complete the task. Post applies the changes. an UPDATE tableA set name = ‘Lisa’ where rownum < 101 statement actually sends 100 UPDATE statements to the target. SharePlex uses the key plus the values of the changed columns to build a WHERE clause to locate the correct row.  l If the change is an UPDATE.  l If the change is an UPDATE or DELETE statement that affects multiple rows on the source machine. You can specify columns to use as a key when you create the configuration file. SharePlex 8. confirming a synchronized state. for example a JMS queue.

5) Administrator Guide 29 . Post compares the pre-images. NOTE: You can configure Post so that it does not consider non-key values when posting an INSERT. In the WHERE clause used by Post. the cause of out-of-sync data is not anything done wrong by replication.6. Post applies the following logic:  o If the current values in the target row match the after values of the UPDATE.  o If any of the values are different from those of the INSERT. an application user on the source system makes the same change to the source table. the hidden out-of-sync condition for the COLOR column persists (and users on the target have inaccurate information) until someone updates the COLOR column in the source table. an incomplete backup restore. It does not verify whether other rows in that table. SharePlex 8. but there is no error message as in the previous example. so that DML and DDL cannot be applied to them. When that change is replicated.6 (8. See the SP_OPO_SUPPRESSED_OOS parameter in the SharePlex Reference Guide. but Post cannot locate the target row by using the key. Hidden out-of-sync conditions Post only verifies the integrity of the rows that are being changed by its current SQL operation. the pre-image for the target table is “blue. because there is no Post involvement. Example of a detectable out-of-sync condition Someone logs into the target and updates the COLOR column in the target table from “blue” to “red” in Row1. See the SP_OPO_SUPPRESSED_OOS parameter in the SharePlex Reference Guide. are out of synchronization in the target database. it includes only the key value in its WHERE clause. and SharePlex replicates it to the target. When Post constructs its DELETE statement.  l A DELETE is performed on the source data.  l Post applies a replicated UPDATE but either cannot find a row in the target with the same key value as the one in the UPDATE or Post finds the correct row but the row values do not match the before values in the UPDATE. Then.  o If the values in the target row do not match the before or after values of the UPDATE. Solving out-of-sync conditions can be time-consuming and disruptive to user activity. or some other hidden out-of-sync condition that can go undetected a long time until an operation applied by Post finally affects that data and an error is returned. Example of a hidden out-of-sync condition Someone logs into the target and updates the COLOR column in the target table from “blue” to “red” in Row2. Once replication is started. when a change is eventually made by SharePlex to that data or a discrepancy is detected in the course of using that data. The majority of time. Post considers the rows to be in-sync and discards the operation. Hidden out-of-sync conditions may not show up until much later. but the change is not made to the source table and is not replicated. or other tables.” Post generates an out-of-sync error alerting you to the out-of-sync condition. No matter how many subsequent updates are made to other columns in the row (SIZE.” but the current value in the target row is “red. WEIGHT). NOTE: You can configure Post so that it returns an out-of-sync message if the current values in the target row match the after values of the UPDATE. it is recommended that you:  l Prevent write access to the target tables. The two tables are now out- of-sync. and only then is there an error message. Post considers this an out-of-sync condition. Post considers this an out-of- sync condition. but rather DML applied on the target.

SharePlex also can cascade ndata through an intermediary system to remote systems. Strategies for information availability Because SharePlex replicates over LAN and WAN connections. A high degree of granularity in the data that you replicate and the option to transform replicated data to conform to a different target structure are unique SharePlex features that enable you to populate your data warehouse with the specific. That way. SharePlex 8. It is ideal for consolidating data in a data warehouse or a data mart so that information is available enterprise-wide for queries and reports. Data warehousing SharePlex can replicate from numerous source systems to one target system.6 (8. You can run reports all day long. see the SharePlex Reference Guide.5) Administrator Guide 30 . you can put a replica database to work as a reliable. you can keep the primary database and system optimized for transactions. application response time will be unaffected by heavy reporting. The following strategies enable you to get the right data to the people who need it. timely information that users need to make good decisions. Production can move to the alternate sites in an emergency or in a planned manner when routine maintenance is performed on the primary server. providing access for remote users who have no direct network connection to the primary database. And.6. and they can be optimized with keys and indexes designed for optimal query performance. SharePlex replication enables the secondary database to be used for queries and reporting. Reporting instances Targets maintained by SharePlex are ideal for offloading report and query processing because they are accessible while being kept up-to-date. without complaints about performance from your OLTP users. continuously updated alternate database that can be used in many different ways. Even during busy reporting times such as the end of the month or quarter. For more information about the compare command. you can move their processing to one or more secondary databases that are kept current through SharePlex replication. your organization’s decision-makers will appreciate the accuracy of the data reflected in the reports. Broadcast and cascade When many remote users access or use data stored in a primary database. when they need it. High availability and disaster recovery SharePlex can be used to maintain duplicate databases over local or wide-area networks.  l Use the compare command to compare source and target data regularly to verify synchronization and detect hidden out-of-sync conditions.

but are not limited to.6.Figure 1: SharePlex replication strategies at a glance Test before you deploy Before you implement SharePlex on production systems.5) Administrator Guide 31 . Dell recommends performing tests in a mirror of the production environment to ensure that you configured SharePlex properly to support your requirements. for example network or resource issues that affect replication performance or availability. These include. the following: SharePlex 8. Additionally. it is assumed that your organization has in place an infrastructure that supports the use of enterprise applications such as SharePlex.6 (8. Testing can uncover issues such as configuration errors and unexpected environmental issues.

6.  l Sufficient security that prevent unauthorized persons from accessing SharePlex data records or making configuration changes. and deploy SharePlex in your environment. When SharePlex is implemented as part of an application’s infrastructure. it is strongly recommended to test new application functionality in conjunction with SharePlex in a non-production environment. such as the proper shutdown of SharePlex processes and the preservation of unprocessed redo to accommodate system or database maintenance.  l Availability and use of the database and SharePlex documentation  l Training programs for users  l Rollout and upgrade plans that ensure minimal interruption to business.6 (8. install. SharePlex 8. The SharePlex Professional Services team can help you prepare for.5) Administrator Guide 32 .  l Database or system maintenance procedures that consider SharePlex dependencies.

You can start sp_cop in one of two ways:  l From the operating system command line.  l Do not use the Bourne shell (sh). you start SharePlex by running the sp_cop program. 2 Run SharePlex This chapter contains instructions for running SharePlex on UNIX. Each instance of sp_cop that you start is a parent to its own set of child replication processes. sp_cop spawns the necessary child replication processes on the same system.  l At system startup as part of the startup file. IMPORTANT: Run SharePlex from either the korn (ksh) or C shell (csh) shell. After you activate a configuration. and Windows Contents Run SharePlex on Unix and Linux Startup sequence on Unix and Linux Start SharePlex on Unix and Linux Identify SharePlex processes on Unix and Linux Stop SharePlex on Unix and Linux Shutdown Considerations on Unix and Linux Run SharePlex on Windows Startup Sequence on Windows Start and stop SharePlex on Windows Set SharePlex startup status on Windows Set SharePlex process priority on Windows Identify SharePlex processes on Windows Shutdown Considerations on Windows Run SharePlex on Unix and Linux On Unix and Linux systems. If you must use the Bourne shell. then exit the shell and return to the Bourne shell. The sp_cop process must be started on each system that is part of the replication configuration. Linux. because the way it handles background processes is not compatible with SharePlex. switch shells to ksh or csh to run SharePlex. SharePlex 8.6 (8.6.5) Administrator Guide 33 .

 3. Start the system. Start SharePlex. then run sp_cop from the ksh shell only. For more information about user groups. SharePlex 8. Allow users on the system./sp_cop [-u] [-s] & From a startup script #!/bin/ksh cd productdir\bin nohup sp_cop [-u] [-s] & Table 2: Description of SharePlex startup syntax Argument Description & Causes SharePlex to run in the background. with full path $ /productdir/bin/sp_cop [-uidentifier] [-s] & CD to the product directory $ cd /productdir/bin $ . start the components in this order:  1. nohup Directs the startup of SharePlex to continue in the background after the current user logs out. you must log onto the system as a SharePlex Administrator.5) Administrator Guide 34 . Export. sp_ctrl> lstatus  6. switch from the default shell of POSIX to the ksh shell.  2. Start SharePlex on Unix and Linux To start SharePlex. Table 1: SharePlex startup syntax Method Startup syntax From root.  4.  5. Your user name must be assigned to the SharePlex admin group in the /etc/group file. The startup command starts all processes at once. see Assign SharePlex users to security groups. Post).6 (8. the replication processes start automatically if there is an active configuration. Start the source and target databases.6. use the startup command. Read. Startup sequence on Unix and Linux When you start systems that are involved in replication. -s   Starts sp_cop without starting the SharePlex replication processes (Capture. Verify that the SharePlex processes are started by issuing the lstatus command in sp_ctrl.   To start the replication processes after you start sp_cop with the -s option. Import. Start sp_ctrl. Without -s.  l If using an Exceed X window emulator.

Stop SharePlex on Unix and Linux To stop SharePlex. sp_cop runs passively in the background. -uidentifier Starts sp_cop with a unique identifier.5) Administrator Guide 35 . Use this option when there are multiple instances of sp_cop running on a system. See the SharePlex Reference Guide for more information about these commands.  l The sp_cop process is the root process. On Unix and Linux systems. See Run multiple instances of SharePlex.6. Command and Control process (sp_cnc)  2. Import (sp_mport)  3. Use the stop command if you must stop individual processes. Data in the queues remains safely in place. and removes child processes. ready for processing when sp_cop starts again. which is required for some SharePlex configurations. performs a checkpoint to disk.6 (8. Without an active configuration. The shutdown process can take some time if SharePlex is processing large operations. The ID is returned after startup and then the command prompt reappears. Some suggestions for identifier are:  l the SharePlex port number (such as -u2100)  l the identifier of the database for which replication is running (such as - uora12c)  l any descriptive identifier (such as -utest) Identify SharePlex processes on Unix and Linux Every session of sp_cop has a process ID number. read/releases buffered data. issue the shutdown command in sp_ctrl. replication begins immediately. If a configuration was activated during a former session of sp_cop. Post (sp_opst_mt if the database is Oracle or sp_xpst if the database is Open Target) Each child process has the same -u identifier as its parent sp_cop process. This is a graceful shutdown that saves the state of each process. Argument Description Processes cannot be started individually after starting sp_cop with -s. SharePlex 8. This makes it easier to identify related processes when multiple session of sp_cop are running. you can use the ps -ef | grep sp_ command to view the SharePlex processes that are running.  l The following child processes are spawned by sp_cop on a source system:  o Command and Control process (sp_cnc)  o Capture (sp_ocap)  o Read (sp_ordr)  o Export (sp_xport)  l The following child processes are spawned by sp_cop on a target system:  1.

shut down SharePlex first. NOTE: When directed in the documentation or other instructions to start or stop sp_cop on the Windows platform.5) Administrator Guide 36 . Shutdown Considerations on Unix and Linux You can safely shut down SharePlex for a short time while there is still transactional activity. If the redo logs wrap and the archive logs cannot be accessed. Start the SharePlex port# service. Verify that the SharePlex processes are started by issuing the lstatus command in sp_ctrl.You can use the force option with the shutdown command to forcefully shut down replication if necessary. replication resumes at the correct place in the redo logs or the archive logs. and there will be latency between the source and target data. This starts the MKS Toolkit® operating environment. bypassing normal shutdown procedures. Start sp_ctrl from the bin sub-directory of the SharePlex product directory. As an alternative to stopping SharePlex. Otherwise. SharePlex may need to process a large volume of redo backlog when you start it again. NOTE: If you want to shut down both SharePlex and the database. you can use the stop command in sp_ctrl to stop individual SharePlex replication processes as needed.6. See the SharePlex Reference Guide for more information about SpUtils. See Start and stop SharePlex on Windows  5. It terminates sp_cop immediately.  3. Start the system. if needed. Otherwise. However. See the SharePlex Installation Guide for more information about the MKS Toolkit. The next time you start SharePlex. resynchronization of the source and target data may be the only option.  6. which must be running in order to run SharePlex. SharePlex runs as a service named SharePlex port#.  4. the best practice is to leave SharePlex running while there is transactional activity. sp_ctrl> lstatus SharePlex 8.6 (8. Start the NuTCRACKER service in the Windows Administrative Tools control panel. SharePlex will interpret that the database is failing and generate a warning message. See the SharePlex Reference Guide for more information about this command. it means to start or stop the SharePlex service.  2. start the components in this order:  1. See the SharePlex Reference Guide for more information about this command. Startup Sequence on Windows When you start systems that are involved in replication. Take this possibility into account whenever you stop SharePlex while redo is still being generated. Run SharePlex on Windows On Windows. Start the source and target databases. The service can be installed during the installation of SharePlex or at a later time by running the SharePlex SpUtils progam. where port# is the port number that is used by a particular instance of SharePlex.

start. Start it. NOTE: Starting the SharePlex service automatically starts the SharePlex replication processes (Capture. To control the SharePlex service from Windows The SharePlex service appears as an entry named SharePlex port# in the Services console of the Administrative Tools control panel. Set SharePlex startup status on Windows You can change the timing of SharePlex startup. Right-click the SharePlex service name. you can close the utility. select the desired startup option. NOTE: You can also use the shutdown command in sp_ctrl to stop the SharePlex service.  6. stop. Right-click the service name to start or stop the service.  2. Do one of the following:  l Click Install to install the service.6 (8. View the Windows services to make certain the NuTCRACKER service is running.  1. Open the Services console of the Administrative Tools control panel. then click Properties. When Current State shows that the service is running. Run the SpUtils utility from the desktop shortcut or the Programs menu. it is Automatic. To control the service. Your user name must be assigned to the SharePlex admin group. Export.  l Click Stop to stop the service. Read. From the Startup type list. Log onto Windows as a SharePlex Administrator. If Start is not shown. Set SharePlex process priority on Windows IMPORTANT! Do not use the standard Windows Task Manager to set process priority for SharePlex. click the Help link in the dialog. if needed. To control the SharePlex service with SpUtils You can use SpUtils to install. For assistance. the service is either running already or not installed.  1. If you do not want those processes to start when the service starts.  3. You may need to contact a System Administrator to perform this task. the service is either stopped already or not installed. Click the SharePlex Services tab of the utility.  3.Start and stop SharePlex on Windows On Windows. you can use the SpUtils utility or the Windows Administrative Tools control panel.6.  l Click Start to start the service.  4. see Assign SharePlex users to security groups. SharePlex 8. If Install is not shown. they must be stopped with the stop command in sp_ctrl before you shut down the SharePlex service. the only way to start or stop SharePlex is by starting or stopping the SharePlex service. Select the port number of the SharePlex instance that you want to control. They will remain stopped until you issue the start command for each process that you want to start.  2. and check the status of the SharePlex service. the service exists. meaning the service starts when the system starts. For more information. Import and Post). By default. If Stop is not shown.  5.5) Administrator Guide 37 .

).exe service. Read.exe process.exe process for each one.  l One Sp_Ocap (Capture) process plus one child Sp_Copsrv.exe processes — one for each replication process (Capture.exe.  l One Sp_Xport (Export) process plus one child Sp_Copsrv. The operating system controls the parent Sp_Copsrv. The SpUtils utility has an option that enables you to run the Windows Task Manager with the required elevated privileges to set the process priority. Select the TaskMgr tab. sp_ctrl.  4.exe will be running. such as sp_ctrl.  l One Sp_Opst_Mt (Oracle Post) or Sp_Xpst (Open Target Post) process plus one child Sp_ Copsrv.On Windows systems.exe process.5) Administrator Guide 38 . look for the one that is using the largest amount of memory.exe process in the Windows Task Manager.6 (8. This procedure must be performed by a SharePlex Administrator.exe process.exe process. the SharePlex processes do not start when you start the service.exe processes consume less memory than the parent process. Right click the SharePlex instance that you want to prioritize. The parent Sp_Copsrv.  2. To identify which replication process is associated with a child Sp_Copsrv. Select Set Priority.exe process spawns child Sp_Copsrv. For a standard uni-directional configuration replicating through default queues to one target system.  3. To identify the parent Sp_Copsrv. Run SpUtils.exe process. the NuTCRACKER operating environment controls the SharePlex processes. If there are no active replication configurations. and so forth.  l One Sp_Ordr (Read) process plus one child Sp_Copsrv. then select the desired priority level. Identify SharePlex processes on Windows In the Windows Task Manager.exe process. Import.  l If there are any additional SharePlex processes running. and just the parent Sp_Copsrv. look in the SharePlex Event Log for the message stating when the replication process started. there is an additional Sp_ Copsrv. Consult with the System Administrator to select an appropriate value based on the requirements of all software running on the system. there is an additional Sp_ Copsrv.exe process. there are following processes on a Windows system: On the source system:  l One parent Sp_Copsrv. representing the SharePlex sp_cop process.exe process for each one. SharePlex 8.  l One Sp_Mport (Import) process plus one child Sp_Copsrv. SharePlex appears as Sp_Copsrv.  l If there are any additional SharePlex processes running. On the target system:  l One parent Sp_Copsrv. This entry provides the PID for that process and the PID of the associated Sp_copsvr.exe process. Post.exe process. To set SharePlex priority  1. Export. The child Sp_Copsrv. such as sp_ctrl.6.

SharePlex may need to process a large volume of redo backlog when you start it again. SharePlex will interpret that the database is failing and generate a warning message. Otherwise. if needed.5) Administrator Guide 39 . replication resumes at the correct place in the redo logs or the archive logs.6 (8. See the SharePlex Reference Guide for more information about this command. shut down SharePlex first. Take this possibility into account whenever you stop SharePlex while redo is still being generated. The next time you start SharePlex. However. you can use the stop command in sp_ctrl to stop individual SharePlex replication processes as needed. SharePlex 8. If the redo logs wrap and the archive logs cannot be accessed. the best practice is to leave SharePlex running while there is transactional activity. Otherwise. and there will be latency between the source and target data. As an alternative to stopping SharePlex.6. NOTE: If you want to shut down both SharePlex and the database.Shutdown Considerations on Windows You can safely shut down SharePlex for a short time while there is still transactional activity. resynchronization of the source and target data may be the only option.

For example. control and maintain each SharePlex instance separately. There should be one product directory and one variable-data directory per installation. You do not have to set environment variables to point to the correct port and variable-data directory. Contents Run multiple instances of SharePlex from separate installations Run multiple instances of SharePlex from one installation Run multiple instances of SharePlex from separate installations IMPORTANT! This topic assumes that there is no active configuration.  l In startup and shutdown scripts. It assumes you are configuring multiple instances of sp_cop as part of an initial setup of the replication environment. To set up multiple instances of SharePlex in this configuration:  l Install each one separately. This method provides a one-to-one relationship between the binaries and the variable-data directory.6. This method has the following benefits:  l Processes are easily isolated.  l You can upgrade or perform other maintenance one product directory at a time. SharePlex 8.  l You can run the same or different versions of SharePlex on the same system. The disadvantages are:  l You must install and upgrade each installation separately. You start. and other places where you must map environment variables to SharePlex components. and there are no special setup requirements.6 (8. This procedure creates autonomous SharePlex instances. you can run multiple instances of sp_cop to isolate the replication streams.  l More disk space is required to store the product files.5) Administrator Guide 40 . with nothing in common between them. you must map them for each installation. when replication is configured from multiple source systems to a central target system. or choose not to perform those tasks. 3 Run multiple instances of SharePlex This chapter shows you how to configure and run multiple instances of SharePlex on one machine.

The sp_cop process listens on each system on TCP and UDP ports for communications from SharePlex processes on other systems in the network.5) Administrator Guide 41 .  l You conserve disk space. How to run multiple sp_cop instances on Unix and Linux To run multiple instances SharePlex on the same Unix or Linux machine. The disadvantages are:  l Processes must be directed to each instance. To install SharePlex. In this configuration. It assumes you are configuring multiple instances of sp_cop as part of an initial setup of the replication environment. start sp_cop with the correct identifier for each instance. 1.6. use the same port number for the remote instances of sp_cop that will process the same replication data stream as the instance you are configuring.  l For each sp_cop instance.  l Upgrades apply to all instances of SharePlex. Connection information to the source or target data store is linked to each sp_cop instance. Maintenance procedures are performed for only one installation.  l For each sp_cop instance. in one place.  l IMPORTANT! Make certain to create a different database account for each installation. each running a separate instance of sp_cop. Each variable-data directory is identified by the port number of its sp_cop. You link each sp_cop to a different variable-data directory.6 (8. see the SharePlex Installation Guide.  l Install each one on a different TCP/IP port number. you run multiple instances of the sp_ cop program. such as a command or exchange between the Export and Import processes.  l Startup and shutdown scripts only need to be created and run for one set of binaries. If SharePlex 8. This method provides a one-to-many relationship between a set of binaries and two or more variable-data directories. and set a port connection in sp_ctrl to ensure that commands are directed to the correct instance. because you only store one set of SharePlex binaries and installed files. This method has the following benefits:  l You install and upgrade only one installation of SharePlex.  l All sp_cop instances are the same version of SharePlex. Run multiple instances of SharePlex from one installation IMPORTANT! This topic assumes that there is no active configuration. each running on a different port number. obtain one port number that will be used by that instance for both TCP and UDP communication.  l The customization of the SharePlex monitoring scripts (see Run monitor scripts on Unix) only need to be done once. Assign port numbers Assign each instance of sp_cop a unique port number. You must set environment variables for each instance. you create multiple variable-data directories and link each one to a unique port number.

where port is the port number assigned to the exported variable-data directory. At the end of the installation. Issue the following command to set the port number for the exported variable-data directory. sp_cop on one system cannot connect to the sp_cop on another system to send or receive messages. create a variable-data directory. Copy the original variable-data directory (with its sub-directories) to a new variable-data directory for each instance of sp_cop that you want to run. 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. Define the port numbers in the SharePlex environment For each variable-data directory that you created.6 (8.  1. Create variable-data directories For each instance of sp_cop. you should have one product directory.  2. Start sp_cop with the -u option. Include the port number in each name. set param SP_COP_TPORT port SharePlex 8.  4. for example splex2101 in the preceding example. perform this procedure to set the port number that you reserved for this instance of SharePlex. and assign each to one of the port numbers you obtained. The variable-data directory contains the environment that is unique to a SharePlex instance. Install SharePlex according to the instructions in the SharePlex Installation Guide.  3. 2. cp -p -r /splex/vardir/splex2100 /splex/vardir/splex2101 cp -p -r /splex/vardir/splex2100 /splex/vardir/splex2102 3. Shut down sp_cop if it is running. (Leave no spaces between -u and the port number. ksh shell: export SP_COP_TPORT=port export SP_COP_UPORT=port csh shell: setenv SP_COP_TPORT port setenv SP_COP_UPORT port  3. Export the SP_SYS_VARDIR variable to point to one of the new variable-data directories.the ports are different. Log in as a root user. Export the SP_COP_TPORT and SP_COP_UPORT variables to point to the port number of the variable- data directory that you exported.6. as shown in the following examples.5) Administrator Guide 42 . one variable-data directory associated with a port number. This is your base instance of SharePlex.  1.) $ /productdir/bin/sp_cop -uport&  4. and one database account.

then start sp_cop again. . 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. SharePlex 8.loc files.  1. find out if someone else started a session of sp_ cop using the same port number and variable-data directory. Export the SP_SYS_VARDIR environment variable to point to the variable-data directory of the first sp_ cop instance. 5. Cannot delete because there are users attached. Run the appropriate database setup utility for the database.)  7.  1. use the port command to set the session to the port number of the sp_cop instance you want the commands to affect. Start sp_cop with the -u option.5) Administrator Guide 43 . for example splex2101 in the example./sp_ctrl port number  4. Start sp_cop instances You can now run separate instances of sp_cop and sp_ctrl as needed.ipc and shmaddr. Shut down sp_cop. Establish connections to the source or target data store For each sp_cop instance. 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. kill the processes associated with that session. Export the SP_SYS_VARDIR variable to point to one of the new variable-data directories. If permissible. See the Utilities section of the SharePlex Reference Guide for more information. delete the shstinfo.6 (8. 4. In sp_ctrl. Repeat these steps for each variable-data directory. set param SP_COP_UPORT port  5. (These files may not exist if sp_cop has never been started for this variable-data directory.6. /splex/proddir/bin/sp_cop -u port &  3. In the rim sub-directory of the exported variable-data directory. Error cleaning up previous shared memory segment ###. establish the connections that SharePlex will use to access the source or target data of this SharePlex instance.  6.  3. NOTE: If you receive an error message similar to the following. where port is the port assigned to the sp_cop instance. Repeat this procedure from step 1 for each additional variable-data directory. Repeat these steps for each instance of sp_cop that you want to run.

6 (8.  l Select or create a different variable-data directory for each instance. with the following differences:  l Use the same product directory for each instance.  2.  5. Log onto Windows as a SharePlex Administrator (member of the spadmin group). Run Sp_Ctrl for the instance. click Start. you can start another instance of SharePlex.  4. sp_ctrl > port number SharePlex 8. use the correct port number for the instance.  6. Start the SharePlex instances All instances are controlled from the SpUtils utility.6.  2. 2.  7. each with a different port number and variable-data directory. 1.  3.  l Select a different port number for each instance. Make certain to select the correct port each time. When the Current State text box shows that the service has started. In Sp_Ctrl.  1. Run the SpUtils utility. This starts the service for that instance.  l When prompted for a license key.Check if SharePlex processes are running and kill them if necessary. use the same license key for all instances. use the port command to set the session to the port number of the sp_cop instance you want the commands to affect. This creates your initial instance of SharePlex.  8.  l When you run database setup. you install and run a SharePlex service for each instance. Install the instances  1. How to run multiple sp_cop instances on Windows To run multiple instances of SharePlex on the same Windows machine. Repeat the installation procedure for each SharePlex instance that you want to create.5) Administrator Guide 44 . The installation program locates available ports. and use a different name for each database account. which you can override if necessary. Install SharePlex on the source and target systems according to the directions in the SharePlex Installation Guide. Select the port number for the instance of SharePlex that you want to start. Under SharePlex Service Status. Select the SharePlex Services tab.

 l command is the SharePlex command. The sp_cop program must be running in order to run sp_ctrl. for example: $ /productdir/bin/sp_ctrl sp_ctrl>command [on host] where:  l productdir is the SharePlex product (installation) directory. The sp_ctrl program resides in the bin sub-directory of the SharePlex product directory. NOTE: See the SharePlexReference Guide for more information about the commands shown in this topic.6 (8. Contents How to run sp_ctrl Define a default port for sp_ctrl Define a default host for sp_ctrl Set a default editor for sp_ctrl How to run sp_ctrl You can run sp_ctrl on any machine where SharePlex is installed. control. for example: $ /productdir/bin/sp_ctrl command [on host]  l by running the sp_ctrl command interface to issue one or more commands. 4 Execute commands in sp_ctrl This chapter contains instructions for using the sp_ctrl command interface to execute commands that configure.6. otherwise it displays an error message similar to this: Your tcp port is not set properly or “sp_cop” is not running. SharePlex 8.5) Administrator Guide 45 . Start sp_ctrl There are two ways to run sp_ctrl:  l from the command shell of the operating system to issue one command. and monitor SharePlex.

SharePlex 8. sp_ctr >hosthostname The command changes the sp_ctrl prompt to include the host name: sp_ctrl (sysA) > The host setting applies only to the sp_ctrl session in which it is set. By default. On Windows systems. as shown in the following example. sp_ctrl > port number For more information about running multiple instances of SharePlex. Define a default port for sp_ctrl If there is only one instance of SharePlex on a system. However. see the SharePlexReference Guide.  l onhost represents one of the command options that allow you to issue a command on the local machine to control SharePlex on a remote machine (if supported by the command). For more information about the port command. sp_ctrl detects the port number. the new editor must be a native ASCII text editor. if you configured more than one SharePlex instance on a system (where each one runs on a different port number) you must use the port command to set the session of sp_ctrl to the instance for which you want to issue commands. such as a configuration file. you can run sp_ctrl from the Sp_Ctrl desktop shortcut or Windows Programs menu. you can simply close the sp_ctrl command prompt window. issue the exit or quit command. including spaces. Define a default host for sp_ctrl To define a default machine for all interactive sp_ctrl sessions. Set a default editor for sp_ctrl You can set the default editor that sp_ctrl runs when you issue a command that requires input to an ASCII text file.6 (8. $ /productdir/bin/sp_ctrl status on host:port On Windows systems.6. sp_ctrl runs vi on Unix and Linux and WordPad on Windows. If you change the default editor. This command enables you to enter a series of commands without using the onhost option for each one. even if you can save a file to ASCII from that program. see Run multiple instances of SharePlex. The default text editors are tested and proven to work with SharePlex. The sp_ctrl command line allows a total of 256 characters. The exit or quit command only closes the sp_ctrl session. use the host command. Do not use a word processing program or other non-ASCII program. It does not stop the SharePlex replication processes.5) Administrator Guide 46 . Exit sp_ctrl To exit the sp_ctrl command-line interface.

right click the new variable. Expand the SharePlex node: \HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex  5. Right click the port number of the SharePlex instance to which you want to add a variable.csh shell setenv EDITOR name_of_editor Change the editor on Windows To change the text editor for sp_ctrl on a Windows system. Shut down the SharePlex service. you must add the EDITOR variable in the Windows Registry. Type the correct name. This sets the editor only for that session of sp_ctrl. then String Value.  9. You can override this setting on a per-session basis.  3. Consult a System Administrator if you need help with this procedure. In the Run dialog. Syntax . then select Rename.6. Exit the Registry. enter the string for the new variable and then click OK. SharePlex 8.ksh shell export EDITOR=name_of_editor Syntax .  7. Under the Name column. IMPORTANT! Incorrect Registry settings can adversely affect the operation of SharePlex.Change the editor on Unix or Linux Set the EDITOR variable in either of these ways:  l Before you start sp_ctrl. type regedit to run the Registry Editor. Under Value Data.  10.  1.  4. then select New. Open the Run dialog.  l In the shell startup script on the local machine.  8. Double click the new variable. This sets the editor permanently. The location varies with the Windows version. until changed in the startup script.5) Administrator Guide 47 .  2.  6.6 (8.

. SharePlex does not have to fetch them from the database. On a busy system. When the key column values for a row update are in the redo log. Some SharePlex features require primary key and unique key logging to be enabled. In addition. or that a supplemental log group on unique columns be defined for every table in replication. this greatly improves the performance of the Read process. Set the appropriate logging level Minimal supplemental logging must be set before you activate the SharePlex replication configuration. and ASM instances. SharePlex 8. ALTER TABLE DDL commands that change the rowid of a table can affect subsequent DML operations if the primary or unique keys of the tables in replication are not being logged. on filesystem devices. SharePlex fetches their values based on the rowid. Any operation that changes the rowid. SharePlex supports redo logs and datafiles that are stored on raw devices. 5 Prepare an Oracle environment for replication This chapter contains instructions for preparing an Oracle source or target database environment for replication. Perform all tasks that apply to your data and to your replication objectives. Contents Set up Oracle redo logging to support SharePlex Set up Oracle database objects for replication Set up an Oracle database to support SharePlex Set up SharePlex to support Oracle data Set up TDE Support Set up Oracle redo logging to support SharePlex SharePlex captures from the online and archived Oracle redo logs. See Set up Oracle database objects for replication for more information about defining key values. can cause the wrong key values to be used for subsequent DML operations.6..5) Administrator Guide 48 . such as ALTER TABLE. When the keys are not logged. SharePlex recommends that both primary key and unique key supplemental logging be set.MOVE.6 (8. The tasks outlined in this chapter must be performed before you perform initial synchronization to start replication in your environment.

Like Oracle. In most cases. If the table has multiple unique keys.6. Subtract the number of online redo logs from that value. Oracle logs all columns that are not a LONG or a LOB.Ensure that the correct key is logged When primary and unique key supplemental logging is enabled and a table does not have a primary key. See Set up Oracle database objects for replication for more information about defining key values. See Tune Capture on Exadata To test an appropriate online log configuration In pre-production testing. Capture reads through the archive logs to locate the records it missed. reading the online logs is faster than reading the archives. Ideally. At minimum. Capture records its location in the redo log and continues from that point when started again.6 (8. the redo logs should be configured so that SharePlex can avoid reading the archive logs. you can determine if Capture is reading the archive logs by doing the following:  1. Configure the archive logs If the Capture process stops (or is stopped by a SharePlex user) while replication is active. Ensure that the online redo logs are large and numerous enough to minimize processing from the archive logs. Capture usually needs to read the archives in this case because the required log is no longer online. Oracle has to decide what type of unique key to log. Determine the log that SharePlex is processing by querying the SHAREPLEX_ACTID table. SQL> select sequence# from v$log where status='CURRENT'  3. Capture can lose pace with Oracle activity and there will be latency between the source and target data. configure archive logging to support faster and uninterrupted replication as follows: SharePlex 8. To avoid Capture issues. SharePlex chooses a key in this order:  l primary key if there is one  l the best (or only) unique key if there is one  l all the columns If a table being replicated by SharePlex does not have a primary key. This reveals how many logs Capture lags behind Oracle. SQL> select seqno from splex. if you have 10 redo logs and SharePlex is 11 logs behind. Oracle determines the best key to use and logs those column values for every UPDATE. Subtract the seqno value from the sequence# value. If the number is negative. it is possible that the key columns that Oracle logs are not those that SharePlex requires. it is processing archive logs.  4. but does have multiple unique keys.5) Administrator Guide 49 . there should be enough redo log capacity to hold several hours worth of data without wrapping.shareplex_actid  2. For example. you might get faster Capture speed by multiplexing the logs to a different system. SharePlex must also identify a key to use to replicate data. If there is a long delay between when Capture stops and then starts again. SharePlex is processing archive logs. NOTE: On Exadata systems. You can then use this result to adjust the online logging configuration. If the redo logs wrap before Capture starts again. If a table does not have any type of key. Determine the log that Oracle is writing to by querying Oracle's V$LOG table.

If SharePlex does not find the archive log there.5) Administrator Guide 50 . issue the show capture command with the detail option in sp_ctrl on the source system. To determine the current log for SharePlex. it searches the directory or directories specified by the SP_OCT_ARCH_LOC parameter. checks for the logs. however.6. you can configure Capture to wait a certain amount of time for the move to be wait for log. set the SP_OCT_CK_LOC_FIRST to 1. stops if they are not yet available. SharePlex will not be able to read them at that location. Exadata see Tune Capture on Exadata. To configure Capture to wait. SharePlex can process higher volumes of data when reading from a logs on multiplexed archive location outside of the Exadata ASM file system. and continues checking processes and stopping until the logs are available. On the archive Exadata. For more information. Otherwise. Otherwise. set the SP_OCT_ LOGWRAP_RESTART parameter to the number of seconds that you want Capture to wait. if the online logs wrap archive before Capture is finished processing them. management Capture waits. completed. SharePlex searches for the archive logs in Oracle’s archive log location list.  l There is the potential for SharePlex to lose information needed for Post to construct SQL statements. Always monitor disk space and latency while SharePlex is running. Disable You can disable archive logging on the target systems to eliminate unnecessary Oracle archive activity on that system. This prevents Capture from stopping because a log it needs is not yet available. Requirement Description Enable Archive logging must be enabled on the source system. set the SP_OCT_ non-default ARCH_LOC parameter to the full path name of the directory where the archive logs are archive located. root ASM location Read from Normally. a resynchronization of the source and target data logging on will be necessary. If the redo logs wrap. the source system Time Do not compress the archive logs until SharePlex is finished processing them.6 (8. SharePlex provides the least latency when reading from the online redo logs. logging on the target Do not place If the database uses ASM. Specify a If you are storing the archive logs in a location other than the Oracle default. Configure If using SP_OCT_ARCH_LOC and you are using an automated method to move the logs to that Capture to location. IMPORTANT: If Capture falls behind the pace at which Oracle generates redo volume. especially if the needed archive logs no longer are available. the Oracle redo logs (online and archive) cannot be located under logs at the the ASM root directory. You can compress any logs that were generated before the current one. compression SharePlex returns a "log wrap detected" message and will stop because it cannot process the properly data. except for high availability or peer-to-peer strategies. SharePlex 8.  l It is possible to run out of disk space on the source system while Capture processes and queues the operations that it missed. To have Capture go directly to the SP_OCT_ ARCH_LOC location and skip the read of the Oracle log list. the following may apply:  l It might be more practical to resynchronize the data instead of waiting for SharePlex to restore parity by capturing from the archive logs. Monitor these processes regularly to prevent replication latency.

When choosing a key to use. For more information. The role of keys SharePlex works fastest when there is a primary key or a unique key on all source and target tables being replicated. especially large tables and tables containing LONG columns. but the LONG columns could have different values. where at least one of the columns is NOT NULL  l Unique key with the fewest columns. you can specify columns for SharePlex to use as a key when you create the configuration file. The rows in the table are identical except for the LONG columns. row uniqueness cannot be enforced. it is recommended that you enable primary and unique key supplemental logging. The following example illustrates the problem. This key is maintained internally and is not created on the table itself.6. because the resultant WHERE clause causes Oracle to perform a full table scan on the target table to find the row. COLUMN A COLUMN B COLUMN C (LONG) 10 20 100 10 20 200 10 20 300 SharePlex 8. Tables without a key or unique index If SharePlex cannot detect a key or unique index on a table.  l Primary key  l Unique key with the fewest columns. For best performance. it constructs a key using all of the columns except LONGs and LOBs. This is accomplished by ensuring a one-to-one relationship through the use of keys and indexes. This is known as a key definition and is specified in the configuration file.6 (8. and that significantly slows replication. SharePlex uses the best available key column in the following order of priority. the table can be out of synchronization without being detected by you or SharePlex. For example. or if Oracle logs the wrong unique key for SharePlex. and there is no primary or unique key. see Define a unique key An alternative to a key definition is to create or use a unique index based on one or more columns that establish uniqueness.5) Administrator Guide 51 .Set up Oracle database objects for replication This topic provides information about how to configure certain characteristics of Oracle database objects that you will be replicating with SharePlex. If a table does not have a primary or unique key. if there is a possibility that non-LONG columns in different rows could contain identical values. Additionally. This is not a desirable option. Ensure row uniqueness SharePlex must have a way to ensure that the row it is changing on the target is the correct one that matches the source row.

so there is a possibility it could change the wrong row on the target system.5) Administrator Guide 52 . where the values in the key column are increased by 1: Key_Col 1 4 5 7 SQL> update table X set a=a+1. Changes to key values SharePlex handles changes to the value of a key column without any special settings. so SharePlex could post the change to the wrong row. When constructing the SQL statement to apply the change to the target table. and that value already exists as a key in another row in the target table. There are three rows that meet this criteria.) update x set a=6 where a=5. where n is an incremental increase. SharePlex will return unique-key constraint violations and out-of-sync errors. This type of error can happen when you update values using an “x +n” formula. (Succeeds) update x set a=8 where a=7. (Succeeds) update x set a=5 where a=4. commit The new values become the following. (Succeeds) The pre-image value that Post uses for the target sequence is the same as the increased value replicated from the source. Oracle rejects the operation as a unique constraint violation. SharePlex 8. However. if sequences are used for keys and if there is a possibility that those values will be updated.6. if a new value is used to apply an operation. (Fails because a value of 5 already exists. and they are replicated to the target system: Key_Col 2 5 6 8 SharePlex performs the update in the order that the operations enter the redo log: update x set a=2 where a=1. To control how SharePlex addresses keys that permit NULLs.Suppose a user on the source system changes Column A to 15 in the first row. set the SP_SYS_IN_SYNC parameter. SharePlex constructs a key using Columns A and B (UPDATE tablename SET Column A to 15 WHERE Column A = 10 and Column B = 20) to locate the row to change. Keys with nulls If a key permits NULLs. See the SharePlex Reference Guide for more information. It is possible for one of the “x +n” values to equal an existing value. Otherwise. The following is an example.6 (8. SharePlex cannot ensure the uniqueness of a row for UPDATEs and DELETES. create the sequences so that the updates cannot result in a duplication of keys on the target system. Another example would be a transaction that updates A to B and then updates B to C.

Consider limiting the number of indexes to the ones that have the most utility. An index maintains the integrity of the target data. This slows the entire system. For applications that perform mostly one type of DML.  l All large tables should have a unique index on the target system. These indexes can adversely affect the performance of the Post process.  l Once you have identified or created a unique index. consider the following:  l INSERTs: Use just a few indexes.  l DELETEs: Remove as many indexes as you can. If no unique index exists for a table. however. then rebuild them at the end.IMPORTANT! If you plan to use peer-to-peer replication. updates or deletes a bitmap entry.5) Administrator Guide 53 . Rebuild the ones that are fragmented. If there are too many indexes on a target table. This makes SharePlex run faster. or it can slow the Post process. see additional requirements for keys in Configure replication to maintain multiple peer databases. weigh their benefit for queries against the their impact on the transactions applied by Post:  l When Oracle adds. If there is no unique index. Oracle scans the entire table in order to locate the rows to be changed by Post. Indexes The correct use of indexes is important in a replication environment. If you run large batch jobs that do millions of SQL operations. as a unique index (not using CREATE UNIQUE INDEX command). If you must use bitmap indexes on target tables.6 (8. you can ensure that Oracle uses it by employing the hints feature of SharePlex.  l Some applications do not use primary key constraints. Oracle must update them all as rows are added and deleted. make sure the appropriate columns are indexed so that modifications to the foreign keys do not cause full table scans.  l When replicating a source table that has a unique index. the target table also should have a unique index. including replication. and you will have more organized indexes afterward. there will be an index that was created. but not named. it is recommended that you create one or specify a user-defined key when you create the configuration file.6. although it was created on one or more columns populated with unique values. See Define a unique key.  l If tables have foreign keys. Bitmap indexes For performance purposes. avoid the use of bitmap indexes while the Post process is applying the data. SharePlex 8. such as a person’s name and employee identification number. it effectively locks all the rows associated with the bitmap segment.  l UPDATEs: Use an index on a column that does not change after an INSERT statement. Often.  l Keep your indexes up-to-date. to limit their maintenance. remove unnecessary indexes before the batch job. and therefore a unique index is not created by default. See Use Oracle INDEX hints.

sql script. This script puts a WHEN clause into each trigger’s procedural statement that tells it to ignore operations posted by the SharePlex user.   Either disable triggers entirely on the target system or run the way replication sp_add_trigger.  l To proceed.6 (8. Every time you change a table with a bitmap index. Consequently. This associated cost (Oracle time and resources) to rebuild is added to your SQL UPDATE statement. Triggers can be handled as follows. SharePlex follows the Oracle recommendation to have a bitmap index on a more static table.  l In general. Prevent triggers from firing on the target DML changes resulting from a trigger firing on the source system enter the redo log and. therefore. Enable triggers for users other than SharePlex. SharePlex replicates both INSERTs to the target system. Thus. NOTE: Replicating bitmap indexes is not recommended. Reporting. if an INSERT to TableA on the source system triggers an INSERT into TableB. which delays posting significantly if the number of locks is high. triggering an INSERT into TableB. are replicated and posted to the target database by SharePlex. Post must detect and resolve the blocking. SharePlex 8. For example. if the same trigger fires on the target system and initiates the same DML changes (which already were made through replication) there will be out-of-sync errors.5) Administrator Guide 54 . changes made by different Post sessions (there is a Post session for every session on the source system) can block each other if their work updates bitmap entries in the same bitmap segment. data sharing. The Post process applies the first INSERT to TableA on the target system. depending on your replication strategy: Replication strategy How to handle triggers on the target High availability  1. For important information about how to use the trigger scripts. The row already exists because the trigger fired for TableA. other basic one. Follow these guidelines to ensure that they are handled.sql script to ignore operations posted by the SharePlex user. frequent inserts by multiple concurrent sessions into a table with bitmap indexes will incur lock conflicts. either in preparation for failover or because transactions are and performed on multiple source systems. Disable triggers for the SharePlex user by running the sp_add_trigger. Configure integrity constraints Integrity constraints have a effect on replication.  l A bitmap segment can contain references to hundreds of rows. the index is rebuilt. As a result. but random update and delete activity on such a table will not. when Post attempts to post the replicated INSERT to TableB. see the SharePlex Reference Guide. there will be a unique-key violation.6. Peer-to-peer  2.

1 or 2 (NOTE: In peer-to-peer replication. SharePlex 8. Post detects the ON DELETE CASCADE dependencies and suppresses the posting of any replicated cascaded deletes to the child tables. you can build a script that re-enables the constraints as part of the failover procedure. For high-availability purposes. If you do not enable this support through SharePlex you must disable these constraints manually on the target.6. see Understand the concept of synchronization. jobs or applications. unique index columns. synchronized replication environment because they are satisfied on the source system. but this feature must be enabled.) Check constraints Disable check constraints on the target system. Tables with foreign keys to one another must all be included in the replication configuration for accurate replication of the source foreign key results. ON DELETE CASCADE constraints SharePlex allows ON DELETE CASCADE constraints to remain enabled on the target tables.6 (8. If DML or DDL changes are made to target objects by other individuals. and foreign key columns on the source. The underlying target table still remains out-of-sync until it is resynchronized. the Post transaction can fail on the constraint validation.  l Set the following SharePlex parameters:  l SP_OPO_DEPENDENCY_CHECK parameter to 2  l SP_OCT_REDUCED_KEY parameter to 0  l SP_OPO_REDUCED_KEY parameter to 0. NOTE: If constraints are DEFERRED on the target tables. enable the SP_OPO_DISABLE_OBJNUM parameter to allow the transaction to succeed. To enable ON DELETE CASCADE support  l Enable the logging of primary keys. SharePlex replicates the results of the source foreign key constraints. If you leave one or more out. They add unnecessary overhead. this parameter must be set to 0. the SharePlex database user must be the only user allowed to perform DML or DDL on the target objects. All tables with referential constraints must exist in the target database. Prevent access to target objects In all scenarios except peer-to-peer replication. which results in conflicts and errors when the deletes cascade on the target. Otherwise SharePlex replicates both the primary delete and the cascaded deletes. For more information. To work around this problem. the target data may no longer reflect the state of the data on the source system. These checks are redundant in a well maintained.Foreign key constraints Foreign key constraints must be disabled on the target tables. the referential integrity could become corrupted.5) Administrator Guide 55 .

6 (8.  l UPDATE the sequence(s). See Create configuration files. SharePlex 8. do not replicate them. When sequences are cached. data sharing. Use the following formula to determine the target START_WITH value: source_current_value+ (source_INCREMENT_BY_value x source_CACHE_value) =target_START_ WITH_value IMPORTANT! (source_INCREMENT_BY_value x source_CACHE_value) should not exceed 2 GB.5) Administrator Guide 56 . SharePlex can replicate the values as a group. SharePlex must go to disk every time a value is obtained from the sequence. as you would a table.  l Peer-to-peer: No SharePlex does not support peer-to-peer replication of identical sequences. other basic one-way replication: No If sequences are unnecessary on the target system. the start value of the target sequence must be larger than the start value of the source sequence.  l Reporting. It may not be necessary to replicate sequences in certain replication strategies.  l Specify sequences in the configuration by owner and name. which slows replication of more critical data.  l ALTER the sequence(s) again by setting the following values: Increment_value=source_INCREMENT_BY_value Cache_value=source_CACHE_value SharePlex treats ALTER SEQUENCE operations like a simple SELECT (UPDATE) to a sequence because the redo log records make no distinctions between the two operations.  l High availability: Yes The way that SharePlex replicates sequences allows users to begin using the failover database immediately without worrying about incrementing the sequences or reusing one.Configure sequences SharePlex replicates changes to Oracle sequences that are made in an ALTER SEQUENCE and DROP SEQUENCE commands and during DML transactions. SharePlex uses the ALTER SEQUENCE command to update sequences in a target database as follows:  l Change the increment value to: source_INCREMENT_BY_valuexsource_CACHE_value  l Set to NOCACHE. To configure sequences for replication  l Use caching and set the cache to increments of at least 20. When sequences are not cached. See Configure replication to maintain multiple peer databases for important instructions concerning sequences in peer-to-peer replication. The sequence itself does not have to be replicated. or replication of sequences will fail. the sequence values are part of the key columns when the replicated rows are inserted on the target system.  l To ensure the uniqueness of sequences on the target system. It can slow down replication. Even if a sequence is used to generate keys in a source table.6.

Consult the Oracle documentation prior to making changes to Oracle parameters.5) Administrator Guide 57 . The PROCESSES parameter on the target system must be set high enough to accommodate all of those connections. query the database using the following SQL statement: select value from V$PARAMETER where name = 'open_cursors'. and follow this formula: 10 + (peak number of concurrent transactions x 2) = minimum open cursors needed The OPEN_CURSORS value can be modified or added if absent.Set up an Oracle database to support SharePlex Certain Oracle database settings have an affect on replication and must be set appropriately. If you intend to disable SQL caching.6 (8. a target database. or one that serves as both a source and target database. the following formula takes into account logins made by the Read process.6. Adjust OPEN_CURSORS to support Post cursors SharePlex requires the value of the Oracle OPEN_CURSORS parameter to be set correctly on the target database. then estimate the peak number of concurrent updating transactions (sessions) that your applications generate. Adjust the PROCESSES parameter to support connections The PROCESSES parameter in the init. To view the OPEN_CURSORS value. The Post process reserves 10 cursors for routine calls that are closed once they finish. (peak number of source database sessions) + (background Oracle processes) + (value of SP_ORD_LDA_ARRAY_ SIZE parameter +3) = setting for PROCESSES Database is a target only The Post process creates as many connections on the target system as there are sessions on the source system in order to maintain transaction consistency. See Tune SQL Caching for more information. Its value depends on whether a database is a source database.ora file must be set to accommodate connections created by SharePlex and the database users. plus:  l The background Oracle processes those connections generate  l The peak number of users expected to access the target database for queries Use the following formula as a guide: (peak number of source database sessions) + (peak number of target database sessions) + (background Oracle processes) = setting for PROCESSES SharePlex 8. plus a minimum of 50 cursors per transaction when the SQL Cache feature is enabled (this is the default). Database is a source only If a database serves only as a source.

Whenever a transaction is committed. rebuild the SHAREPLEX_TRANS table to have an initrans value of 40. or even 512 KB if possible.  l If the production database has more than 1. and between an Oracle source and a non-Oracle target.5) Administrator Guide 58 . this can cause slow posting. Adjust the SharePlex transaction table based on user volume SharePlex updates the SHAREPLEX_TRANS table to maintain read consistency for the target database. its buffered data is flushed to disk.000 concurrent users. but the buffer is large. If most transactions are small. Replication between an Oracle source and Oracle targets For SharePlex to replicate all characters within the Oracle character sets that you are using. the following formula takes into account connections made by:  l The Read process  l The Post process  l Background Oracle processes  l User connections (peak number of source database sessions) + (peak number of target database sessions) + (background Oracle processes) + (value of SP_ORD_LDA_ARRAY_SIZE parameter +3) = setting for PROCESSES Adjust the log buffer size to improve posting The number of database writers has an impact on replication. You might need to adjust the initrans setting of this table to improve replication performance and reduce contention on that table:  l If the production database has between 500 and 1. Reducing the size of the buffer that is flushed to disk can speed the Post process. more normal-sized transaction is committed. one of the following must be true: SharePlex 8. the second COMMIT must wait while the entire buffer is flushed to disk.000 concurrent users.Database is a source and target If a database serves as both a source and a target. Control conversion of character sets This topic explains how SharePlex handles character set conversion between an Oracle source and target.6. Try decreasing the size of the log buffer to 1024 KB.6 (8. When a large transaction is committed while another. rebuild the SHAREPLEX_TRANS table to have an initrans of 30. especially when there are numerous concurrent transactions.

 l The character sets are identical on the source and target
 l The character set of the source database is a subset of the character set of the target database (all
characters contained on the source exist in the character set of the target)

The following character sets are tested and supported for SharePlex:
US7ASCII
UTF8
WE8ISO8859P1
AL16UTF16
AL32UTF8
KO16KSC5601
By default, SharePlex allows an Oracle target database to perform character conversion. Post notifies Oracle of
the character encoding of the source data and Oracle performs any required conversion.
Depending on the character sets involved, the Oracle conversion might lead to data loss. For example:
Example 1: The Japanese character for 'rice' in the JA16SJIS character set has no corresponding symbol in the
US7ASCII character set. If you attempt to replicate this symbol into a US7ASCII database, Oracle converts it to a
'?' character.
Example 2: According to Oracle, the WE8ISO8859P1 character set is a superset of the US7ASCII character set, so
it is logical to assume that any character in US7ASCII is posted unconverted into a WE8ISO8859P1 target
database. This is true for characters in the range 0x00 to 0x7F. However, Oracle strips off the top bit of
characters in the range 0x80 to 0xFF. This "conversion" may result in data loss while replicating to a character
set that is a superset of the source.
NOTE: Oracle does not convert characters if the character sets are identical. Thus, posting
WE8ISO8859P1 data to a database with a character set of WE8ISO8859P1 bypasses the Oracle
conversion process.

To apply data without conversion
Set the SP_OPO_NLS_CONVERSION parameter to 1 to apply the data without conversion. For more information,
see the SharePlex SharePlex Reference Guide.
NOTE: SharePlex will always convert NVARCHAR and NCLOB data if the NLS_NCHAR_CHARACTERSET of
the source database is not the same as that of the target database.

Replication between an Oracle source and non-Oracle
targets
When replicating to an Open Target target (non-Oracle target), SharePlex supports replication from any Oracle
Unicode character set and the US7ASCII character set. If the source data is Unicode or US7ASCII, no conversion
on the target is required. If the source data is any character set other than Oracle Unicode or US7ASCII, you can
use an Oracle client to perform the conversion.

To perform conversion with an Oracle client on Linux
 1. Install an Oracle Administrator client on the target system. The client must be the Administrator
installation type. The Instant Client and Runtime installation types are not supported.

SharePlex 8.6 (8.6.5) Administrator Guide 59

 2. Set ORACLE_HOME to the client installation. Set ORACLE_SID to an alias or a non-existing SID. SharePlex
does not use them and a database does not have to be running.
 3. Download the Oracle-based SharePlex installer, rather than the Open Target installer, to install
SharePlex on the target system. The Oracle-based installer includes functionality that directs Post to
use the conversion functions from the Oracle client library to convert the data before posting to the
target database.
 4. Follow the instructions for SharePlex for Oracle (not the ones for installing on Open Target).
 5. Make certain the SP_OPX_NLS_CONVERSION parameter is set to the default of 1.

To perform conversion with an Oracle client on Windows
 1. Install an Oracle Administrator client on the target system. The client must be the Administrator
installation type. The Instant Client and Runtime installation types are not supported.
 2. In the SharePlex Registry key \HKEY_LOCAL_
MACHINE\SOFTWARE\Wow6432Node\QuestSoftware\SharePlex\port_number, set ORACLE_HOME to the
Oracle client installation location, and set ORACLE_SID to an alias or a non-existing SID. No Oracle
database is required. SharePlex only needs to use the client libraries.
 3. SharePlex using the Windows installer.
 4. Make certain the SP_OPX_NLS_CONVERSION parameter is set to the default of 1.

To apply Unicode and US7ASCII data without conversion
If the source data is Unicode or US7ASCII, no conversion or Oracle client is needed. Set the SP_OPX_NLS_
CONVERSION parameter to 0 to disable conversion, and then restart Post if it is running.

Set up SharePlex to support Oracle data
This topic contains setup guidelines that apply to specific Oracle datatypes. These guidelines should be
addressed before you start replication for the first time.

LOBs, LONGs, VARRAYs, and XML
 l Tables that contain a LOB or LONG should have a primary key or unique key defined on them. If a table
does not have a key, SharePlex builds its own key from all of the columns except LONGs or LOBs. If a LOB
or LONG is the only difference between two rows that otherwise satisfy the Post WHERE clause, then
Post may update the wrong row.
 l Dedicate one or more named export queues to tables that contain LOBs. This automatically creates
separate Export processes and named post queues with their own Post processes. By separating the
processing of LOB datatypes from that of other data, you can improve the overall speed of replication.
See Configure named export queues.
 l To ensure that SharePlex has enough shared memory when replicating LOBs, increase the SP_QUE_
POST_SHMSIZE parameter to an initial setting of 60 MB. If SharePlex generates shared memory segment
errors such as "Error: sp_cop process sp_mport/sp_opst_mt killed due to SIGSEGV,"
increase the setting. NOTE: A larger shared memory segment can result in a large amount of swap
space being used on the system, so make sure enough disk space is available.

SharePlex 8.6 (8.6.5) Administrator Guide 60

Manage SharePlex LOB storage
The SharePlex Setup utility installs some tables into a tablespace of your choosing. All but the SHAREPLEX_
LOBMAP table use the default storage settings of the tablespace.
The SHAREPLEX_LOBMAP table contains entries for LOBs stored out-of-row. It is created with a 1 MB
INITIAL extent, 1 MB NEXT extent, and PCTINCREASE of 10. The MAXEXTENTS is 120, allowing the table to
grow to 120 MB.
The default storage usually is sufficient for SHAREPLEX_LOBMAP, permitting more than 4 million LOB entries. If
the Oracle tables to be replicated have numerous LOB columns that are inserted or updated frequently,
consider increasing the size the SharePlex tablespace accordingly. Take into account that this table shares the
tablespace with other SharePlex tables.
If the database uses the cost-based optimizer (CBO) and the tables that SharePlex processes include numerous
LOBs, incorporate the SHAREPLEX_LOBMAP table into the analysis schedule.
NOTE: A new installation of SharePlex does not change storage parameters from a previous installation.

Tune SharePlex based on Oracle data volume
For best performance when transaction volume is either very high or very low, certain parameter changes are
recommended before replication starts.
To determine the correct values, refer to the following table under the column that corresponds to the daily
archive log volume of your database.
NOTE: For environments generating between 5 GB and 15 GB of archive log volume daily, the default settings
for SharePlex parameters are sufficient, and no action is needed.
To change the parameters, use the set param command in sp_ctrl. Contact Dell Technical Support if you
need assistance. For more information about SharePlex parameters and commands, see the SharePlex
Reference Guide.

Recommended settings per archive volume

Parameter Less than Between 5GB Greater than Where to set the parameter
5GB/day and 15GB/day 15GB/day

SP_OCT_CHECKPOINT_ 500 Default 5000 source system
FREQ
SP_ORD_CDA_LIMIT 5 Default 20 source system
SP_ORD_DELAY_ 50 Default 500 source system
RECORDS
SP_ORD_LDA_ARRAY_ 5 Default 10 source system
SIZE
SP_ORD_RMSG_LIMIT 20 Default 2000 source system
SP_IMP_WCMT_ 100 Default 2500 target system
MSGCNT
SP_COP_IDLETIME 120 Default 600 source and target systems

SharePlex 8.6 (8.6.5) Administrator Guide 61

Set system process priority
If Oracle or other processes are assigned resource priority, SharePlex can be left with a default setting and
little resource allocation. Oracle increases its CPU utilization during peak processing. If SharePlex loses pace
with Oracle, you can try increasing its process priority.

To set process priority on Unix
Use the nice command. Consult with the System Administrator to select an appropriate value based on the
requirements of all software running on the system. A root user can modify the niceness value of any process.
The SharePlex Administrator user can adjust the niceness value of SharePlex.

To set process priority on Windows
 1. Run SpUtils.
 2. Select the TaskMgr tab.
 3. Right click the SharePlex instance that you want to prioritize.
 4. Select Set Priority, then select the desired priority level.

Enable Oracle direct path loads
By default SharePlex replicates changes made to tables through a SQL*Loader direct-path load
(DIRECT=TRUE keyword parameter). There can be only one load per table (PARALLEL=FALSE), although there
can be simultaneous loads on different tables. The database must be in archive mode, and table logging
must be enabled.
If you expect the direct-path load to be sustained for a long time on the source system, it might be more
efficient to load the data to the target database directly, instead of relying on replication. A large direct-path
load can cause Capture to lose pace with changes that enter the redo logs from user application activity.
After the load, you should disable check constraints. You can leave ON DELETE CASCADE constraints enabled.
The SP_OCT_REPLICATE_DLOAD parameter controls whether or not direct-path loads are replicated. To disable
replication of direct-path loads, change this parameter to 0. For more information, see the SharePlex
Reference Guide.

Use compression
You can enable compression to reduce the amount of data that SharePlex sends across the network. SharePlex
uses LZIP lossless compression. Enabling compression on the source SharePlex instance automatically enables
compression to all targets of the source SharePlex instance.
By default compression is disabled. You can enable compression by itself or in conjunction with encryption.

To enable compression
Set the SP_XPT_ENABLE_COMPRESSION parameter to 1.
sp_ctrl> set param SP_XPT_ENABLE_COMPRESSION 1
To activate the parameter after you set it, stop and start Export.

SharePlex 8.6 (8.6.5) Administrator Guide 62

Enable capture on Exadata machines
To capture data from an Exadata system, the SP_OCT_USE_OCI parameter must be set to 1. For more
information, see the parameter documentation in the SharePlex Reference Guide.
If you need to adjust capture performance after replication starts, see Tune Capture on Exadata.

Configure support of Data Pump exports
When replicating Oracle Data Pump export operations, set the SP_OCT_ALLOW_DP_DDL parameter to 1, and
then restart Capture.
This parameter can be enabled if SharePlex fails to replicate DDL operations that occur when running an Oracle
Data Pump export/import. Occasionally, SharePlex identifies DDL in a Data Pump load as recursive DDL that
should be ignored. This parameter directs SharePlex to capture that DDL.
A setting of 1 enables this parameter. After the load is finished, set this parameter back to 0 and then
restart Capture.

Set up TDE Support
SharePlex uses the TDE Master Encryption Key to decrypt TDE-protected data that must be replicated.
SharePlex uses the Oracle wallet password to access the TDE Master Encryption Key.
If the wallet opens successfully, Capture connects to the decryption module and processes the data. If the
wallet does not open, Capture remains in the initialization state until either the wallet is opened or the
process is stopped. The initialization state that is displayed in the show capture command is "Capture state:
Waiting for open wallet."
NOTE:  The SharePlex copy/append command does not support TDE. For full information on the Oracle features
that SharePlex supports, see the SharePlex Release Notes.

Required privilege to capture TDE-protected data
To decrypt TDE-protected data from the redo log, the SharePlex Administrator must open Oracle Wallet using
the wallet password. By default, only the Oracle Wallet owner-user has read and write permissions for this file.
You can either start as the owner of the wallet, or you can grant read permission to the file to the dba group,
because the SharePlex Administrator user is a member of that group.

Configure SharePlex to capture TDE-protected data
To configure SharePlex to support TDE-protected data, two setup tools must be run:

 l (If this was not done during installation) Run Oracle Setup. When prompted to enable TDE replication,
type "y" and then enter the fully qualified path to the TDE wallet file, including the wallet file name,
when prompted. See the SharePlex Reference Guide for more information about this utility.
 l Run the sp_wallet utility to provide the Oracle Wallet password to SharePlex. This utility can be run in
manual or auto-open mode.

SharePlex 8.6 (8.6.5) Administrator Guide 63

To run sp_wallet and manually supply the password
 1. On the source system, start SharePlex from the SharePlex product directory. You are prompted to
run sp_wallet.
*** To enable TDE replication, run sp_wallet and provide the wallet password ***

 2. Run sp_wallet.
./sp_wallet [-r port_number]
IMPORTANT! On Windows, if you installed SharePlex on any port other than the default of 2100,
use the -r option to specify the port number. For example, in the following command the port
number is 9400:
./sp_wallet -r 9400
wallet password: walletpw
Wallet loaded into SharePlex

To run sp_wallet in auto-open mode
If you are using an auto-open wallet, you can configure SharePlex to open the TDE wallet automatically. This
eliminates the need to run sp_wallet manually at SharePlex startup. The syntax is:
./sp_wallet --auto-open [-r port_number]
IMPORTANT! Using the auto-open wallet feature has additional security considerations. See the Oracle
documentation for more information. In addition, do not back up the SharePlex variable-data directory together
with the Oracle wallet and the Oracle data files.

To cancel auto-open mode
./sp_wallet --no-auto-open [-r port_number]

To change the TDE master encryption key
If you need to change the TDE Master Encryption Key while a SharePlex configuration is active, take the
following steps to ensure that SharePlex continues to replicate the TDE-protected data after the changes.

 1. Quiesce the source database.
 2. Make sure that Capture finishes processing the remaining data in the redo log.
 3. Shut down SharePlex.
 4. Change the TDE Master Encryption Key.
 5. Restart SharePlex.
 6. Run the sp_wallet utility to provide SharePlex with the new TDE Master Encryption Key.
./sp_wallet [-r port_number]

SharePlex 8.6 (8.6.5) Administrator Guide 64

6
Create configuration files

This chapter contains the information that you need to know in order to create a configuration file.
SharePlex takes direction from the configuration file to determine which tables to replicate and where to
send the replicated data. This file also provides any special processing instructions, such as column mapping
and data filtering.

Contents
Ensure compatible source-target mapping
How to create a configuration file
Database specifications in a configuration file
Target specifications in a configuration file
Routing specifications in a configuration file
Configuration examples by datasource and target
Use a script to build a configuration file
Replicate to, or from, a PDB
Use Wildcards to specify multiple objects
Define a unique key
Filter DML Operations
Map source and target columns
Build a configuration file using a script

Ensure compatible source-target mapping
The following guidelines help you ensure that the source and target objects that you want to map in a
replication configuration are compatible.

 l For most replication strategies, the name and/or owner of a source object can be different from that of
its target object. SharePlex replicates to the correct object because you specify it by owner and name
within the configuration file. For high-availability configurations, the owner and name of a source table
should be the same as the owner and name of the target table.
 l Corresponding source and target columns must contain compatible datatypes (same type, size,
precision).
 l Corresponding source and target rows must contain the same values unless transformation is being
used. See Transform data for more information. See Ensure compatible source-target mapping

SharePlex 8.6 (8.6.5) Administrator Guide 65

sp_ctrl> create config config_name SharePlex 8. If this is not the mapping you want. In sp_ctrl. the target. See Create configuration files for more information about column mapping. To create a configuration file  1. unless you use vertically partitioned replication to replicate a subset of the source columns that matches. see Build a configuration file using a script. Run sp_ctrl from the bin sub-directory of the SharePlex product directory.6. To avoid Oracle errors if the extra (non-mapped) columns are NOT NULL.5) Administrator Guide 66 . issue the create config command. For more information.  l The names of the target columns must be identical to the names of the source columns. you create a configuration file. you can automate the creation of a configuration file. See Create configuration files for more information. define default values for those columns.  l See the SharePlex Reference Guide for more information about the activate config command. SharePlex will ignore the extra columns in the target table. but strategies such as active-active replication require configuration files on more than one system.  l A target table can have more columns than the source table. Create the configuration file on the system from which data is to be replicated. See Configure vertically partitioned replication. This is an ASCII text file in which you specify:  l The data that you want SharePlex to replicate. When your configuration file is completed and the SharePlex environment is set up to support your replication objectives. map the second column to the second column. Create a configuration file You can create a configuration file by hand or.  l A target table cannot have fewer columns than the number of columns in the source table. you activate the configuration with the activate config command to begin replication. Only a SharePlex Administrator or operator has the authority to create a configuration file.  2. SharePlex maps a one-to-one relationship in the order that the columns are defined in each table (for example. How to create a configuration file To configure SharePlex to replicate data. unless you use column mapping in the configuration file.6 (8. If the source and target column names are not identical. or has fewer columns than. you must use column mapping. including any filtering or partitioning of rows or columns  l The target name and type  l The system (and database if applicable) to which the data must be delivered. and so forth). If the source and related target column names are identical. if your data structure supports it. typically the source system. map the first column in the source to the first column in the target. Additional information:  l See Activate replication in an Oracle production environment for more information about the timing and process for activating a configuration file.

SID specification component must always be the first non- commented line of a configuration file.object1 target_owner.  l The database specification. Precede each comment line with a pound (#) sign. Comments may be entered anywhere in the configuration file. This Datasource:o. Datasource Syntax that specifies the source database.6. See Set a default editor for sp_ctrl. See Additional configuration options for additional configuration options. SharePlex places configurations in this directory by default when you create them through the sp_ctrl interface with the create config command. information about the contents to viewers. The owner can be a schema or a SharePlex 8.SID     #source specification target specification routing map source_owner.object3 target_owner. If you create the configuration directly through a text editor. make certain to save it to the config sub-directory. This command opens a file in the default text editor that is set for the operating system.5) Administrator Guide 67 . Configuration files outside this directory cannot be activated. but are not used by SharePlex. Source The fully qualified name of a supported Oracle src_owner.object. Structure of a configuration file A basic configuration file looks like the following: # comment: basic SharePlex configuration file Datasource:o. or a src_owner.6 (8. IMPORTANT! All configurations must reside in the config sub-directory of the SharePlex variable-data directory.table specification source object. The word "Datasource" is not case-sensitive.object1 routing_map source_owner. NOTE: You can change the default editor that sp_ctrl uses. It has the following syntax elements. in the form of owner.  3. Component Description Syntax examples # Comments Lines that describe the file or provide other # This is a comment.object2 target_owner.object2 routing_map source_owner. all on the same line with no spaces:  l The keyword Datasource followed by a colon (:). See Database specifications in a configuration file.object3 routing_map The basic components of a configuration file are as follows. Complete the configuration file as shown in Structure of a configuration file.sequence wildcard substitution that specifies multiple source objects.

See Use Wildcards to specify multiple objects for more information about using wildcards. see Routing specifications in a configuration file. See Database specifications in a Compound routing map: configuration file.table  l A JMS queue or topic. !cdc:tgt_owner.SID followed by the database specification.table] wildcard substitution for multiple tables.PDBalias with the target specification. Kafka. host@o.  l You can replicate between objects in the same database or different databases on the same system.6. Routing map One or more routes that send the data to the host@o.sequence  l A table in a relational database. host  l (Database targets only) The @ symbol host@c. !jms[:tgt_owner.5) Administrator Guide 68 . or a !file[:tgt_owner...  l A change-history table that maintains a record of all changes made to a source table (also known as change data capture) See Target specifications in a configuration file. Target specification The target to which the replicated data is tgt_owner. A route consists of the following: host@o.SID system that contains the target object specified host@o.6 (8.SID+host@r.tns_alias  l The name of the machine that contains host@r.  l A Kafka topic.database_name the target to which data is replicated. depending on how the database stores objects logically.table applied. Targets supported by SharePlex are: tgt_owner.] NOTES:  l The database specification is absent if the target is JMS.  l For additional information.  l There can be no spaces between any characters in the routing map.table]  l An Oracle sequence (or wildcard specification). or a file. !kafka[:tgt_owner.Component Description Syntax examples database.database[.table]  l A file that contains XML or SQL records. SharePlex 8.

Additional configuration options The following are additional configuration options that can be added to the configuration file: See Filter DML Operations to prevent INSERTs. use one of the following.6 (8.rac1. SharePlex 8.  l The tns_alias of a pluggable database (PDB) in an Oracle container database (CDB).mydb. and filter data to meet specific requirements. as in o. see Configure SharePlex in a Cluster in the SharePlex Installation Guide. parallelize.pdb1. See Map source and target columns See Define a unique key See Configure partitioned replication to divide. which is mapped locally on each node to the Oracle SID of the local Oracle instance.ora12. IMPORTANT! Use the actual name. If the name is case-sensitive. For more information about creating this alias. Database specifications in a configuration file A database specification is required in the following components of the configuration file:  l the datasource (source data) specification  l routing map (target data) specification Database Database type* Database Identifiers Oracle source or target o. SharePlex connects to an Oracle RAC instance through this tns_alias. Depending on the Oracle database configuration. UPDATEs. not the ODBC datasource name (DNS). as in r. or DELETEs from being replicated. as in o. specify it that way. as in o.6. This is the string that SharePlex will use to connect to the database.  l The Oracle SID of a regular (non-CDB) Oracle database.5) Administrator Guide 69 . Open Target target r. See Configure replication to Open Target targets for more information about configuring SharePlex to replicate to a specific Open Target target.  l The global tns_alias of an Oracle RAC cluster. See Configure named queues to divide and parallelize data for increased control and throughput. Use to specify the name of an Open Target (non- Oracle) target database.

File !file[:tgt_owner. See Configure Replication to a Kafka target. See Configure Replication to a SQL or XML file target. as in o. Change history table !cdc:tgt_owner. The topic name can be defined by using the target command. The file name is applied internally by SharePlex. Optionally. Kafka !kafka[:tgt_owner.6. Database sequence tgt_owner.table] The !Kafka designator directs Post to write change operations to a Kafka topic in XML format. The queue or topic name can be defined by using the target command. rather than overlay SharePlex 8.5) Administrator Guide 70 . JMS !jms[:tgt_owner.ORA12CH.6 (8.table The !cdc designator directs Post to insert every data change to the table as a new row. * NOTE: The dot is required. see Configure replication to maintain a change history target. you can specify the fully qualified name of a target table if the data will be consumed by a process that ultimately applies it to a database table. or global RAC tns_alias of an Oracle change history database. you can specify the fully qualified name of a target table if the data will be consumed by a process that ultimately applies it to a database table.table The fully qualified name of a database table. In this configuration. Optionally.table] The !file designator directs Post to write change operations to a file in SQL or SML format. Target Target Specification Description Database table tgt_owner.sequence The fully qualified name of an Oracle sequence. you can specify the fully qualified name of a target table if the data will be consumed by a process that ultimately applies it to a database table. Target specifications in a configuration file The following table shows how to specify a target table or non-table target in a configuration file. For more information. Database Database type* Database Identifiers Oracle change-history c. Optionally.table] The !jms designator directs Post to write change operations to a JMS queue or topic in XML format. SharePlex applies all source transactions as INSERTs to the target tables. Use in a routing map to specify the Oracle SID. tns_ target alias. See Configure Replication to a JMS target. to maintain a history of every operation performed.

 l If any target has a different qualified name from the other targets of the same source object. Datasource:o. Only one target specification can be used in a compound routing map.table tgt_owner. Kafka. See Configure replication to maintain a change history target. Routing specifications in a configuration file The following instructions show you how to build a routing map. if used (see Define a unique key and Map source and target columns).table tgt_owner. Target Target Specification Description the old data with new data.table2 host2[@database_specification] src_owner. A routing map sends replicated data to the correct target on the correct target system. rather than type a separate configuration entry for each route. or all a file (but no combination of these). It enables you to specify the source and target objects once for all routes. or file target specification.] SharePlex 8. NOTES:  l Certain routing limitations apply when using vertically partitioned replication.table host1[@database_specification]+host2[@database_specification][. you must use a simple routing map for that target.SID     src_owner.table3 host3[@database_specification] Replicate to multiple targets A compound routing map sends replicated data from one source object to multiple target objects. including any table specifications in a JMS.  l All having identical column or key mappings.  l All with the same fully qualified name.. Replicate to one target A simple routing map sends replicated data from one source object to one target object.table tgt_owner. Specify the fully qualified name of the change history table.6.6 (8. See Configure vertically partitioned replication. Datasource:o.SID     src_owner.5) Administrator Guide 71 . so all of the target objects must be identical as follows:  l All one type: All the same database object type or all a JMS queue or all a JMS topic or all a Kafka topic..

you can change the number of allowed queues by setting the SP_QUE_MAX_QUEUES parameter.table host*host[@database1_specification] Configuration with replication to objects in a different database on the same system Datasource:o.5) Administrator Guide 72 . When SharePlex replicates between objects on the same system. you will have both a capture queue and a post queue. SharePlex supports replication to a maximum of 19 direct target systems.  l By default.table tgt_owner. See Configure named export queues. To replicate to more than 19 targets. If a system serves as both a source and target. SharePlex 8. If system memory permits. You can replicate between objects that have the same name. See Configure replication to share or distribute data). That allows you to create up to 23 named queues of either type (or a mix of both). You can force SharePlex to create Import and Export processes by using the following routing map.6 (8. so long as their owners are different.  l Each instance of sp_cop on a system permits a maximum of 1024 different routes. There will always be one capture queue on a source system and one post queue on a target.Replicate between objects on the same system You can replicate between objects that are in the same database or in different databases on the same system. This limitation includes each route that uses a different named post queue (see Configure named post queues. Configuration with replication to objects in the same database Datasource:o.table tgt_owner. you can have as many as 24 named export queues on a source system and 24 named post queues on a target system. See the SharePlex Reference Guide for more information about this parameter. use named export queues. If you do not need the Import or Export processes. each sp_cop instance allows a total of 25 queues on a system. With each additional queue that you add. consider using one or more intermediary systems to divide the routes among multiple sp_cop instances.6. Configuration examples by datasource and target These are examples of basic configuration files according to each possible datasource type and target type.) If your replication strategy requires more than 1024 routes.     database1 src_owner.table host*host[@database2_specification] Routing Limitations  l By default.     database1 src_owner. it does not create Import and Export processes. Therefore. That is the maximum number of processes that can read the export queue. omit the host* portion of the routing map. you can replicate to 19 additional targets.

Replicate from a regular Oracle instance to a regular Oracle instance Datasource:o.Shareplex.EMP "Scott2".table host@r.com.oraA SCOTT. Replicate from a regular Oracle instance to a file in XML or SQL format Datasource:o.SID     src_owner.EMP from Oracle instance oraA to target table Scott2.SID     src_owner.table tgt_owner.EMP from Oracle instance oraA to target table SCOTT.SID     src_owner.RD. Questions or support requests for these features should be emailed to DSG.EMP !file sysprod SharePlex 8. Datasource:o.6.table tgt_owner.table host@o.EMP2 sysprod@o. For more information about the SharePlex beta program.mydb NOTE: The support of Open Target databases is currently in beta testing. see the SharePlex Release Notes.Beta@software. Datasource:o. with the exception of the ones listed in the SharePlex Release Notes.6 (8.5) Administrator Guide 73 . The target table is case-sensitive.EMP SCOTT.oraB Replicate from a regular Oracle instance to an Open Target database Datasource:o.oraA SCOTT.table !file host Example The following example replicates table SCOTT.SID Example The following example replicates table SCOTT.Emp2 in Open Target database mydb on target system sys2.EMP2 in Oracle instance oraB on target system sysprod.oraA SCOTT.EMP from Oracle instance oraA to a file on target system sysprod.database_name Example The following example replicates table SCOTT. Datasource:o.dell."Emp2" sys2@r.

table !kafka host Example The following example replicates table SCOTT.EMP from Oracle instance oraA to a Kafka topic on target system sysprod.aliasB SharePlex 8.table tgt_owner.table !jms host Example The following example replicates table SCOTT.aliasA SSCOTT. Datasource:o.EMP in an Oracle PDB that uses the tns_alias of aliasB on target system sysprod.PDBalias Example This example replicates table SCOTT.EMP sysprod@o.6 (8. Datasource:o. Datasource:o.6.SID     src_owner.EMP !jms sysprod Replicate from a regular Oracle instance to a Kafka topic Datasource:o.SID     src_owner.Replicate from a regular Oracle instance to a JMS queue or topic Datasource:o.EMP SCOTT.EMP from Oracle instance oraA to a JMS queue on target system sysprod.EMP from an Oracle PDB that uses the tns_alias of aliasA to target table SCOTT.EMP !kafka sysprod Replicate from and to an Oracle pluggable database (PDB) in a container database (CDB)* Datasource:o.5) Administrator Guide 74 .PDBalias     src_owner.oraA SCOTT.oraA SCOTT.table host@o.

SID Example The following example replicates table SCOTT.6.5) Administrator Guide 75 . Capture from a PDB SharePlex can replicate data from one PDB to:  l another PDB in the same CDB  l a PDB in a different CDB SharePlex 8. Replicate to maintain a change history target Datasource:o. or from.SID     src_owner. This support is available on Unix and Linux platforms only. Option Description To get more information config.* You can also replicate data from an Oracle PDB to any other supported target.oraB See Configure replication to maintain a change history target for more information.table host@c.table !cdc:tgt_owner. Use a script to build a configuration file SharePlex provides the following scripts that can be used to automate the building of your configuration file if the source and target object names are identical. See Replicate to.EMP !cdc:SCOTT.EMP from Oracle instance oraA to change-history target table SCOTT. a PDB for more information. configuration file using a script build_ Builds a configuration file that includes all tables in a schema. or from.sql target object names must be identical. These scripts support Oracle Database source and targets only.EMP2 in Oracle instance oraB on target system sysprod.6 (8. Source and See Build a config.EMP2 sysprod@c. Source and target object names must be identical.sql Builds a configuration file that includes all tables and sequences that are See Build a in the database. Datasource:o. a PDB SharePlex supports replication to and from a Pluggable Database (PDB) in an Oracle multitenant container database (CDB). configuration file using a script Replicate to.oraA SCOTT.

you can replicate to any number of target PDBs in the same CDB or a different CDB.sal2 sys02@o. In one configuration file.pdb1 hr.pdb2 Examples Example 1: This example shows two configuration files.pdb1  l You can replicate from as many pluggable databases (PDBs) in the same CDB as desired: Create a separate configuration file for each PDB. both targets being on different systems.pdb2 hr. all configurations can be active at the same time.sal hr2. such as purge config or abort config.  l a regular (non-PDB) target To capture from a PDB  l In the configuration file. both replicating data to pdb3.pdb3   Example 2: This example shows one configuration file replicating from pdb1 to pdb2 and pdb3. for one configuration without affecting the other configurations. To replicate to a PDB Specify the tns_alias of the target PDB in the routing map. specify the tns_alias of a PDB as the datasource. one replicating from pdb1 and the other replicating from pdb2.cust2 sys02@o. Because each PDB is a different datasource. This allows you to issue SharePlex commands that affect configurations.pdb3 Datasource: o. if the tns_alias is pdb1.pdb3 SharePlex 8.6. the datasource specification is: Datasource: o.cust sales2.  l If replicating from more than one PDB on a system.emp hr2.pdb2 sales. For example.pdb1 hr.sal hr3.emp2 sys02@o.5) Administrator Guide 76 . Datasource: o.sal3 sys03@o. See Configure named export queues. as shown in the following example where pdb2 is the target: sys02@o. Datasource: o. use named export queues to separate the data streams from each one.6 (8. Replicate to a PDB SharePlex can replicate data from a regular source database to a PDB in a target Oracle CDB.

Supported wildcard syntax SharePlex supports the following SQL wildcards SharePlex 8. It is enabled by default with a value of 1. SharePlex automatically replicates DML changes made to any supported object that exists at the time of configuration activation. The following parameters control the replication of objects created after activation:  l SP_OCT_AUTOADD_ENABLE: Controls automatic replication of tables and indexes created after activation. Set it to 1 to include new sequences.  l Wildcards are not allowed anywhere in a configuration entry that includes the following:  o Vertically partitioned replication (see Configure vertically partitioned replication)  o Horizontally partitioned replication (see Configure horizontally partitioned replication)  o Key definition (see Define a unique key)  o Column mapping (see Map source and target columns) The tables that use these features must be specified in the configuration file separately. Set it to 0 to disable replication of newly created tables and indexes. You can disable the automatic replication of DML changes made to sequences that satisfy a wildcard by setting the SP_OCT_REPLICATE_SEQUENCES parameter to 0.Use Wildcards to specify multiple objects You can use the percent (%) and underscore (_) wildcard symbols to specify multiple objects of a schema in one entry of the configuration file. The default is 0 (not active). How to control wildcard support By default. although the objects themselves do not have to exist at that time.5) Administrator Guide 77 . Set it to 1 to include new materialized views.6 (8.  l SP_OCT_AUTOADD_MV: Controls automatic replication of materialized views created after activation. The default is 0 (not active). except those that you explicitly exclude.  l SP_OCT_AUTOADD_SEQ: Controls automatic replication of sequences created after activation.6. SharePlex replicates any objects that satisfy the wildcard. so long as the correct parameters are set to replicate the DDL and DML when they are created. Requirements and limitations of wildcard support  l The schemas that contain wildcarded object names must exist on the source and target before the configuration file is activated. By default. if its name satisfies a wildcard. if their names satisfy a wildcard. IMPORTANT! See Control DDL replication for more information about setting these parameters. You can add sequences and materialized views to that support. SharePlex also replicates the DDL and DML for tables and indexes that are created after the configuration is activated. You can exclude objects from a wildcard specification by using the NOT option in the wildcard specification.

NOTE: Leave a space between expand and the start of the source object specification. SharePlex assumes that they are part of the owner (schema) name. If wildcards are used in the owner name. The name of the objects on the source must be the same as the name of the objects on the target.  l list is a comma-separated list of tables in the same schema.  l wildcard_name is the wildcarded name of the source objects.  l For table names that contain a percent sign or an underscore character (for example emp_salary). but the objects may belong to different owners (or reside in different schemas).wildcard_name [not (list)] tgt_owner. Owner names cannot be wildcarded. either wildcarded or explicit. Example: not (spo%.6 (8. (See the Validate a wildcard specification.  l The not keyword and parentheses are required elements. not a wildcard. NOTE: This not keyword does not have the same meaning as the SQL wildcard NOT operator. src_owner. Without this required keyword. product). SharePlex recognizes the backslash (\) as an escape character to denote the character as a literal.  l Percent (%) wildcard to specify a string. Configuration with wildcarded object names Datasource:o. and no wildcard expansion is performed.SID     expand src_owner.wildcard_name  l src_owner is the owner of the source objects. When SharePlex detects the expand keyword.5) Administrator Guide 78 . not (list) An exclusion list that defines objects to omit from the wildcard expansion.6. gen%.wildcard_name routing_map Description of syntax elements Component Description expand Indicates that the specification contains wildcard characters that must be expanded. it queries Oracle for all objects that match the criteria in the wildcard specification. SharePlex 8. Use this option to exclude objects that you do not want to be replicated.)  l Underscore (_) wildcard to specify a single-character. the wildcard characters are assumed to be part of an explicit object name. Specify wildcarded names in the configuration file Use this template for help when specifying a wildcarded name in the configuration file.

wildcard_name  l tgt_owner is the owner of the target objects. issue the verify config command in sp_ctrl before you activate the configuration. Component Description Leave a space before and after the not keyword.oraB cust. a not clause is not needed. See the Examples. For more information about this command. Partially expanded target wildcarded names are not supported. A space is allowed after each comma in the list.6 (8.% hostB@o.tab%. that entry overrides the processing or routing specified in the wildcarded entry. see the SharePlex Reference Guide.photo hostB:lobQ@o.oraB The following are additional examples of valid wildcard specifications SharePlex 8.5) Administrator Guide 79 .photo cust. as well as any problems that occurred. Validate a wildcard specification To confirm that a wildcard specification will produce the specific list of tables that you want to replicate.%. In this case. see Configure named post queues. so that it actually activates all tables where the table name is like 'PROD%' but not like '%TEMP%'. Datasource:o.6.sidA cust. The target specification must be in the form of owner. routing_map Any valid routing map.sidB Example 2: The following example shows how you can specify special handling for one of the tables in a wildcarded specification. All tables that match this description are replicated to tables of the same names on the target in the hal schema.% sysa@o. where the table name is like prod% except if the table name is like %temp%. This command produces a list of the objects that SharePlex will capture and replicate. NOTE: If an object that satisfies a wildcard is listed elsewhere in the configuration file.  l wildcard_name is the wildcarded name of the target objects.prod% not (%temp%) hal. in this case the photo table. tgt_owner. All tables but photo are routed through the default post queue. For more information. The separate entry for the photo table overrides the wildcarded entry and processes the photo table through a named post queue.% cust. Note that SharePlex automatically upshifts the names.sidA expand scott. See Routing specifications in a configuration file . Datasource:o. Examples Examples of valid wildcard specifications Example 1: The following wildcard specification directs SharePlex to activate all tables owned by scott. such as owner.

the key definition overrides the defined key. When using the exclude column notation in vertical partitioning. prodct) scott. located in the variable-data directory.  l When a key definition is specified for a table that has a PRIMARY or UNIQUE key.5) Administrator Guide 80 . gen%.sidB Define a unique key If a table was not created with a primary or unique key. see Configure partitioned replication.sidB Datasource:o.prod% not (%temp%) hal. SharePlex must query the database for their values.  l Create an index on the target table and add the index to the SharePlex hints file.  l They must be part of the column partition if the table is configured for vertically partitioned replication. NOTES:  l Without a primary or unique key.% not (spo%.% sysa@o. Datasource:o.%t__t% fred.%test% scott. Otherwise.sidA expand scott.% sysa@o.%test% scott.%test% scott. Otherwise.% sysa@o.  l Include the columns in a supplemental log group.6 (8.sidB Datasource:o. Datasource:o. which is not permitted. This can be useful if you do not want any of the existing keys to be used by SharePlex. SharePlex uses the specified columns as a unique key in its WHERE clause to locate target rows for posting. the excluded columns cannot be used in the key definition. SharePlex uses all of the columns of a table (or all of the columns in a column partition) as a key.sidA expand scott.sidA expand scott. which slows replication performance. which is not permitted. For more information about partitioned replication.sidA expand scott. you can specify columns to use as a key when you specify the object in the configuration file.% sysa@o.sidB The following example contains a partially wildcarded target object name.  l They must be able to uniquely identify a row.%obj% sysa@o.sidB Examples of invalid wildcard specifications The following example contains a wildcarded schema.sidA expand rob%.% sysa@o.Datasource:o. SharePlex 8. replication could return out-of-sync errors or post to incorrect target rows. The columns that you specify as a key must meet the following criteria:  l They cannot be LONG or LOB columns.sidA expand scott.sidB Datasource:o.6. which directs the Post process to use the index.

src_owner.ID) scott. such as a column list or key definition. must follow the DML filter specification. Leave a space between the table specification and the filter specification.) tgt_owner. Datasource:o.tab !key(name. Separate column names with commas. .]) Where DML_type is one of the following: DML_type input Operation type i INSERT d DELETE u UPDATE Examples Example 1 The following example filters DELETE operations from being replicated to the target table.table !key (column_list) where:  l !key is a required keyword. !dml(DML_type[... See the Restrictions.DML_type][. Any additional syntax for other features.SID Example Datasource:o.6 (8. DML filtering is compatible with most other SharePlex configuration syntax.  l column_list is a list of columns to include in the key.tab2 sysB@oraB Filter DML Operations You can configure SharePlex to filter any type of DML operation so that the operation is not replicated to the target table. type a space after the source object and use the following syntax. SharePlex 8. A space after the comma is optional..Syntax for key definition To create a key definition.table !key (col_name.. You can specify multiple operation types to filter.ora1 scott.SID     src_owner.6. Configure a DML filter To configure a DML filter.5) Administrator Guide 81 . col2_name..table host@o. including the parentheses. add the following syntax to the source table specification.

the entry is considered to be a column partition for vertically partitioned replication.proddb Filter out >>>>> DELETES Unique Key : (EMPLOYEE_ID) Restrictions  l The copy and compare commands do not support tables that include DML filtering in their specifications.  l You can use horizontally partitioned replication and column mapping for the same source table.scott.emp prodsys@o. Guidelines for using column mapping  l To use column mapping. This example also shows how a DML filter is compatible with a column mapping specification. SharePlex 8.i) (ID. This command can be used for an active or inactive configuration file.stock (SKU.5) Administrator Guide 82 . you can specify an explicit column mapping in the configuration file. but you cannot combine column mapping with vertically partitioned replication.sysdb View current DML filters Use the verify config command to view the DML that is being filtered for each table in the configuration file. Map source and target columns When source and target column names are different.6 (8. scott. or if you are combining full-table replication with horizontally partitioned replication (see Configure horizontally partitioned replication). location) prodsys@o. the DML filter specification must be identical for all of them. and data changes for non-listed columns are not replicated. but there must at least be a target column for every source column.sysdb Example 2 The following example filters DELETEs and INSERTs so that only UPDATEs are replicated to the target table. you must map every column in a source table to a column in the target table. store) scott.  l ALTER TABLE to add a column to a table that is configured with column mapping is not supported.stock !dml(d."EMP" prodsys@o. Multiple specifications of the same source table occur if you are routing to multiple targets without using a compound routing map (see Routing specifications in a configuration file). to ensure that Post applies row data to the correct target columns. even if only some source and target names are different. name. sp_ctrl> verify config myconfig 7: "SCOTT".6. When some columns are mapped but not others.  l If there are multiple specifications of a source table in the configuration file.  l A target table can have more columns than the source table.emp !dml(d) scott."EMP" "SCOTT". product.

.supplier.Configure column mapping The following syntax creates a column map. routing_map The routing map..sql: configure all tables and optionally all sequences in the database. Follow these rules to specify a column list:  l A column list must be enclosed within parentheses. (tgt_col. For more information about the configuration file.depth) sysB@o.table and tgt_ The specifications for the source and target tables.length..) routing_map Configuration component Description src_owner.sql: configure multiple or all tables in a schema SharePlex 8.prod (ID..tgt_col.width) mfg. so that SharePlex builds the correct map in the object cache...) A list of the target columns.name.  l The syntax rules for the source list also apply to the target list.product. respectively.  l config.length.  l The maximum length of a column list is 174820 bytes (the maximum line length allowed in a configuration file).tgt_col.  l build_config. For example.) tgt_owner.src_col.. Datasource:o.. This is required regardless of the actual order of the target columns in the table. a change to the second column in the source list is replicated to the second column in the target list.SID     src_owner.src_col.) A list of the source columns..oraA sales.oraB Build a configuration file using a script SharePlex provides the following scripts to automate the building of a configuration file. such as sysb@oraB. Configuration example Datasourceo.  l Separate each column name with a comma.5) Administrator Guide 83 ..prod (UPC.  l List the target columns in the same logical order as their corresponding source columns.vendor..table (src_col. such as sysb@oraB+sysc@oraC.6. see Create configuration files.table (src_col.table (tgt_col.6 (8. You can use a simple routing map. A space after the comma is optional. owner. or a compound routing map..

for example SystemB.  l The script does not support partitioned replication. These schemas cannot be replicated since they are system and/or instance-specific.6 (8. not the original one. then use the edit config command to add entries for tables that use partitioned replication.6. keyword. Conditions for using config. for example oraB. Change directories to the config sub-directory of the SharePlex variable-data directory. sequences Shareplex The name of the SharePlex user in the source database. in all of the schemas of a database. This entry prevents the SharePlex SharePlex 8.sql  1.Supported databases Oracle Use config. To run config.  3. Do not include database the o.  l The script does not configure objects in the SYS. You can use the copy config command to copy the configuration file that the script builds. Run config.sql using the full path from the util sub-directory of the SharePlex product directory.sql script enables you to build a configuration that lists all of the tables.sql  l Source and target table names must be the same. Log onto SQL*Plus as SYSTEM. The ORACLE_SID is case-sensitive. The ORACLE_SID is case-sensitive.sql script puts configurations in the current working directory.sql The config. This script saves time when establishing a high-availability replication strategy or other scenario where you want the entire database to be replicated to an identical secondary database. @ /proddir/util/config.5) Administrator Guide 84 . for example oraA. machine Source The ORACLE_SID of the source (primary) Oracle instance. Activate the new configuration file. SID Replicate Enter y to replicate sequences or n not to replicate sequences. The config. Do not include the database o. cd /vardir/config  2. and SharePlex configurations must reside in the config sub-directory. SYSTEM. and SharePlex schemas.sql Refer to the following table when following the prompts. keyword. Prompt What to enter Target The name of the target machine. and optionally all of the sequences.  l You can use the edit config command to make any other changes as needed after the configuration is built. SID Target The ORACLE_SID of the target (destination) Oracle instance.

6. then use the text editor to enclose case-sensitive table and owner names within double-quote marks. The script does not add the quote marks required by Oracle to enforce case-sensitivity. which would cause replication problems. SYSTEM. it was created in the wrong directory. it overwrites the first file. Activate the new configuration. If you run the script again to create another configuration file. issue the list config command. rename it before you create the second one.“emp”.  l You can use the edit config command to make any other changes as needed after the configuration is built. Conditions for using build_config. sp_ctrl> list config Use build_config.5) Administrator Guide 85 . It is an interactive script that prompts for each component of the configuration step by step. If a valid name is not username provided. These schemas cannot be replicated since they are system and/or instance-specific. open the configuration file with the edit config command in sp_ctrl.sql for different schemas. and SharePlex schemas. not the original. To preserve the original file.sql script enables you to build a configuration that contains multiple (or all) tables in a schema. Next steps:  l If any tables or owners are case-sensitive. Make certain to eliminate all but one Datasource:o. NOTE: The name assigned by SharePlex to the configuration is config. Before you activate the configuration that the script builds.  l The script does not configure objects in the SYS. which is the first non-commented line of the file.  l The script does not support partitioned replication. Prompt What to enter oracle schema from being replicated.  l You can run build_config.sql The build_config. You can use the copy config command to copy the configuration that the script builds. Do not move the file out of the config sub-directory. Find the file and move it to the config sub-directory of the variable-data directory. or you can select all of the tables in the schema.SID line. then use the edit config command to add entries for the tables that use partitioned replication. sp_ctrl> edit config filename  l To ensure that the configuration is in the correct location.sql  l Source and target table names must be the same.file. then combine those configurations into one configuration by using a text editor. you can use a wildcard to select certain tables at once. you can use the edit config command in sp_ctrl to add entries for sequences.6 (8. SharePlex 8.  l The script does not support sequences. the script fails. for example “scott”. Instead of entering the information for each object and the routing individually. If the name of the configuration is not shown.

The ORACLE_SID is case-sensitive. Name of the output A name for the configuration. The build_ config.6. for example SystemB. The script does not add the quote marks required by Oracle to enforce case-sensitivity. for example oraB. it was created in the wrong directory. Prompt What to enter Target machine The name of the target machine.sql  1. Find the file and move it to the config sub-directory of the variable-data directory. database tables Table name to Do one of the following: include (blank for all)  l Press Enter to accept the default. issue the list config command. sp_ctrl> list config SharePlex 8.“emp”. open the configuration with the edit config command in sp_ ctrl.5) Administrator Guide 86 . The script gives the file a . Source database SID The ORACLE_SID of the source (primary) Oracle instance. Log onto SQL*Plus as SYSTEM. Next steps:  l If any tables or owners are case-sensitive.sql script puts configurations in the current working directory.lst. for example “scott”. keyword. Change directories to the config sub-directory of the SharePlex variable-data directory. keyword. for example %e_salary%.lst suffix. then use the text editor to enclose case-sensitive table and owner names within double-quote marks.  l Enter a wildcard (%) character and a string to select certain tables. cd /vardir/config  2.6 (8. sp_ctrl> edit config filename  l To ensure that the configuration is in the correct location. Target database SID The ORACLE_SID of the target (destination) Oracle instance.sql using the full path from the util sub-directory of the SharePlex product directory. If the name of the configuration is not shown. Owner of the source The owner of the source tables. which selects all tables that belong to the source owner. Do not include the o. database tables Owner of the target The owner of the target tables. The ORACLE_SID is case-sensitive. Run build_config. Do not include the o.To run build_config.  l Enter an individual table name.  3. for example oraA. and SharePlex configurations must reside in the config sub-directory. for example Scott_ file to create config.sql Refer to the following table when following the prompts. @ /proddir/util/build_config.

dell.Beta@software. NOTE: The support of Open Target databases is currently in beta testing. Contents Configure replication to a Microsoft SQL Server target Configure replication to an EDB™ Postgres Advanced Server® target Configure replication to an SAP ASE target Configure replication to a HANA target Configure replication to a Teradata target Configure replication to other Open Target databases Configure Replication to a JMS target Configure Replication to a Kafka target Configure Replication to a SQL or XML file target SharePlex 8.6 (8. 7 Configure replication to Open Target targets This chapter contains instructions for configuring SharePlex to replicate data from Oracle Database to Open Target (non-Oracle) targets.Shareplex. Questions or support requests for these features should be emailed to DSG. with the exception of the ones listed in the SharePlex Release Notes.com. see the SharePlex Release Notes. This chapter guides you through the Post configuration process for each supported target.RD. Post must be configured to process data to the intended target in the correct manner and format.6.5) Administrator Guide 87 . For more information about the SharePlex beta program.

6. When both supplemental logging and this parameter are set. set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. 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. enable PK/UK supplemental logging in the Oracle source database. 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. create a SharePlex configuration file that specifies capture and routing information. These instructions guide you through the configuration processes that are required to support this target. use the following syntax in the configuration file: Datasource:o. To configure replication to an Open Target target. 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. see the SharePlex Release Notes. Set SP_OCT_USE_SUPP_KEYS parameter To replicate to an Open Target database target.table host@r. NOTE: For the datatypes and operations that are supported when using SharePlex to replicate to a SQL Server target.database_name where: SharePlex 8.Configure replication to a Microsoft SQL Server target Overview SharePlex can post replicated Oracle data to a Microsoft SQL Server target database through an Open Database Connectivity (ODBC) interface. SharePlex must have the Oracle key information to build an appropriate key on the target. However. Enable supplemental logging To replicate to an Open Target target.table tgt_owner. Configure replication On the source. Configure SharePlex on the source Configure SharePlex and the database on the source system as follows. depending on your replication strategy.5) Administrator Guide 88 . The components that are required in a configuration file vary.SID     src_owner.6 (8.

( For earlier versions of SQL Server. not the Microsoft SQL Server Native Client.6.ora112 HR.  4.  l database_name is the name of the target database.  1.mydb Configure SharePlex on the target Configure the target database and SharePlex as follows.Emp in database mydb on target system sysprod. identifies the target as non-Oracle."MyTable".)  3.5) Administrator Guide 89 . run the mssql_setup utility.table is the owner and name of the source table.00. or SharePlex will return an error when you run mssql_setup to configure Post to connect to the database.  l src_owner. If you did not do so when you installed SharePlex. * IMPORTANT! If target owner or table name is defined in the database as anything other than UPPERCASE. The target table is case-sensitive.  l tgt_owner. To tell the difference between the two drivers:  l The Microsoft SQL Server ODBC Driver has versions such as 06. Source configuration example The following configuration file replicates table HR.3513."Emp" sysprod@r.EMP "Region1". IMPORTANT! database_name must be the actual name of the database.EMP from Oracle instance ora112 to target table Region1. The DSN can use either Windows NT authentication or SQL Server authentication.  l Enclose the name in quotation marks.*  l host is the name of the target system. for example "MySchema". SharePlex 8.6 (8.  l SID is the Oracle SID of the source Oracle database. Create a Data Source Name (DSN) for the SQL Server database on the target Windows system.  2.  l The Microsoft SQL Server Native Client has versions such as 11. Test the DSN and make certain the ODBC connection works before proceeding to the next step.table is the owner and name of the target table. Datasource:o. NOTE: The first two steps might have been performed already if the procedures in the SharePlex Preinstallation Checklist were followed before SharePlex was installed. sysadmin is granted to the NT Authority\SYSTEM user by default. grant the NTAuthority\SYSTEM user the sysadmin fixed server role. not a data source name (DSN).02. It must be that driver. be certain to:  l Type the name in the correct case. If you configure the DSN to use NT authentication and are using SQL Server 2012 or later. which performs the following target setup:  l Establish a SharePlex database account with privileges to post to the target SQL Server database  l Establish a target connection configuration  l Install tables and indexes for use by SharePlex and owned by the SharePlex account See the SharePlex Reference Guide for more information about this utility. Install the Microsoft SQL Server ODBC Driver.9200.  l r.

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.SID     src_owner. These instructions guide you through the configuration processes that are required to support this target. 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.6 (8.6.table host@r. enable PK/UK supplemental logging in the Oracle source database. The components that are required in a configuration file vary.5) Administrator Guide 90 . SharePlex must have the Oracle key information to build an appropriate key on the target. When both supplemental logging and this parameter are set. depending on your replication strategy. However.Configure replication to an EDB™ Postgres Advanced Server® target Overview SharePlex can post replicated Oracle data to an EDB™ Postgres Advanced Server® target database through an Open Database Connectivity (ODBC) interface. it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key. NOTE: See Create configuration files for additional information about creating a configuration file. Configure replication On the source. use the following syntax in the configuration file: Datasource:o. create a SharePlex configuration file that specifies capture and routing information.database_name where: SharePlex 8. Configure SharePlex on the source Configure SharePlex and the database on the source system as follows. See the SharePlex Reference Guide for more information about this parameter. NOTE: For the datatypes and operations that are supported when using SharePlex to replicate to EDB™ Postgres Advanced Server®. set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1.table tgt_owner. Enable supplemental logging To replicate to an Open Target target. To configure replication to an Open Target target. Set SP_OCT_USE_SUPP_KEYS parameter To replicate to an Open Target database target. see the SharePlex Release Notes.

table is the owner and name of the source table.mydb Configure SharePlex on the target  1.ora112 HR. See the SharePlex Reference Guide for more information about this utility.  l src_owner.  l r.Emp in database mydb on target system sysprod.6.EMP "Region1". which establishes a SharePlex database account and connection information.  2.*  l host is the name of the target system.5) Administrator Guide 91 . See the EDB™ Postgres Advanced Server® StackBuilder documentation for instructions on how to get the most current Connector for your environment. SharePlex 8. Source configuration example The following configuration file replicates table HR. install the appropriate ODBC driver for the target database. * IMPORTANT! If target owner or table name is defined in the database as anything other than UPPERCASE."MyTable". The target table is case-sensitive. identifies the target as non-Oracle.  l SID is the Oracle SID of the source Oracle database.  l tgt_owner."Emp" sysprod@r. for example "MySchema".table is the owner and name of the target table. If you have not done so already.  l database_name is the name of the target database. run the ppas_setup utility. If you did not do so when you installed SharePlex.6 (8.EMP from Oracle instance ora112 to target table Region1. be certain to:  l Type the name in the correct case. Datasource:o.  l Enclose the name in quotation marks. not a data source name (DSN). IMPORTANT! database_name must be the actual name of the database.

When both supplemental logging and this parameter are set.database_name where:  l SID is the Oracle SID of the source Oracle database.SID     src_owner.6. NOTE: For the platforms.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. use the following syntax in the configuration file: Datasource:o. set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. SharePlex must have the Oracle key information to build an appropriate key on the target. it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key. The components that are required in a configuration file vary. enable PK/UK supplemental logging in the Oracle source database.table host@r. datatypes and operations that are supported when using SharePlex to replicate to a Sybase target. These instructions guide you through the configuration processes that are required to support this target. NOTE: See Create configuration files for additional information about creating a configuration file. depending on your replication strategy. However. Configure SharePlex on the source Configure SharePlex and the database on the source system as follows. SharePlex 8. 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. See the SharePlex Reference Guide for more information about this parameter. Set SP_OCT_USE_SUPP_KEYS parameter To replicate to an Open Target database target. create a SharePlex configuration file that specifies capture and routing information. Configure replication On the source. 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.5) Administrator Guide 92 .table tgt_owner. see the SharePlex Release Notes.6 (8. Enable supplemental logging To replicate to an Open Target target. To configure replication to an Open Target target.

create a user or system DSN (Data Source Name) by using Data Sources (ODBC) in the Administrative Tools section of the Windows control panel.5) Administrator Guide 93 . Source configuration example The following configuration file replicates table HR. You have the following options for configuring this connection information:  l On Windows.  l Enclose the name in quotation marks. Install and test the ODBC driver that is appropriate for your target database. be certain to:  l Type the name in the correct case. For more information. Set up ODBC  1.6 (8. Datasource:o. Install the ODBC driver Make certain to download the correct ODBC driver for your database. IMPORTANT! database_name must be the actual name of the database.  l tgt_owner. you must set the Post user name and password for the target database with the connection comand.EMP from Oracle instance ora112 to target table Region1. If using a DSN. * IMPORTANT! If target owner or table name is defined in the database as anything other than UPPERCASE. See the Windows documentation or your system administrator. SharePlex provides the OTS utility for testing the ability of SharePlex to connect to and post through ODBC. not a data source name (DSN). On the target system. configure ODBC connection information for use by Post to connect to the target database.mydb Configure SharePlex on the target Configure SharePlex and the database on the target system as follows. identifies the target as non-Oracle. The target table is case-sensitive.  l On Unix and Linux.  l r.  2. see the OTS documentation in the utilities section of the SharePlex Reference Guide.  l database_name is the name of the target database.Emp in database mydb on target system sysprod. you can do either of the following:  l Configure a user or system DSN on the target system according to the instructions provided with the database."MyTable".6."Emp" sysprod@r.*  l host is the name of the target system. for example "MySchema".EMP "Region1". If SharePlex 8.table is the owner and name of the source table. See Configure replication to an SAP ASE target. Test the DSN by using it to connect to the target database.table is the owner and name of the target table.  l src_owner.ora112 HR.

once for each keyword. driver The full path to the ODBC driver on the database server. query the metadata structures of the database. password.. connection r. copy the ODBC configuration files to the odbc subdirectory of the SharePlex variable-data directory.  3.  l Set the ODBC connection information in the Post configuration. Set connection information with the connection command Use the connection command to:  l Set the Post user name and password if you created a DSN. Run sp_ctrl. IMPORTANT! user. 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. or.6. This account must be granted the privileges to connect. Set the LD_LIBRARY_PATH environment variable to the location of the database ODBC driver. and perform full DML and supported DDL operations. See Set connection information with the connection command.5) Administrator Guide 94 .6 (8. Create a user account for SharePlex in the target database.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. the connection is successful.  2.  1. create and update tables in the SharePlex database or schema. server The name or IP address of the database server.   SharePlex 8. and dsn are the only required keywords if a DSN exists..  l Set all of theODBC connection information if a DSN does not exist. Execute the connection command with the set option. Make certain that this user can connect successfully to the database through ODBC outside SharePlex.

pwd=m ypassword” Remove a connection value Use connection with the reset option to remove SharePlex connection settings.mydb set password=mypassword connection r. To remove a specific connection value connection r. use connection string connection r.mydb set user=myuser connection r.5) Administrator Guide 95 .6 (8.mydb set connect_ string=”driver=/database/ODBC/lib/databasedriver.mydb set password=mypassword connection r.mydb set driver=/database/ODBC/lib/databasedriver.so.database_name reset SharePlex 8. When using your own connection string.mydb set server=server1 connection r.server=server1.mydb set user=myuser connection r. Connection command examples DSN exists connection r.mydb set port=1234 connection r. but omit the user name and password.database_name reset keyword To remove all connection values connection r.port=1234.mydb set user=myuser connection r.6.uid=myuser. Use the connection command with the user and password options to supply user information.mydb set password=mypassword connection r.so DSN does not exist. make certain it includes all of the required elements to make a successful ODBC connection.mydb set dsn=mydsn DSN does not exist connection r.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.

mydb reset port connection r.database_name show To view connection settings for all local databases connection show all SharePlex 8.5) Administrator Guide 96 .Examples connection r.6 (8. To view connection values for a database connection r.mydb reset View connection values Use connection with the show option to view SharePlex connection settings.6.

However.Configure replication to a HANA target Overview SharePlex can post replicated Oracle data to a HANA target database through an Open Database Connectivity (ODBC) interface. NOTE: For the datatypes and operations that are supported when using SharePlex to replicate to a HANA target. Configure SharePlex on the source Configure SharePlex and the database on the source system as follows. depending on your replication strategy. SharePlex 8. Enable supplemental logging To replicate to an Open Target target.database_name where:  l SID is the Oracle SID of the source Oracle database. 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. create a SharePlex configuration file that specifies capture and routing information. enable PK/UK supplemental logging in the Oracle source database. To configure replication to an Open Target target.table tgt_owner.table host@r. set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. see the SharePlex Release Notes. Set SP_OCT_USE_SUPP_KEYS parameter To replicate to an Open Target database target. The components that are required in a configuration file vary. SharePlex must have the Oracle key information to build an appropriate key on the target. it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key.6 (8. Configure replication On the source.6. 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. use the following syntax in the configuration file: Datasource:o.SID     src_owner. These instructions guide you through the configuration processes that are required to support this target. NOTE: See Create configuration files for additional information about creating a configuration file.5) Administrator Guide 97 . See the SharePlex Reference Guide for more information about this parameter. When both supplemental logging and this parameter are set.

EMP "Region1". be certain to:  l Type the name in the correct case.  l r. If you did not do so when you installed SharePlex. not a data source name (DSN). for example "MySchema". If you have not done so already. SharePlex 8.EMP from Oracle instance ora112 to target table Region1. Source configuration example The following configuration file replicates table HR.  2. The target table is case-sensitive."Emp" sysprod@r. install the appropriate ODBC driver for the target HANA database. * IMPORTANT! If target owner or table name is defined in the database as anything other than UPPERCASE.6 (8.Emp in database mydb on target system sysprod.6.  l Enclose the name in quotation marks.*  l host is the name of the target system. Datasource:o.  l database_name is the name of the target database.table is the owner and name of the target table."MyTable".  l src_owner. identifies the target as non-Oracle.table is the owner and name of the source table.mydb Configure SharePlex on the target  1.5) Administrator Guide 98 . See the SharePlex Reference Guide for more information about this utility. IMPORTANT! database_name must be the actual name of the database.ora112 HR. which establishes a SharePlex database account and connection information.  l tgt_owner. run the hana_setup utility.

set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1.6. The following template shows the basic required components 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. Set SP_OCT_USE_SUPP_KEYS parameter To replicate to an Open Target database target. These instructions guide you through the configuration processes that are required to support this target.SharePlex_db where:  l ora_SID is the source Oracle instance  l oracle_schema is the Oracle schema (owner) of src_table  l src_table is an Oracle source table or wildcard specification SharePlex 8. it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key.5) Administrator Guide 99 . 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. The components that are required in a configuration file may vary.SID     oracle_schema. Datasource:o. NOTE: See Create configuration files for additional information about creating a configuration file. See the SharePlex Reference Guide for more information about this parameter. depending on your replication strategy. Configure replication to Teradata On the source.targ_table target_host@r. enable PK/UK supplemental logging in the Oracle source database. When both supplemental logging and this parameter are set. SharePlex must have the Oracle key information to build an appropriate key on the target.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. create a SharePlex configuration file that specifies capture and routing information.6 (8. Enable supplemental logging To replicate to an Open Target 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.src_table teradata_db.

This database can also contain target tables. You specify target tables in this and other databases as teradata_db.  l teradata_db is a Teradata database that contains targ_table  l targ_table is a Teradata target table or wildcard specification  l target_host is the target system that hosts Teradata  l SharePlex_db is the Teradata database that contains the SharePlex objects installed by Teradata Setup (td_setup).fin sales. the utility create the following:  l a database user by which SharePlex Post will operate (which also owns a database)  l a database into which SharePlex can install its internal objects (which can be the database owned by the SharePlex Post user or a different one) If you want to replicate to target tables in databases other than those two databases. be certain to:  l Type the name in the correct case.fin mfg. Source configuration example Datasource:o.  l Enclose the name in quotation marks. but for SharePlex to replicate to the tables in "sales" and "mfg" you must issue the following grants: GRANT ALL ON sales TO hr.6 (8.orders mfg. this database is the only database that can be specified in the routing map with the "r. * IMPORTANT! If target owner or table name is defined in the database as anything other than UPPERCASE."MyTable"." designation. The command in BTEQ is: grant all on database to SharePlex_user. or it can be dedicated to the SharePlex objects.cust sales.emp hr.* fin. you must issue the following grant to the SharePlex user for each of the other databases.emp sysb@r.ora1 fin. SharePlex 8. See Replicate to multiple Teradata databases.fin hr. In either case. the "hr" user has the required privileges to connect to both the "hr" and "fin" databases. for example "MySchema".cust sysb@r.targ_table.orders sysb@r.5) Administrator Guide 100 .6.fin In this example. GRANT ALL ON mfg TO hr. the person who ran Teradata Setup (td_setup) specified the following:  l "hr" as the SharePlex user in Teradata  l "fin" as the database that contains the SharePlex objects Thus. Replicate to multiple Teradata databases When you run the Teradata Setup (td_setup) utility during installation of SharePlex. See the following configuration example for additional explanation.* sysb@r.

5) Administrator Guide 101 . install the appropriate ODBC driver for the target Teradata database. See the SharePlex Reference Guide for more information about this utility.6 (8.  2. If you have not done so already.Configure SharePlex on the target  1. See the SharePlex Release Notes for supported database and driver versions. SharePlex 8.  l Establish an internal connection string based on the DSN and user credentials.  l Install tables and indexes for use by SharePlex into a specified database. which performs the following target setup:  l Establish a SharePlex database user and login credentials. If you did not do so when you installed SharePlex. Create a Data Source Name (DSN) for SharePlex to use to connect to Teradata.  3. run the td_setup utility.6.

depending on your replication strategy. 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.dell. See the SharePlex Reference Guide for more information about this parameter.com.6. 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. set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. see the SharePlex Release Notes.table tgt_owner. To configure replication to an Open Target target.database_name SharePlex 8.6 (8.Configure replication to other Open Target databases Overview SharePlex can connect to a database that supports Open Database Connectivity (ODBC). However. When both supplemental logging and this parameter are set. Configure SharePlex on the source Configure SharePlex and the database on the source system as follows. For more information about the SharePlex beta program. The components that are required in a configuration file vary.RD. NOTE: The support of Open Target databases is currently in beta testing. For the platforms. Enable supplemental logging To replicate to an Open Target target.table host@r. see the SharePlex Release Notes. enable PK/UK supplemental logging in the Oracle source database. use the following syntax in the configuration file: Datasource:o.SID     src_owner. Configure replication On the source.Beta@software. Set SP_OCT_USE_SUPP_KEYS parameter To replicate to an Open Target database target. datatypes and operations that are supported by SharePlex.5) Administrator Guide 102 . SharePlex must have the Oracle key information to build an appropriate key on the target.Shareplex. NOTE: See Create configuration files for additional information about creating a configuration file. it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key. with the exception of the ones listed in the SharePlex Release Notes. Questions or support requests for these features should be emailed to DSG. create a SharePlex configuration file that specifies capture and routing information.

ora112 HR.  l src_owner.6. Install the ODBC driver Make certain to download the correct ODBC driver for your database. You have the following options for configuring this connection information:  l 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. If using a DSN.  2. Install and test the ODBC driver that is appropriate for your target database. for example "MySchema".EMP from Oracle instance ora112 to target table Region1. not a data source name (DSN). where:  l SID is the Oracle SID of the source Oracle database. you can do either of the following: SharePlex 8.  l tgt_owner.6 (8. Set up ODBC  1.EMP "Region1". be certain to:  l Type the name in the correct case. The target table is case-sensitive. Datasource:o.  l Enclose the name in quotation marks.  l r. you must set the Post user name and password for the target database with the connection comand. SharePlex provides the OTS utility for testing the ability of SharePlex to connect to and post through ODBC.  l On Unix and Linux.mydb Configure SharePlex on the target Configure SharePlex and the database on the target system as follows. See the Windows documentation or your system administrator.Emp in database mydb on target system sysprod.  l database_name is the name of the target database.table is the owner and name of the target table.5) Administrator Guide 103 . * IMPORTANT! If target owner or table name is defined in the database as anything other than UPPERCASE. identifies the target as non-Oracle. IMPORTANT! database_name must be the actual name of the database. On the target system."Emp" sysprod@r. configure ODBC connection information for use by Post to connect to the target database.table is the owner and name of the source table. Source configuration example The following configuration file replicates table HR.*  l host is the name of the target system. See Configure replication to other Open Target databases."MyTable". see the OTS documentation in the utilities section of the SharePlex Reference Guide. For more information.

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.5) Administrator Guide 104 ...  l Configure a user or system DSN on the target system according to the instructions provided with the database. password.  3.  2. server The name or IP address of the database server. create and update tables in the SharePlex database or schema. If the connection is successful. and perform full DML and supported DDL operations. query the metadata structures of the database. Set connection information with the connection command Use the connection command to:  l Set the Post user name and password if you created a DSN.  l Set all of theODBC connection information if a DSN does not exist.  l Set the ODBC connection information in the Post configuration. copy the ODBC configuration files to the odbc subdirectory of the SharePlex variable-data directory. See Set connection information with the connection command. and dsn are the only required keywords if a DSN exists. Set the LD_LIBRARY_PATH environment variable to the location of the database ODBC driver. driver The full path to the ODBC driver on the database server. connection r. Execute the connection command with the set option. Make certain that this user can connect successfully to the database through ODBC outside SharePlex. 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. or. SharePlex 8.  1. This account must be granted the privileges to connect.6 (8. Test the DSN by using it to connect to the target database. once for each keyword. IMPORTANT! user. Create a user account for SharePlex in the target database.6. Run sp_ctrl.

mydb set password=mypassword connection r.so. use connection string connection r.port=1234. To remove a specific connection value connection r.mydb set password=mypassword connection r.mydb set connect_ string=”driver=/database/ODBC/lib/databasedriver. When using your own connection string.6.  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.6 (8.mydb set user=myuser connection r.so DSN does not exist. Use the connection command with the user and password options to supply user information.mydb set dsn=mydsn DSN does not exist connection r. make certain it includes all of the required elements to make a successful ODBC connection.mydb set port=1234 connection r.database_name reset SharePlex 8.mydb set user=myuser connection r.server=server1.mydb set driver=/database/ODBC/lib/databasedriver. but omit the user name and password.uid=myuser.pwd=m ypassword” Remove a connection value Use connection with the reset option to remove SharePlex connection settings.mydb set password=mypassword connection r.mydb set user=myuser connection r.5) Administrator Guide 105 .database_name reset keyword To remove all connection values connection r.mydb set server=server1 connection r. Connection command examples DSN exists connection r.

see the SharePlex Reference Guide. For more information about the target command.6. you need to map Oracle datatypes to the datatypes of the target database. NOTE: For DML operations. See the SharePlex Release Notes for mapping options.mydb reset View connection values Use connection with the show option to view SharePlex connection settings. To map datatypes target r. Use the target command with the set datatype option to perform this mapping.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. SharePlex 8.mydb reset port connection r. To view connection values for a database connection r.6 (8. SharePlex queries the target database to determine the appropriate datatype mapping for replicated data.5) Administrator Guide 106 .Examples connection 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.

SharePlex 8. The structure that is required in a configuration file varies. See the SharePlex Reference Guide for more information about this parameter.table] host where:  l SID is the Oracle SID of the source Oracle database. it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key. This data is written as a sequential series of operations as they occurred on the source. but this shows you the required syntax for routing data through a JMS queue or topic. set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. depending on your replication strategy. Datasource:o. Configure replication On the source. enable PK/UK supplemental logging in the Oracle source database. SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY.6. configure the source database and SharePlex on the source system as follows. 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.5) Administrator Guide 107 .Configure Replication to a JMS target Overview The SharePlex Post process can connect and write to a JMS (Java Messaging Service) queue or topic.6 (8. create a SharePlex configuration file that specifies capture and routing information.table is the owner and name of the source table. Set SP_OCT_USE_SUPP_KEYS parameter On the source system. datatypes and operations that are supported when using SharePlex to replicate to JMS.  l src_owner. NOTE: For the platforms. see the SharePlex Release Notes. SharePlex must have the Oracle key information to build an appropriate key on the target. the operation type. The data is written as XML records that include the data definitions. UNIQUE) COLUMNS. Enable supplemental logging On the source system.SID     src_owner. When both supplemental logging and this parameter are set. Configure SharePlex on the source When replicating data to JMS.table !jms[:tgt_owner. and the changed column values. which can then be posted in sequential order to a target database or consumed by an external process or program.

Create the activemq directory under SharePlex/lib/providers. SharePlex 8.MY_TABLE !jms:"MySchema2". as in "MySchema".table.  5.  l !jms is a required keyword indicating SharePlex is posting to JMS.ora112 MY_SCHEMA. see Create configuration files.  6. Add the new JAVA_HOME to the PATH variable. Additional content about this parameter is available at: http://activemq. Configure SharePlex on an Active MQ target Configure SharePlex on an IBM MQ target Configure SharePlex on an Active MQ target These instructions configure the SharePlex Post process to post to an Active MQ queue or topic.6 (8.org/producer-flow-control.apache."MyTable"  l host is the name of the target system.html. Copy the following provider JAR files and HS dependencies to the directory that you created. Configure the JAVA_HOME and JRE_HOME variables to point to the activemq directory. shareplex/lib/providers/amq  3. Install and configure the latest version of Java Runtime Engine (JRE) on the SharePlex target server. To configure post to the ActiveMQ target  1. NOTE: For more information about how to create a configuration file. The following directory naming conventions are used in the examples in this procedure: Name Directory activemq The Active MQ client installation directory SharePlex The SharePlex installation directory amq The working directory for Active MQ within the SharePlex directory. Source configuration example Datasource:o.  7. Type case-sensitive names in the correct case and enclose them within double quotes."MyTable2" sysprod Configure SharePlex on the target These instructions establish the Java provider on the target and configure the SharePlex Post process to connect to a JMS structure. Use if either component is different from that of the source table. Download and expand the ActiveMQ files to the activemq directory under SharePlex/lib/providers.  l :tgt_owner. Allow no spaces between !jms and :tgt_ owner.6. Set all values of producerFlowControl="true" to "false".5) Administrator Guide 108 .  4.table is optional and specifies the owner and name of the target table.  2.

Run sp_ctrl. shareplex/lib/providers/amq/activemq-all. See View and change JMS settings for command explanations and options.activemq.jms set jms queuename=SHAREPLEX.jms set jms factory_ class=org.  2. SharePlex 8.Q1 If posting to a JMS topic: sp_ctrl> target x.  3.ActiveMQInitialContextFactory sp_ctrl> target x.jms set jms destination=topic sp_ctrl> target x.6. Start sp_cop. Set the JAVA_HOME and JRE_HOME environment variables to the appropriate directories.apache.jms set jms lib_location=shareplex/lib/providers/amq sp_ctrl> target x.activemq. Install and configure the latest version of Java Runtime Engine (JRE) on either the database server or an intermediate server where the SharePlex Post process will be running. The following are example commands. Add the JAVA_HOME and JRE_HOME paths to the PATH variable as part of the SharePlex operating system user profile.apache.jms set jms factory_ class=org.5) Administrator Guide 109 . To configure post to the IBM MQ target  1.ActiveMQInitialContextFactory sp_ctrl> target x.jndi.jms set jms queuename=SHAREPLEX. The following directory naming conventions are used in the examples in this procedure: Name Directory MQClient The IBM MQ client installation directory SharePlex The SharePlex installation directory ibmmq The working directory for IBM MQ within the SharePlex directory.jms set jms provider_url=tcp://w2k3-64bit:61616 sp_ctrl> target x.jms set jms lib_location=shareplex/lib/providers/amq sp_ctrl> target x.Q1 Configure SharePlex on an IBM MQ target These instructions configure the SharePlex Post process to post to an IBM MQ queue or topic.jar shareplex/lib/providers/amq/slf4j. If posting to a JMS queue: sp_ctrl> target x.jndi. (Do not activate the configuration yet.jar  8.6 (8.jms set jms provider_url=tcp://w2k3-64bit:61616 sp_ctrl> target x.)  9.  10. Issue the target command to configure Post to post to the JMS queue or topic.

bindings SharePlex/lib/providers/ibmmq $ cp MQClient/java/lib/*.  5. $ cd SharePlex/.6.jms set jms lib_location=ibmmq sp_ctrl> target x. $ cd SharePlex/lib/providers/ibmmq $ ln –sMQClient/libibmmq  10.x.jar files from the MQClient/java/lib directory to the SharePlex/lib/providers/ibmmq directory.  8.)  11.jms set jms provider_url=file:/MQClient/app/mqm83client/lib sp_ctrl> target x. NOTE: The Post process uses this file to obtain information about the IBM MQ middle-tier server. $ mv jre jre. Create a soft link to the MQClient/lib directory from the ibmmq directory that you created.bindings file that is generated by the IBM MQ Explorer utility from the middle-tier server to the MQClient/lib directory on the SharePlex target server.jms set jms factory_name=SharePlexQcf sp_ctrl> target x. (The JRE 1. If posting to a JMS queue: sp_ctrl> target x. Start sp_cop.jms set jms queuename=SHAREPLEX. Install the IBM MQ client into the MQClient directory on either the database server or an intermediate server where the SharePlex Post process will be running.Q1 sp_ctrl> target x.jms set jms provider_url=file:/MQClient/app/mqm83client/lib sp_ctrl> target x.T1 sp_ctrl> target x.6 (8. See View and change JMS settings for command explanations and additional options. (Do not activate the configuration yet.jar SharePlex/lib/providers/ibmmq  9.old  c. create a soft link to the JRE that ships with the MQ 8.jms set jms user=myusername SharePlex 8.jms set jms lib_location=ibmmq sp_ctrl> target x. $ cp MQClient/java/lib/.)  a. Copy the . Copy the .x but not 8.x distribution. Issue the target command to configure Post to post to the JMS queue or topic.6.jms set jms factory_name=SharePlexQcf sp_ctrl> target x. The following are example commands.app-modules/openbridge  b.5) Administrator Guide 110 . Run sp_ctrl.bindings file and all of the . that ships with SharePlex is compatible with MQ 7. Create an ibmmq directory within the SharePlex/lib/providers directory. If using IBM MQ 8.jms set jms queuename=SHAREPLEX.  6.jms set jms user=myusername sp_ctrl> target x. $ ln –s /MQClient/java/jre64/jre jre  7.jms set jms password=mypassword If posting to a JMS topic: sp_ctrl> target x.x.  12.jms set jms destination=topic sp_ctrl> target x.  4.

name2).5) Administrator Guide 111 .6 (8. password=password Password of the JMS user. sp_ctrl> target x. for example: (jndi. None Sets the JNDI environmental property java. user=user Name of the user that is attaching to JMS. provider_url=url Required RMI URL with no object name component. You can None specify multiple names with a comma-separated list.initial to specify the class name of the initial context factory for the provider.provider. target x. jndi. making each one immediately visible SharePlex 8.name1. destination={queue | topic} Messaging domain. Table 3: JMS target properties Property Input Value Default factory_class=factory_class Required Fully qualified class name of the factory class. use the following command: target x.factory.naming. use the following command.naming.jms show To change a property setting. factory_name=factory_name Name of a JNDI connection factory lookup.jms [queue queuename] set jms property=value where:  l queue queuename is the name of a Post queue.  l property and value are shown in the following table. lib_location=path Required Path to the directory where you installed the None JAR files. session_transacted ={yes|no} no directs Post to issue a JMS commit for every no replicated message. None queuename=JMS_queuename Name of the JMS queue or topic.6. no prevents logging. Valid values are queue (port-to-port) queue or topic (publisher-subscriber model). If None authentication is not required. Use this option if there are multiple Post processes. omit this and the password option.jms set jms password=mypassword View and change JMS settings To view current property settings for output to JMS. OpenTarget persistent={yes | no} yes logs messages to disk storage as part of send yes operations.url to specify the location of the registry that is being used as the initial context. This None sets the JNDI environmental property java.

as controlled by the value set for the SP_OPX_READRELEASE_INTERVAL parameter. under the txn element in the XML output (see About the XML). yes directs Post to operate in a transactional manner. as controlled by the value set for the SP_OPX_CHECKPOINT_FREQ parameter. or if the machine that it is running on aborts. SharePlex 8. client_id Use this option if the JMS provider that you are using None cannot consume messages that contain the default SharePlex client ID. specify it as name=value. Post issues a JMS commit (to make messages visible and consumable) at intervals based on the following:  l Issue a commit before the data is read-released from the Post queue. prefix the name with a dash. The consumer must manage this by detecting and discarding duplicates. Property Input Value Default and consumable.  l To remove a SharePlex property. commit_frequency Use this option when Post is configured to post to a JMS 1500 server in transactional style (issue a JMS commit at intervals.  l Issue a commit every JMS write. respectively. It enables you to remove or add properties. For example this string removes two SharePlex properties: -JMSXDeliveryCount. properties Use this option if the JMS provider that you are using None cannot consume messages that contain the default set of properties supplied by SharePlex. row changes may be written twice to the JMS target.6 (8.- JMSXGroupSeq. This is the default. Set this value to the client ID that your provider accepts. Every record of every row-change operation in a transaction has the same transaction ID and is also marked with a sequence ID. These attributes are id and msgIdx. rather than after every message as directed by the session_transacted property of the target command).6. This parameter specifies the interval between JMS commits. In this mode.  l To add a property. Supply the properties as a comma-delimited list. until the SP_OPX_READRELEASE_ INTERVAL is reached. It works in conjunction with the SP_OPX_READRELEASE_INTERVAL parameter. Set recovery options If the JMS process aborts suddenly. Valid values are 1 to any positive integer.5) Administrator Guide 112 .

trans The ID of the transaction that included the operation.6 (8.jms [queue queuename] reset metadata To view the metadata target x. The default settings are 256MB and 512MB. These two values are guaranteed to be the same if they are re-written to the JMS queue in a recovery situation.6. To increase the JMS bridge memory Open the openbridge.ini file and set the following parameters in the format shown: -Xms=512m -Xmx=1024m -XX:PermSize=512m -XX:MaxPermSize=1024m Configure debugging You can configure Post to log whether each write to a queue or topic succeeded or failed. Example target x.ini file and set the -OB_debugToLog parameter to true. SharePlex 8. property] Table 4: Optional JMS metadata properties Property Description time The time the operation was applied on the source. size To reset the metadata target x. userid The ID of the database user that performed the operation.5) Administrator Guide 113 .jms [queue queuename] show metadata Control memory settings If you configured Post to process large amounts of transactions to JMS through multiple named Post queues.jms set metadata time. size The number of operations in the transaction. userid. This is controlled with the debugging setting. you can configure the target to include additional metadata with every row-change record by using the following command: target target [queue queuename] set metadata property[.The transaction ID is the SCN at the time the transaction was committed and the sequence ID is the index of the row change in the transaction. trans. you may need to allocate more memory to the Post JMS bridge. To enable debugging Open the openbridge. If desired.

0" encoding="UTF-8" ?> <?opentarget version="1. it first writes a schema record for that table. They are actually the same when viewed from an XSD perspective and are not distinct types. the first time that Post writes a change record for any given table. once for each table as Post receives a change record for it. The individual XML represents the bare minimum output for each supported operation. Schema record template <?xml version="1. Each schema record contains the table name and details of interest for each columns. If Post stops and starts. The template XML represents all possible attributes and elements.-OB_debugToLog=true About the XML The XML format is separated into operation and schema "types" for easier consumption. unless there is a change to that schema.6.6 (8. After startup. A schema record is written only once for each table during a Post run. and then a new schema record is written.5) Administrator Guide 114 . schema records are written again.0" ?> <opentarget> <txn id="xs:integer" oracleTxnId="xs:string" commitTime="xs:dateTimeStamp" /> <tbl name="xs:string" utcOffset="xs:integer" <cmd ops="schema"> <schema> <col name="xs:string" xmlType="xs:string" key="xs:boolean" nullable="xs:boolean" length="xs:integer" /> </schema> </cmd> </tbl> </opentarget> Table 5: Explanation of schema template (* = optional) Element Attribute Description txn   Transaction metadata   id ID of current transaction   oracleTxnId Oracle transaction ID SharePlex 8.

false)   nullable Nullable flag   length Length of the column Operation record template <?xml version="1. For a schema. the value is schema.)   ops Type of record generated for this table.Element Attribute Description *   commitTime Transaction commit timestamp * tbl   Table metadata   name Fully qualified name of the table   utcOffset UTC offset in the log cmd   Operation metadata (In the case of a schema.)   name Name of the column   xmlType XML data type   key Key flag (true.5) Administrator Guide 115 . schema   Column metadata col   Metadata for a column (One of these elements appears for every record in the table.1" ?> <opentarget> <txn id="xs:integer" msgIdx="xs:integer" msgTot="xs:integer" oracleTxnId="xs:string" commitTime="xs:dateTimeStamp" userId="xs:string" /> <tbl name="xs:string" <cmd ops="xs:string"> <row id="xs:string"> <col name="xs:string"></col> <lkup> <col name="xs:string"></col> </lkup> </row> </cmd> </tbl> </opentarget> SharePlex 8. there are no operations.6 (8.6.0" encoding="UTF-8" ?> <?opentarget version="1.

Sample XML records Source table This is the table for which the sample operations are generated.6 (8. SQL> desc products Name Null? Type SharePlex 8.)   name Column name with the after value for that column lkup   Before image for use in update and delete operations col   Before image of column (One of these elements appears for every changed column in the operation.Table 6: Explanation of operation template (* = optional) Element Attribute Description txn   Transaction metadata for the operation   id ID of current transaction   msgIdx Index of current record in the transaction   msgTot* Total number of messages in transaction   oracleTxnId Oracle transaction ID. update. Supported datatypes See the SharePlex Release Notes for a chart that shows how Oracle datatypes are converted to XML.)   name Column name with the before value or the key value (depending on the operation) for that column NOTE: The id and msgIdx attributes together uniquely identify an operation. delete.6. truncate) row   Metadata of the row that changed in the operation   id Oracle ROWID col   Change data for a column (One of these elements appears for every changed column in the operation. taken from the System Change Number (SCN) *   commitTime Transaction commit timestamp *   userId * User ID that performed the operation tble   Table metadata   name Fully qualified table name cmd   Operation metadata   ops Operation type (insert.5) Administrator Guide 116 .

5) Administrator Guide 117 .1"?> <opentarget> <txn id="2218316945" commitTime="2014-10-10T13:18:43" userId="85" oracleTxnId="3.10.0" encoding="UTF-8"?> <?opentarget version="1. delete products where product_id=230117.10. ‘Hamsberry vintage tee.PRODUCT_ID NOT NULL NUMBER DESCRIPTION VARCHAR2(600) PRICE NUMBER Source DML operations insert into products values (230117.1339425" /> <tbl name="MFG.1339425" /> <tbl name="MFG. Schema record <?xml version="1.6 (8. 4099). truncate table products. cherry’.PRODUCTS"> <cmd ops="ins"> <row id="AAAmDbAAEAAApRrAAA"> <col name="PRODUCT_ID">230117</col> <col name="DESCRIPTION">Hamsberry vintage tee. commit.1"?> <opentarget> <txn id="2218316945" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:18:43" userId="85" oracleTxnId="3.0" encoding="UTF-8"?> <?opentarget version="1. commit.6. update products set price=3599 where product_id=230117 and price=4099. cherry</col> <col name="PRICE">4099</col> </row> </cmd> </tbl> </opentarget> SharePlex 8. commit.PRODUCTS" utcOffset="-5:00"> <cmd ops="schema"> <schema> <col name="PRODUCT_ID" xmlType="decimal" key="true" nullable="false" length="22" /> <col name="DESCRIPTION" xmlType="string" key="false" nullable="true" length="600" /> <col name="PRICE" xmlType="decimal" key="false" nullable="true" length="22" /> </schema> </cmd> </tbl> </opentarget> Insert record <?xml version="1.

4.1391276" /> <tbl name="MFG.17.970754" /> <tbl name="MFG.939801" /> <tbl name="MFG.PRODUCTS"> <cmd ops="del"> <row id="AAAmDbAAEAAApRrAAA"> <lkup> <col name="PRODUCT_ID">230117</col> </lkup> </row> </cmd> </tbl> </opentarget> Truncate record <?xml version="1.0" encoding="UTF-8"?> <?opentarget version="1.0" encoding="UTF-8"?> <?opentarget version="1.Update record <?xml version="1.1"?> <opentarget> <txn id="2218318728" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:19:12" userId="85" oracleTxnId="1.1"?> <opentarget> <txn id="2218319938" commitTime="1988-01-01T00:00:00" userId="85" oracleTxnId="11.0" encoding="UTF-8"?> <?opentarget version="1.6 (8.1"?> <opentarget> <txn id="2218319446" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:19:25" userId="85" oracleTxnId="5.6.PRODUCTS"> <cmd ops="upd"> <row id="AAAmDbAAEAAApRrAAA"> <col name="PRICE">3599</col> <lkup> <col name="PRODUCT_ID">230117</col> <col name="PRICE">4099</col> </lkup> </row> </cmd> </tbl> </opentarget> Delete record <?xml version="1.PRODUCTS"> <cmd ops="trunc" /> </tbl> </opentarget> SharePlex 8.23.5) Administrator Guide 118 .

Configure SharePlex on the source When replicating data to Kafka. To support multiple topics or multiple brokers. it ensures that SharePlex can always build a key and that the SharePlex key will match the Oracle key. configure the source database and SharePlex on the source system as follows. The data is written as XML records that include the data definitions.6 (8.5) Administrator Guide 119 . set the SP_OCT_USE_SUPP_KEYS parameter to a value of 1. which can then be posted in sequential order to a target database or consumed by an external process or program.  l The SharePlex Post process does not create topics. configure multiple Post processes using named Post queues. and the changed column values. enable PK/UK supplemental logging in the Oracle source database. Guidelines for posting to Kafka  l A SharePlex Post process acts as a Kafka producer. When both supplemental logging and this parameter are set. This data is written as a sequential series of operations as they occurred on the source. see the SharePlex Release Notes. For more information. NOTE: For the platforms. These can be used to balance performance with latency. SharePlex 8.Configure Replication to a Kafka target Overview The SharePlex Post process can connect and write to a Kafka broker. See the SharePlex Reference Guide for more information about this parameter. see Configure named post queues. Post batches messages together before sending them to the Kafka broker. 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. SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY. the operation type.6. Tuning parameters are available to control the batch size. You must create the topic through Kafka. SharePlex must have the Oracle key information to build an appropriate key on the target. A SharePlex Post process writes to a single topic with the default partition of 0 in a single broker. UNIQUE) COLUMNS. Enable supplemental logging On the source system. datatypes and operations that are supported when using SharePlex to replicate to Kafka. Set SP_OCT_USE_SUPP_KEYS parameter On the source system.  l For performance reasons.

ora112 MY_SCHEMA.6. To configure post to Kafka  1. NOTE: For more information about how to create a configuration file. Use if either component is different from that of the source table.table. create a SharePlex configuration file that specifies capture and routing information. Source configuration example Datasource:o.)  3.table !kafka[:tgt_owner.  4. Run sp_ctrl. Datasource:o. depending on your replication strategy. as in "MySchema". Allow no spaces between !kafka and :tgt_ owner.table] host where:  l SID is the Oracle SID of the source Oracle database."MyTable"  l host is the name of the target system. The following are example commands.  l :tgt_owner. The structure that is required in a configuration file varies.6 (8. but this shows you the required syntax for routing data to Kafka.  2.MY_TABLE !kafka:"MySchema2". sp_ctrl> target x. Start sp_cop.  l !kafka is a required keyword indicating SharePlex is posting to Kafka.table is optional and specifies the owner and name of the target table.kafka set kafka topic=shareplex See View and change Kafka settings for command explanations and options.5) Administrator Guide 120 . Create a Kafka topic. Issue the target command to configure posting to a Kafka broker and topic.table is the owner and name of the source table.Configure replication On the source. see Create configuration files. SharePlex 8. You must have a running Kafka broker. (Do not activate the configuration yet."MyTable2" sysprod Configure SharePlex on the target These instructions configure the SharePlex Post process to connect to Kafka. Type case-sensitive names in the correct case and enclose them within double quotes.kafka set kafka broker=localhost:9092 sp_ctrl> target x.SID     src_owner.  l src_owner.

NOTES:  l Maximum packet size is 128000 KB. topic Required. respectively. or if the machine that it is running on aborts.kafka show To change a property setting. client_id Optional. * To avoid latency. The transaction ID is the SCN at the time the transaction was committed. The host and port number of the Kafka localhost:9092 broker. under the txn element in the XML output (see About the XML). These two values are guaranteed to be the same if they are re-written to the Kafka topic in a recovery situation. The consumer must manage this by detecting and discarding duplicates. use the following command: target x.kafka [queue queuename] set metadata property[. target x. These attributes are id and msgIdx. use the following command. A user-defined string that Post will send in None each request to help trace calls. property] SharePlex 8.kafka [queue queuename] set kafka property=value where:  l queue queuename is the name of a Post queue. Table 7: Kafka target properties Property Input Value Default broker Required. If desired. Set recovery options If the Kafka process aborts suddenly.5) Administrator Guide 121 . if Post detects no more incoming messages. The approximate network packet size*. row changes may be written twice to the Kafka topic.6.  l property and value are shown in the following table. and the sequence ID is the index of the row change in the transaction.View and change Kafka settings To view current property settings for output to Kafka. you can configure Post to include additional metadata with every row-change record by using the following command: target x. that Post sends to the Kafka broker.6 (8. Use this option if there are multiple Post processes. Every record of every row-change operation in a transaction has the same transaction ID and is also marked with a sequence ID. The name of the target Kafka topic. it sends the packet to Kafka immediately without waiting for the threshold to be satisfied. shareplex threshold_size Optional.  l Packet size is approximate. in 10000KB kilobytes.

Each schema record contains the table name and details of interest for each columns. once for each table as Post receives a change record for it.Table 8: Optional metadata properties Property Description time The time the operation was applied on the source. trans The ID of the transaction that included the operation.kafka set metadata time.6 (8. Example target x. unless there is a change to that schema. and then a new schema record is written. They are actually the same when viewed from an XSD perspective and are not distinct types. size To reset the metadata target x.0" ?> <opentarget> <txn id="xs:integer" oracleTxnId="xs:string" commitTime="xs:dateTimeStamp" /> <tbl name="xs:string" utcOffset="xs:integer" <cmd ops="schema"> <schema> <col name="xs:string" SharePlex 8. The template XML represents all possible attributes and elements.6.0" encoding="UTF-8" ?> <?opentarget version="1. A schema record is written only once for each table during a Post run. it first writes a schema record for that table. trans. size The number of operations in the transaction. Schema record template <?xml version="1. If Post stops and starts.kafka [queue queuename] reset metadata To view the metadata target x. userid The ID of the database user that performed the operation. The individual XML represents the bare minimum output for each supported operation. the first time that Post writes a change record for any given table. After startup.kafka [queue queuename] show metadata About the XML The XML format is separated into operation and schema "types" for easier consumption.5) Administrator Guide 122 . userid. schema records are written again.

6. the value is schema. schema   Column metadata col   Metadata for a column (One of these elements appears for every record in the table. For a schema.)   ops Type of record generated for this table.5) Administrator Guide 123 .6 (8. false)   nullable Nullable flag   length Length of the column Operation record template <?xml version="1. xmlType="xs:string" key="xs:boolean" nullable="xs:boolean" length="xs:integer" /> </schema> </cmd> </tbl> </opentarget> Table 9: Explanation of schema template (* = optional) Element Attribute Description txn   Transaction metadata   id ID of current transaction   oracleTxnId Oracle transaction ID *   commitTime Transaction commit timestamp * tbl   Table metadata   name Fully qualified name of the table   utcOffset UTC offset in the log cmd   Operation metadata (In the case of a schema.0" encoding="UTF-8" ?> <?opentarget version="1.)   name Name of the column   xmlType XML data type   key Key flag (true.1" ?> <opentarget> <txn id="xs:integer" SharePlex 8. there are no operations.

6 (8.5) Administrator Guide 124 .6. msgIdx="xs:integer" msgTot="xs:integer" oracleTxnId="xs:string" commitTime="xs:dateTimeStamp" userId="xs:string" /> <tbl name="xs:string" <cmd ops="xs:string"> <row id="xs:string"> <col name="xs:string"></col> <lkup> <col name="xs:string"></col> </lkup> </row> </cmd> </tbl> </opentarget> Table 10: Explanation of operation template (* = optional) Element Attribute Description txn   Transaction metadata for the operation   id ID of current transaction   msgIdx Index of current record in the transaction   msgTot* Total number of messages in transaction   oracleTxnId Oracle transaction ID.)   name Column name with the after value for that column lkup   Before image for use in update and delete operations col   Before image of column (One of these elements appears for every changed column in the operation. truncate) row   Metadata of the row that changed in the operation   id Oracle ROWID col   Change data for a column (One of these elements appears for every changed column in the operation. delete. update. taken from the System Change Number (SCN) *   commitTime Transaction commit timestamp *   userId * User ID that performed the operation tble   Table metadata   name Fully qualified table name cmd   Operation metadata   ops Operation type (insert.) SharePlex 8.

truncate table products. Sample XML records Source table This is the table for which the sample operations are generated.PRODUCTS" utcOffset="-5:00"> <cmd ops="schema"> <schema> <col name="PRODUCT_ID" xmlType="decimal" key="true" nullable="false" length="22" /> <col name="DESCRIPTION" xmlType="string" key="false" nullable="true" length="600" /> <col name="PRICE" xmlType="decimal" key="false" nullable="true" length="22" /> </schema> </cmd> </tbl> </opentarget> SharePlex 8. cherry’.6 (8. Element Attribute Description   name Column name with the before value or the key value (depending on the operation) for that column NOTE: The id and msgIdx attributes together uniquely identify an operation. Schema record <?xml version="1. ‘Hamsberry vintage tee. Supported datatypes See the SharePlex Release Notes for a chart that shows how Oracle datatypes are converted to XML.6. commit.1339425" /> <tbl name="MFG.10. commit. commit. delete products where product_id=230117. 4099). SQL> desc products Name Null? Type PRODUCT_ID NOT NULL NUMBER DESCRIPTION VARCHAR2(600) PRICE NUMBER Source DML operations insert into products values (230117.5) Administrator Guide 125 .0" encoding="UTF-8"?> <?opentarget version="1.1"?> <opentarget> <txn id="2218316945" commitTime="2014-10-10T13:18:43" userId="85" oracleTxnId="3. update products set price=3599 where product_id=230117 and price=4099.

0" encoding="UTF-8"?> <?opentarget version="1.1"?> <opentarget> <txn id="2218316945" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:18:43" userId="85" oracleTxnId="3.0" encoding="UTF-8"?> <?opentarget version="1.1391276" /> <tbl name="MFG.6.1"?> <opentarget> <txn id="2218319446" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:19:25" userId="85" oracleTxnId="5.1339425" /> <tbl name="MFG.5) Administrator Guide 126 . cherry</col> <col name="PRICE">4099</col> </row> </cmd> </tbl> </opentarget> Update record <?xml version="1.PRODUCTS"> <cmd ops="del"> <row id="AAAmDbAAEAAApRrAAA"> <lkup> <col name="PRODUCT_ID">230117</col> </lkup> </row> SharePlex 8.23.PRODUCTS"> <cmd ops="ins"> <row id="AAAmDbAAEAAApRrAAA"> <col name="PRODUCT_ID">230117</col> <col name="DESCRIPTION">Hamsberry vintage tee.10.970754" /> <tbl name="MFG.PRODUCTS"> <cmd ops="upd"> <row id="AAAmDbAAEAAApRrAAA"> <col name="PRICE">3599</col> <lkup> <col name="PRODUCT_ID">230117</col> <col name="PRICE">4099</col> </lkup> </row> </cmd> </tbl> </opentarget> Delete record <?xml version="1.Insert record <?xml version="1.6 (8.1"?> <opentarget> <txn id="2218318728" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:19:12" userId="85" oracleTxnId="1.17.0" encoding="UTF-8"?> <?opentarget version="1.

939801" /> <tbl name="MFG.0" encoding="UTF-8"?> <?opentarget version="1.5) Administrator Guide 127 .1"?> <opentarget> <txn id="2218319938" commitTime="1988-01-01T00:00:00" userId="85" oracleTxnId="11.4.PRODUCTS"> <cmd ops="trunc" /> </tbl> </opentarget> SharePlex 8.6 (8.</cmd> </tbl> </opentarget> Truncate record <?xml version="1.6.

Configure Replication to a SQL or XML file target Overview SharePlex can post replicated Oracle data to a file formatted as SQL or XML. NOTE: For complete instructions for creating a configuration file.6 (8. This data is written as a sequential series of operations as they occurred on the source.5) Administrator Guide 128 . but this shows you the required syntax for routing data to a SQL or XML file.  l host is the name of the target system.SID     src_owner. create a SharePlex configuration file that specifies capture and routing information. This chapter guides you through the configuration process to support replication to this target.parts !file sysprod SharePlex 8. Use if either component is different from that of the source table. The structure that is required in a configuration file varies.table !file[:tgt_owner.table is the owner and name of the source table. Datasource:o.6. datatypes and operations that are supported when using SharePlex to replicate to a SQL or XML file.  l !file is a required keyword that directs Post to write to a file. see the SharePlex Release Notes. Datasource:o. Configure SharePlex on the source On the source.  l tgt_owner.  l src_owner. Source configuration example: The following example replicates the parts table in schema PROD from Oracle instance ora112 to a file on target system sysprod. which can then be posted in sequential order to a target database or consumed by an external process or program. see Create configuration files.table is optional and specifies the owner and name of the target table. NOTE: For the platforms.table] host where:  l SID is the Oracle SID of the source Oracle database.ora112 PROD. depending on your replication strategy.

Configure SharePlex on the target To output data in XML format By default. NOTE: Use all lower-case characters. property. use the following target command. View and change target settings To view current property settings for output to a file. and value are shown in the following table.  2.  3. with other optional properties that you can set.000 records=number records file max_ Maximum size of the file. target x. measured by the number of 50. SharePlex formats data that it writes to a file in XML format. you can change the file and data properties only. Start sp_ctrl.file show To change a setting.6 (8.5) Administrator Guide 129 . in number of characters 132 SharePlex 8.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.6. Issue the following required target commands to output the records in SQL. target x. Start sp_cop. use the following command: target x.file [queue queuename] set [category] property=value where: category. Table 11: File target properties Category Property Input value Default file location Path name under the SharePlex variable-data opx =pathname directory where you want the file to be created file max_ Maximum size of the file. These properties are described in View and change target settings.) To output data in SQL format  1. measured in megabytes 50 size=megabytes file max_ Maximum number of seconds to wait before switching 300 time=seconds files file record_ Maximum size of a record. NOTE: For XML output. and you do not need to run target setup unless you want to change properties of the output file (see View and change target settings.

6. (period) =character data enotation Exponential notation 14 =notation data record={SQL | Format of the output records. column name_ delimiter names delimiter=character =character sql record_ Character that terminates the SQL record_ terminator terminator=character =character Command examples This sets the record format to SQL for a post process with a named queue of myqueue1. target x.5) Administrator Guide 130 . either SQL or XML xml XML} data timestamp Timestamp format yyyy-MM- =format ddTHH:mm:ss.file queue myqueue1 set format record=sql This sets the maximum file size to contain no more than 320 records.ffffffffff sql add_rownum= yes to include or no to exclude row numbers add_rownum={yes | {yes | no} no} sql begin_ yes to include or no to exclude begin transaction begin_transaction= transaction={yes records {yes | no} | no} sql comment Character that marks a comment comment=character =character sql concatenate Character that concatenates strings concatenate =character =character sql end_ yes to include or no to exclude end transaction end_transaction={yes transaction={yes records | no} | no} sql legacy={yes | no} Required in SharePlex 8.file queue myqueue1 set file max_size = 320 SharePlex 8.FFFFFF(yes/no) sql name_ Character that delimits SID. table.6 (8. Category Property Input value Default length=number data date=format Date format yyyy-MM- ddTHH:mm:ss data decimal Decimal character . owner.6. target x. Use legacy SQL date and legacy={yes | no} timestamp formatting of: MMDDYYYYHH24MISS and MMDDYYYYHH24MISS.

'08132066000000'. ORA_TIMESTAMP_LTZ) VALUES('22345'.0" encoding="UTF-8" ?> <?opentarget version="1. The template XML represents all possible attributes and elements. COMMIT. ORA_TIMESTAMP_TZ.sql -. ORA_RAW. ORA_DATE. it first writes a schema record for that table. INSERT INTO "ROBIN". ORA_FLOAT. ORA_ROWID. ORA_VARCHAR2. ORA_TIMESTAMP.6 (8.EOF 0000000009 About the XML The XML format is separated into operation and schema "types" for easier consumption. schema records are written again.00000'. and then a new schema record is written.About the SQL Every transaction in a SQL-formatted file is headed by a comment that includes the transaction sequence within the SQL file and a unique transaction ID. the following is a SQL file with one transaction. The file has nine lines. A schema record is written only once for each table during a Post run. For example. 'Variable data' . '0123456789ABCDEF' ."TEST_TYPES" WHERE ORA_NUMBER = '22345' AND ROWNUM = 1. -. '10201998021300."TEST_TYPES" (ORA_NUMBER. '06172002080000. 'AAAAAAAAAAAAAAAAAA'. In this example the transaction id is 2-113319.00000'). 'Character '.6. the first time that Post writes a change record for any given table.22000'. '12350'. once for each table as Post receives a change record for it. unless there is a change to that schema. The individual XML represents the bare minimum output for each supported operation. A comment line at the end of the SQL file has the number of lines in the file. Schema record template <?xml version="1.0000000001 2-113319 03052014140813 03052014140813 DELETE FROM "ROBIN". Each schema record contains the table name and details of interest for each columns. /installed/vardir> cat opx/0000000010_20140305140820_legacy. If Post stops and starts. After startup. They are actually the same when viewed from an XSD perspective and are not distinct types.5) Administrator Guide 131 .0" ?> <opentarget> <txn id="xs:integer" oracleTxnId="xs:string" commitTime="xs:dateTimeStamp" /> <tbl name="xs:string" utcOffset="xs:integer" <cmd ops="schema"> <schema> SharePlex 8. ORA_CHAR. '06172002160000.

For a schema. the value is schema.5) Administrator Guide 132 . schema   Column metadata col   Metadata for a column (One of these elements appears for every record in the table.)   ops Type of record generated for this table.0" encoding="UTF-8" ?> <?opentarget version="1.6 (8. there are no operations. false)   nullable Nullable flag   length Length of the column Operation record template <?xml version="1. <col name="xs:string" xmlType="xs:string" key="xs:boolean" nullable="xs:boolean" length="xs:integer" /> </schema> </cmd> </tbl> </opentarget> Table 12: Explanation of schema template (* = optional) Element Attribute Description txn   Transaction metadata   id ID of current transaction   oracleTxnId Oracle transaction ID *   commitTime Transaction commit timestamp * tbl   Table metadata   name Fully qualified name of the table   utcOffset UTC offset in the log cmd   Operation metadata (In the case of a schema.)   name Name of the column   xmlType XML data type   key Key flag (true.1" ?> <opentarget> SharePlex 8.6.

truncate) row   Metadata of the row that changed in the operation   id Oracle ROWID col   Change data for a column (One of these elements appears for every changed column in the operation.5) Administrator Guide 133 .6.6 (8. delete. <txn id="xs:integer" msgIdx="xs:integer" msgTot="xs:integer" oracleTxnId="xs:string" commitTime="xs:dateTimeStamp" userId="xs:string" /> <tbl name="xs:string" <cmd ops="xs:string"> <row id="xs:string"> <col name="xs:string"></col> <lkup> <col name="xs:string"></col> </lkup> </row> </cmd> </tbl> </opentarget> Table 13: Explanation of operation template (* = optional) Element Attribute Description txn   Transaction metadata for the operation   id ID of current transaction   msgIdx Index of current record in the transaction   msgTot* Total number of messages in transaction   oracleTxnId Oracle transaction ID. taken from the System Change Number (SCN) *   commitTime Transaction commit timestamp *   userId * User ID that performed the operation tble   Table metadata   name Fully qualified table name cmd   Operation metadata   ops Operation type (insert. update.)   name Column name with the after value for that column lkup   Before image for use in update and delete operations SharePlex 8.

6. delete products where product_id=230117. Schema record <?xml version="1.1"?> <opentarget> <txn id="2218316945" commitTime="2014-10-10T13:18:43" userId="85" oracleTxnId="3. Supported datatypes See the SharePlex Release Notes for a chart that shows how Oracle datatypes are converted to XML. 4099).PRODUCTS" utcOffset="-5:00"> <cmd ops="schema"> <schema> <col name="PRODUCT_ID" xmlType="decimal" key="true" nullable="false" length="22" /> <col name="DESCRIPTION" xmlType="string" key="false" nullable="true" length="600" /> <col name="PRICE" xmlType="decimal" key="false" nullable="true" length="22" /> </schema> </cmd> SharePlex 8. commit. ‘Hamsberry vintage tee. update products set price=3599 where product_id=230117 and price=4099. truncate table products.5) Administrator Guide 134 .0" encoding="UTF-8"?> <?opentarget version="1. Element Attribute Description col   Before image of column (One of these elements appears for every changed column in the operation. cherry’. SQL> desc products Name Null? Type PRODUCT_ID NOT NULL NUMBER DESCRIPTION VARCHAR2(600) PRICE NUMBER Source DML operations insert into products values (230117.1339425" /> <tbl name="MFG.)   name Column name with the before value or the key value (depending on the operation) for that column NOTE: The id and msgIdx attributes together uniquely identify an operation.6 (8. Sample XML records Source table This is the table for which the sample operations are generated. commit.10. commit.

1339425" /> <tbl name="MFG.23.6.PRODUCTS"> <cmd ops="del"> <row id="AAAmDbAAEAAApRrAAA"> <lkup> <col name="PRODUCT_ID">230117</col> SharePlex 8.0" encoding="UTF-8"?> <?opentarget version="1.1"?> <opentarget> <txn id="2218318728" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:19:12" userId="85" oracleTxnId="1. cherry</col> <col name="PRICE">4099</col> </row> </cmd> </tbl> </opentarget> Update record <?xml version="1.1"?> <opentarget> <txn id="2218316945" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:18:43" userId="85" oracleTxnId="3.970754" /> <tbl name="MFG.6 (8.1391276" /> <tbl name="MFG.PRODUCTS"> <cmd ops="ins"> <row id="AAAmDbAAEAAApRrAAA"> <col name="PRODUCT_ID">230117</col> <col name="DESCRIPTION">Hamsberry vintage tee.0" encoding="UTF-8"?> <?opentarget version="1.0" encoding="UTF-8"?> <?opentarget version="1.1"?> <opentarget> <txn id="2218319446" msgIdx="1" msgTot="1" commitTime="2014-10-10T13:19:25" userId="85" oracleTxnId="5.17.PRODUCTS"> <cmd ops="upd"> <row id="AAAmDbAAEAAApRrAAA"> <col name="PRICE">3599</col> <lkup> <col name="PRODUCT_ID">230117</col> <col name="PRICE">4099</col> </lkup> </row> </cmd> </tbl> </opentarget> Delete record <?xml version="1.</tbl> </opentarget> Insert record <?xml version="1.10.5) Administrator Guide 135 .

and an incrementing ID. max_size and max_time parameters to determine the point at which to start a new active file. Post moves the processed data to a sequenced file in the opx subdirectory of the variable-data directory.sql 0000000002_20140305131212_legacy.PRODUCTS"> <cmd ops="trunc" /> </tbl> </opentarget> File storage and aging Post writes to a series of files.XML 0000000001_20140305131130_prodsys.XML SharePlex 8. Post uses the max_records.939801" /> <tbl name="MFG.0" encoding="UTF-8"?> <?opentarget version="1.sql 0000000003_20140305133835_legacy. The active working file is prepended with the label of current_ and is stored in the opx/current subdirectory of the variable-data directory. The file names include the name of the post queue. the time and date.6.5) Administrator Guide 136 .1"?> <opentarget> <txn id="2218319938" commitTime="1988-01-01T00:00:00" userId="85" oracleTxnId="11.6 (8.sql XML current_prodsys.XML     IMPORTANT: Do not open or edit the current_ file.sql 0000000004_20140305134028_legacy.</lkup> </row> </cmd> </tbl> </opentarget> Truncate record <?xml version="1.sql XML files: /installed/vardir> ls -1 opx 0000000000_20140305130858_prodsys.sql 0000000001_20140305131130_legacy.4. When this switch occurs. Output Format Name of Current File SQL current_legacy. SQL files: /installed/vardir> ls -1 opx 0000000000_20140305130858_legacy.

XML 0000000004_20140305134028_prodsys.5) Administrator Guide 137 . the switch occurs after Post processes a new record.XML To force a file switch The current file cannot be viewed or consumed without stopping Post. from which it can then be consumed or viewed.XML 0000000003_20140305133835_prodsys.file [queue queuename] switch SharePlex 8.6 (8. target x. To access the data in the current file.6. After issuing this command. you can use the target command with the switch option to move the data to a sequenced file.0000000002_20140305131212_prodsys.

8
Configure a replication strategy

This chapter contains instructions for configuring SharePlex to support different replication objectives.
Production implementations can vary widely from basic configurations with one source and target, to multiple
instances of SharePlex with named queues,multiple targets, partitioned data, and more.
It is difficult to foresee and document every possible way that an organization may want to deploy SharePlex.
The goal of this documentation is to present instructions for setting up the basic deployment types in a way
that is clear enough for you to be able to combine them and expand upon them to suit your needs. Additional
deployment assistance is available through our Professional Services organization.

Contents
Configure replication to share or distribute data
Confgure replication to maintain a central data store
Configure replication to maintain multiple peer databases
Configure replication through an intermediary system
Configure replication to maintain high availability

Configure replication to share or
distribute data
These instructions show you how to set up SharePlex for the purpose of sharing or distributing data from
one source system to one or more target systems. This strategy supports business requirements such as
the following:

 l reporting to support real-time decision making
 l data sharing to support research and transparency requirements
 l data integration throughout an enterprise
 l customer service inquiries and other query-intensive applications
 l data auditing and archiving

Supported targets
Oracle and Open Target

SharePlex 8.6 (8.6.5) Administrator Guide 138

Capabilities
This replication strategy supports the following:

 l Replication to one or more target systems
 l Replication between schemas or databases on the same system
 l Identical or different source and target names
 l Use of vertically partitioned replication
 l Use of horizontally partitioned replication
 l Use of named export and post queues

Requirements
 l Prepare the system, install SharePlex, and configure database accounts according to the instructions in
the SharePlex Installation Guide.
 l Prepare the environment for replication. See Prepare an Oracle environment for replication.
 l No DML or DDL should be performed on the target tables except by SharePlex. Tables on the target
system that are outside the replication configuration can have DML and DDL operations without affecting
replication.
 l If sequences are unnecessary on the target system, do not replicate them. It can slow down replication.
Even if a sequence is used to generate keys in a source table, the sequence values are part of the key
columns when the replicated rows are inserted on the target system. The sequence itself does not
have to be replicated.

IMPORTANT! These instructions assume you have a full understanding of SharePlex configuration files. They
use abbreviated representations of important syntax elements. See Create configuration files for more
information.

Conventions used in the syntax
In the configuration syntax in this topic, the placeholders represent the following:

 l source_specification[n] is the fully qualified name of a source object (owner.object) or a wildcarded
specification.
 l target_specification[n] is the fully qualified name of a target object or a wildcarded specification.
 l host is the name of a system where SharePlex runs. Different systems are identified by appending a
letter to the names, like hostB.
 l db is a database specification. The database specification consists of either o. or r. prepended to the
Oracle SID, tns_names alias, or database name, as appropriate for the connection type. A database
identifier is not required if the target is JMS, Kafka, or a file.

IMPORTANT!

 l See Create configuration files for more information about the components of a configuration file.

SharePlex 8.6 (8.6.5) Administrator Guide 139

Replicate within the local system
Replication on the same system supports the following configurations:

 l Within one Oracle instance, replicate to different tables within the same schema or to the same table
in different schemas.
 l Replicate to from an Oracle instance to any SharePlex-supported target on the same system.

On the Windows platform, SharePlex does not support replication between Oracle databases that reside on the
same system, but you can replicate to Open Target targets on the same system.

Configuration options

Datasource:o.SID    

source_specification1 target_specification1 hostA[@db]

source_specification2 target_specification2 hostA[@db]

Example
This example shows how you can replicate data to the same Oracle instance, to a different Oracle instance
(Unix and Linux only), and to different target types, all on the same local system.
Datasource:o.oraA    
hr.emp hr.emp2 hostA@o.oraA
hr.sal hr.sal2 hostA@o.oraB
fin.* fin.* hostA@r.mss
act.* !file hostA

Configuration when using SharePlex Manager
Replication from and to the same machine omits an Export process. However, SharePlex Manager expects an
export queue to exist. If using this configuration with SharePlex Manager, you must explicitly configure an
export queue as follows. The hostA* component in the routing map creates the export queue and an Export
process, which sends the data to an Import process, then the post queue.

Datasource:o.SID    

source_specification1 target_specification1 hostA*hostA[@db]

source_specification2 target_specification2 hostA*hostA[@db]

Replicate to a remote target system
Configuration options

Datasource:o.SID    

source_specification1 target_specification1 hostB[@db]

source_specification2 target_specification2 hostB[@db]

SharePlex 8.6 (8.6.5) Administrator Guide 140

Example
The last line in this example shows how you can replicate data to different target types on the same remote
target system.
Datasource:o.oraA    
hr.emp hr.emp2 hostB@o.oraB
hr.sal hr.sal2 hostB@o.oraB
fin.* !file hostB

Replicate to multiple target systems
This topology is known as broadcast replication. It provides the flexibility to distribute different data to
different target systems, or all of the data to all of the target systems, or any combination as needed. It
assumes the source system can make a direct connection to all of the target systems. All routing is handled
through one configuration file.
See also Configure replication through an intermediary system.

Configuration options

If the target specification is identical on all targets
If the target specification of a source object is identical on all target systems, you can use a compound routing
map, rather than type a separate entry for each route. See Create configuration files for more information
about target specifications.

Datasource:o.SID    

source_specification1 target_specification1 hostB[@db]+hostC[@db][+...]

source_specification2 target_specification2 hostC[@db]+hostD[@db][+...]

If the target specification is not identical on all targets
 l When the target specification of a source object is different on some or all target systems, you must use
a separate configuration entry to specify each one that is different.
 l You can use a compound routing map for routes where the target specifications are identical.

Datasource:o.SID    

source_specification1 target_specification1 hostB[@db]

source_specification1 target_specification2 hostC[@db]

Example
NOTE: This example does not cover all possible source-target combinations. The last entry in this example
shows the use of horizontally partitioned replication to distribute different data from the sales.accounts table
to different regional databases. See Configure horizontally partitioned replication.
Datasource:o.oraA    
hr.emp hr.emp2 hostB@o.oraB
hr.emp hr."Emp_3" hostC@r.mssB
hr.emp !jms hostX

SharePlex 8.6 (8.6.5) Administrator Guide 141

cust.% cust.% hostD@o.oraD+hostE@o.oraE
sales.accounts sales.accounts !regions

Confgure replication to maintain a
central data store
These instructions show you how to set up SharePlex for the purpose of consolidated replication: replicating
from multiple source systems to one central target system. This strategy supports business requirements such
as the following:

 l Real-time reporting and data analysis
 l The accumulation of big data into a central data store/mart or warehouse

Supported targets
Oracle and Open Target

Capabilities
This replication strategy supports the following:

 l Identical or different source and target names
 l Use of vertically partitioned replication
 l Use of horizontally partitioned replication
 l Use of named export and post queues

Requirements
 l Prepare the system, install SharePlex, and configure database accounts according to the instructions in
the SharePlex Installation Guide.
 l Prepare the environment for replication. See Prepare an Oracle environment for replication.
 l No DML or DDL should be performed on the target tables except by SharePlex. Tables on the target
system that are outside the replication configuration can have DML and DDL operations without affecting
replication.
 l Each source system must replicate a different set of data to the central target. If any source systems
replicate the same data to the central target system, it is considered to be active-active replication,
and conflict resolution routines must be used to determine which source "wins" when the same row is
updated from two different sources at the same time. To establish active-active replication, see
Configure replication to maintain multiple peer databases.
 l If sequences are unnecessary on the target system, do not replicate them. It can slow down replication.
Even if a sequence is used to generate keys in a source table, the sequence values are part of the key
columns when the replicated rows are inserted on the target system. The sequence itself does not
have to be replicated.

SharePlex 8.6 (8.6.5) Administrator Guide 142

Deployment options
You have two options for deploying SharePlex to replicate from many source systems to one target system.

 l Deploy with one instance of SharePlex on the target system
 l Deploy with multiple instances of SharePlex on the target system

In either deployment, if any source system cannot make a direct connection to the target system, you can use
cascading replication for that route to enable SharePlex to cascade the data an intermediary system that
allows connection to the target. See Configure replication through an intermediary system.
NOTE: The SharePlex compare and repair commands cannot be used in a cascading configuration.

Deploy with one instance of SharePlex on the
target system
You can use one instance of SharePlex to process all incoming data on the target. For each source system,
SharePlex creates an Import process on the central target system when replication starts. That, in turn,
creates post queues and Post processes for each source-target replication stream, all controlled by one sp_cop
process. You can control each source-target stream separately, but the post queues all share the same
SharePlex variable-data directory on the target system.
A deployment with a single variable-data directory has the following potential risks:

 l An event that interrupts processing to and from the disk that contains the variable-data directory will
affect all replication streams.
 l Any cleanup utilities that you use will affect all of the replication streams, because the cleanup is
performed across the entire variable-data directory.
 l A purge config command that is issued on one source system also deletes the data that is replicated
from the other source systems, because the purge affects the entire variable-data directory. The use of
named post queues eliminates this risk, but adds complexity to the naming, monitoring and
management of the SharePlex objects in the deployment.

To use this deployment
 l Install SharePlex in the normal manner, with one port number and one variable-data directory on each
system (sources and target).

SharePlex 8.6 (8.6.5) Administrator Guide 143

 l Make certain that when you install SharePlex, you create a database account for SharePlex for each
installation.
 l IMPORTANT! Use the same port number for SharePlex on all systems.

Deploy with multiple instances of SharePlex on the
target system
You can deploy multiple instances of SharePlex on the target, one for each source system. A SharePlex
instance is composed of the following elements:

 l A unique sp_cop process
 l A unique variable-data directory
 l A unique port number on which sp_cop runs
 l A unique database account that the processes of that instance use to interact with the database.

By running multiple, distinct instances of SharePlex, you can isolate each source-target replication stream from
the others. It enables you to:

 l Avoid contention problems that can occur if multiple processes must compete for access to the same
queues in a single variable-data directory.
 l Purge one configuration, or clean up and resynchronize one replication stream, while allowing the
others to continue processing data.
 l Place the variable-data directories on separate disks so that problems with one disk do not affect the
variable-data directories on the other disks.

To use this deployment
Install on the target system first, if possible. This enables you to establish a port number for each variable-data
directory, which you can then refer to when you set up SharePlex on the corresponding source system.

Steps on the target system
Select either of the options presented in Run multiple instances of SharePlex to establish independent
instances of SharePlex on the target. If you already installed SharePlex on the target and an original variable-

SharePlex 8.6 (8.6.5) Administrator Guide 144

oraC SharePlex 8.* hr.6. as appropriate for the connection type.oraC fin.oraA     cust.* hostC@o. you can change the port numbers as needed. The example shows data from datasource oraA on hostA and datasource oraB on hostB replicating to oraC on system hostC. Kafka or a file. Data from hostA Datasource:o.object) or a wildcarded specification.  l db is a database specification.data directory.  l target_specification is the fully qualified name of a target object (owner.* hostC@o.* mfg.oraA     hr. tns_names alias. prepended to the Oracle SID. If you already installed SharePlex on the source systems. database account. or r.object) or a wildcarded specification.oraC Data from hostB Datasource:o. Datasource:o. Example This example is an Oracle example. or database name. and then create additional instances on the target per those instructions.oraC mfg.* hr. as directed in the SharePlex Installation Guide.6 (8.  l source_specification is the fully qualified name of a source object (owner.* fin* hostC@o.  l central_host is the target system. This specification can also be a tns_alias if capturing from a RAC cluster or a PDB. Configuration Create a configuration file on each source system that replicates the objects from that system to the central target. The database specification consists of either o. A database identifier is not required if the target is JMS. See Set the SharePlex port number. but the target can be any supported SharePlex target.* hostC@o. For more information about creating a configuration file.5) Administrator Guide 145 . see Create configuration files. and port number exist. Match the port numbers of those instances to the port numbers of their associated target variable-data directories. you can dedicate that instance to one of the source systems.SID     source_specification target_specification central_host[@db] where:  l SID is the Oracle SID of the source Oracle database. Steps on the source systems Install one instance of SharePlex on each source system.

 3. If one of the databases is unavailable.5) Administrator Guide 146 . Create or alter the target table to include a column named SHAREPLEX_SOURCE_ID. By identifying rows in this manner.6 (8. Although similar in benefit to a high-availability strategy. This is the column that will contain the source ID value.  l Distribute heavy online transaction processing application (OLTP) loads among multiple points of access. before continuing further. This is known as peer-to-peer. the databases are usually mirror images of each other.  l Limit direct access to an important database. with all objects existing in their entirety on all systems. When users access the application from a web browser. This strategy supports the following business requirements:  l Maintain the availability of mission-critical data by operating multiple instances in different locations. the difference between the two is that peer-to-peer allows concurrent changes to the same data. or active-active. issue the target command with the set source option. This command sets the source ID that will be posted by that Post process. To configure each Post to write a source ID  1. NOTE: You can change this name by running the target command with the set metadata option. In this strategy. run sp_ctrl for each Post process. while still enabling users outside a firewall to make updates to their own copies of the data. while high availability permits changes to the secondary database only in the event that the primary database goes offline. replication. the server connects to a different available SharePlex 8.Recommended target configuration Each source system in a consolidated configuration sends a discrete data stream that flows to its own Post process on the target. An example of peer-to-peer replication is an e-commerce company with three identical databases. and then configure the Post process to include that identifier in each insert or update that it posts on the target. your environment is prepared to support the SharePlex compare and repair commands (which require a source ID) as well as any other work that may require the selection or identification of rows by their source. The compare and repair processes will use the source ID value to select only the rows that are valid for that source. The following example shows the command for three Post processes: sp_ctrl> target sys4 queue Q1 set source east sp_ctrl> target sys4 queue Q2 set source central sp_ctrl> target sys4 queue Q3 set source west Configure replication to maintain multiple peer databases These instructions show you how to set up SharePlex for the purpose of maintaining multiple databases where applications on each system can make changes to the same data.  2. On the target. Any single alphanumeric string is permitted. See the SharePlex Reference Guide for more information.6. For each Post process. You can assign a unique identifier of your choosing to each source system.  4. while SharePlex keeps all of the data synchronized through replication. the web server connects to any of those databases sequentially in a round-robin configuration. Choose a unique ID for each of the source systems.

Should the company need to produce business reports. but also as a means of distributing the load evenly among all the peers.6 (8. If tables with LOBs are included in replication the LOBs will be bypassed by conflict resolution. Peer-to-peer replication is not appropriate for all replication environments. SharePlex 8. unique keys.  l Prepare the environment for replication. NOTE: Data changes made in peer-to-peer replication are prevented from looping back from one machine to another because Capture ignores transactions performed on the local system by the Post process.table. Each key must uniquely identify the same owner.6.  l Enable archive logging on all systems.row among all of the databases that will be involved in replication. while SharePlex keeps them all current through replication.  l Column mapping and partitioned replication is not appropriate in a peer-to-peer configuration.database server. If a record is changed in more than one database at (or near) the same time. See additional requirements in this topic. Supported targets Oracle Capabilities This replication strategy supports the following:  l Use of named export and post queues This replication strategy does not support the following:  l Replication of LOBs. Overview In peer-to-peer replication.  l You must understand the concepts of synchronization as outlined in Understand the concept of synchronization.  l Enable supplemental logging for primary keys. It requires a major commitment to database design that might not be practical when packaged applications are in use.5) Administrator Guide 147 . It also requires the development of conflict resolution routines to prioritize which transaction SharePlex posts to any given database if there are multiple changes to the same data at or near the same time. Requirements  l Every table involved in peer-to-peer replication must have a primary key or a unique key with no nullable columns. Thus the configuration serves not only as a failover resource. conflicts can occur. user access to one of the databases can be stopped temporarily. usually on different systems. and conflict-resolution logic must be applied to resolve the discrepancy. See Prepare an Oracle environment for replication. DML changes are allowed on copies of the same tables in different databases. and that database can be used to run the reports. and foreign keys on all databases in the peer-to-peer configuration. causing the potential for data to be out of synchronization.

Post considers this an out-of- sync condition. NOTE: You can configure Post so that it returns an out-of-sync message if the current values in the target row match the after values of the UPDATE.employee_source jane. In the examples. NOTE: You can configure Post so that it does not consider non-key values when posting an INSERT.  l Post applies a replicated UPDATE but either cannot find a row in the target with the same key value as the one in the UPDATE or Post finds the correct row but the row values do not match the before values in the UPDATE. it includes only the key value in its WHERE clause. SocSec number(11) not null. Job char(10).6. You can predict that out-of-sync (conflict) situations will occur when a DML statement constructed by SharePlex fails to execute on a row in the target table because of the following reasons:  l Post applies a replicated INSERT but a row with the same key already exists in the target.employee_backup The column names and definitions are identical: EmpNo number(4) not null. Post considers the rows to be in-sync and discards the operation. What causes a conflict in peer-to-peer replication? To understand how SharePlex determines a conflict.  o If the values in the target row do not match the before or after values of the UPDATE. three systems (SysA. but Post cannot locate the target row by using the key.  l A DELETE is performed on the source data. See the SP_OPO_SUPPRESSED_OOS parameter in the SharePlex Reference Guide. Dept number(2) The values for both tables in a synchronized state are: SharePlex 8. Post considers the rows to be in-sync and discards the operation.  o If any of the values are different from those of the INSERT. See the SP_OPO_SUPPRESSED_OOS parameter in the SharePlex Reference Guide. Post applies the following logic:  o If all of the current values in the target row are the same as the INSERT values.2).6 (8. When Post constructs its DELETE statement. EmpName char(30). refer to the following examples of normal and conflict situations.What is a conflict? A conflict is defined as an out-of-sync condition — source and target tables are not identical. SysB and SysC) are used. Post applies the following logic:  o If the current values in the target row match the after values of the UPDATE.5) Administrator Guide 148 . The following tables are used in the example: Scott. Post considers this an out-of-sync condition. Salary number(7.

or when a row that needs to be changed already was changed.  2. SharePlex generates an out-of-sync error. At 11:05 that morning. where EmpNo is 1. Deployment To deploy peer-to-peer replication. it expects the value of the column to be 3. UserB on SysB updates the value of Dept to 2. before the network is restored. When SharePlex attempts to post the change from UserB to SysA. When SharePlex attempts to post the changes made by UserA and User B to the database on SysC.  3. At 9:00 in the morning. At 11:02 that morning. UserA on SysA updates the value of Dept to 1.6 (8. Because the pre-images do not match. At 11:00 in the morning. where EmpNo is 1. perform the following tasks:  1.5) Administrator Guide 149 .  2. SharePlex replicates that change to SysA and SysC.  5. When SharePlex attempts to post the change from UserA to the database on SysB. Make any recommended alterations. EmpNo (key) SocSec EmpName Job Salary Dept 1 111-22-3333 Mary Smith Manager 50000 1 2 111-33-4444 John Doe Data Entry 20000 2 3 000-11-2222 Mike Jones Assistant 30000 3 4 000-44-7777 Dave Brown Manager 45000 3 Example of peer-to-peer replication without a conflict  1. NOTE: See Appendix A: Peer-To-Peer Diagram in the appendixes for a visual representation of this scenario. UserA on SysA changes the value of the Dept column to 2. and the databases are still synchronized. Captured changes rest in the export queues on all systems. SharePlex generates an out- of-sync error.  3. but the value is 1 because of the change made by UserA. SharePlex 8.  4. Replication data transmission resumes. At 9:30 that same morning. Develop conflict resolution routines that direct the action of the Post process when there is a conflict because Post cannot locate a row. it expects the value in the Dept column to be 3 (the pre-image). The network is restored at 11:10 that morning.6. Evaluate the data for suitability to a peer-to-peer environment. where EmpNo is 1. the network fails. SharePlex generates an out-of-sync error. and both databases remain synchronized. UserB on SysB changes the value of Dept to 3. where EmpNo is 1.  2. SharePlex replicates that change to SysB and SysC. Now the row looks like this: EmpNo (key) SocSec EmpName Job Salary Dept 1 111-22-3333 Mary Smith Manager 50000 3 Example of peer-to-peer replication with an UPDATE conflict  1. Configure replication so that data from each system replicates to all other systems in the peer-to-peer environment. both of those statements fail because the pre-images do not match. but the value is 2 because of the change made by UserB.

6 (8. so there are no unique key violations on the replicated INSERTs. meaning:  l it must use the same column(s) in each corresponding table in all databases. there must be no chance for the same range of values to be generated on any other system in the peer-to-peer configuration. Sequences SharePlex does not support peer-to-peer replication of sequences. the primary key value cannot be changed. you can convert that key to a primary key. each with a different key. Evaluate the data To successfully deploy SharePlex in a peer-to-peer configuration. and you know all rows are unique. and so that there will be a conflict if a replicated operation would violate uniqueness. SharePlex refers to this file to determine the correct procedure to use when a conflict occurs.SID. For example. The primary key must be unique among all of the databases in the peer-to-peer replication network. you must be able to:  l isolate keys  l prevent changes to keys  l control sequence generation  l control trigger usage  l eliminate cascading deletes  l designate a trusted host  l define priorities These requirements must be considered during the architectural phase of the project. not-NULL key. If you cannot assign a primary key. so that there is enough information to ensure uniqueness and ensure a conflict that can then be resolved through resolution logic. data integrity is compromised because there are now two entries for “Jane Wilson” in the databases. LONG columns cannot be part of the key.6. you can create a unique index on all tables. You can use a sequence server or you can maintain sequences SharePlex 8.  4. The primary key must be created to contain enough information about a row so there can be no question about the uniqueness of that row. The solution is to include other unique columns in the key.” UserB gets the next sequence value on SysB and also inserts a row for “Jane Wilson.  l key columns for corresponding rows must have the same values. Suppose UserA gets the next sequence value on SysA and inserts a row for “Jane Wilson. If a table has no primary key but has a unique. Additionally.5) Administrator Guide 150 . suppose the sample table uses sequences to generate values for key column EmpNo. If the application uses sequences to generate all or part of a key. List the routines in conflict_resolution. Using only a sequence as the primary key probably will not suffice for peer-to-peer replication. because they demand cooperation with the application. Keys The only acceptable key in peer-to-peer replication is a primary key. many packaged applications are not suitable for a peer-to- peer deployment because they were not created within those guidelines.” Even if the sequence numbers are different on each system. Subsequent UPDATEs will fail. Consequently. Following are more detailed explanations of each of the requirements.

To handle triggers in a peer-to-peer configuration. Dell recommends using n+1 sequence generation (where n = the number of systems in replication). If the same triggers fire on the target system.6 (8. but alter them to ignore the SharePlex user on all instances in the peer-to-peer configuration. Depending on the type of application.  l Keep them enabled. The following example of an online bookseller explains the reason why. SharePlex provides the sp_add_trigger. ON DELETE CASCADE constraints ON DELETE CASCADE constraints can remain enabled on all instances in the peer-to-peer replication configuration. you can add a location identifier such as the system name to the sequence value in the primary key to enforce uniqueness. For more information about triggers and this script.separately on each server and make sure you partition a unique range to each one. Book_ID (primary key) Quantity Suppose the following sequence of events takes place:  1. you can do either of the following:  l Disable the triggers.6. it determines that the pre-image (100 books) on the first system does not match the expected value on the second system (it is now 98 as a result of the second transaction). another customer buys two copies of the same book on another server (UPDATE inventory SET quantity = 98 WHERE book_ID = 51295). SharePlex 8. The quantity on hand reduces from 100 books to 99. but how would the correct value be determined? The correct value in both databases after the two transactions should be 97 books. but no matter which of the two UPDATE statements is accepted. the result is incorrect. This script puts a WHEN clause into the procedural statement of the trigger that tells it to ignore the Post process.  2. A conflict resolution procedure could be written. Before the original UPDATE arrives.5) Administrator Guide 151 . such as inventory or account balances. Triggers DML changes resulting from triggers firing on a source system enter the redo log and are replicated to the target system by SharePlex. they return out-of-sync errors. but you must set the following parameters to direct Post to ignore those constraints:  l SP_OPO_DEPENDENCY_CHECK parameter to 2  l SP_OCT_REDUCED_KEY parameter to 0  l SP_OPO_REDUCED_KEY parameter to 0 (although in other replication scenarios this parameter can be set to different levels. When the Post process attempts to post the first transaction. it must be set to 0 in a peer-to-peer configuration) Balance values maintained by using UPDATEs Applications that use UPDATE statements to record changes in quantity. The bookseller’s Inventory table contains the following columns.sql script for this purpose. (UPDATE inventory SET quantity = 99 WHERE book_ID = 51295).  3. A customer buys a book through the database on one server. pose a challenge for peer-to-peer replication. Post returns an out-of-sync error. SharePlex replicates that UPDATE statement to the other server. see Set up Oracle database objects for replication. and the quantity on that server reduces from 100 books to 98.

update existing_row set balance = existing_row. as do UPDATE statements. if the quantity value of the existing row in the target database (98) does not equal the old value (pre-image of 100). in the case of the preceding online bookseller example. The UPDATE statement on this system also results in a value of 97.6 (8.balance <> old. the replicated value of 1250 is subtracted from the old balance of 1500 to get the net change of 250. If your application must use UPDATE statements.. the only remaining conflict potential is on fact data — which change to accept when the values for the same column in the same row differ on two or more systems.new. the net effect of depositing $500 and withdrawing $250.quantity . INSERT statements do not require a before-and-after comparison with a WHERE clause. your application must be able to SharePlex 8.quantity then old. Then.SET balance=$2000 WHERE account_number=51295). update existing_row set quantity = existing_row. when the first customer’s purchase is replicated to the second system.. there is a conflict.(-500) = 1750.new. Priority When the environment is established to avoid or resolve conflict when SharePlex searches for the correct row to change. the net change (pre-image of 100 minus the new value of 98) is 2. The following example illustrates this concept using an account balance within a financial record: account_number (primary key) balance  1. which is 99 (the existing row value after the first customer’s purchase) minus the net change of 2.  2.For this reason. The UPDATE statement subtracts that value from the existing balance of 2000 to get the correct value of 1750.. Suppose a row (an account) in the example table has a balance of $1500 on SysA. you can use INSERT statements (INSERT into inventory values “n”. the routine directs SharePlex to subtract the new (replicated) balance of 2000 from the old balance of 1500 for a net change of -500. If you can use a debit/credit method of maintaining balances. The change is replicated to SysB as an UPDATE statement (such as UPDATE. When the second user’s change is replicated to the first system. the following conflict resolution procedure fires: if existing_row. On SysB. the same conflict resolution procedure fires. For this. and the application updates the database on that system to $1250. The conflict resolution logic tells SharePlex that.6. issue an UPDATE statement that sets the Quantity column to 98-1. which equals 97. Before the change arrives. CustomerA’s spouse makes a withdrawal of $250 on SysB.quantity <> old. The UPDATE statement sets the balance value to 1250 .5) Administrator Guide 152 .balance = balance_change. peer-to-peer replication is not recommended for applications maintaining account or inventory balances using UPDATEs. the correct value.quantity = quantity_change.balance then old. On SysA. For example. you can write a conflict resolution procedure to determine the absolute (or net) change resulting from different UPDATE statements on different systems.. The result of this procedure would be to update the account balance to $1750. When CustomerA’s transaction arrives from SysA and Post attempts to post it to SysB. For example: if existing_row.quantity_change.) instead of UPDATE statements.quantity . The result of this procedure’s logic is that the Quantity columns on each system are updated to 97 books. CustomerA makes a deposit of $500 on that system. You can write a conflict resolution routine to accommodate this kind of transaction by calculating the absolute (or net) change in the account. the net effect of selling three books. then subtract the new value (the replicated value of 99) from the pre-image to get the net change (1)..balance . The application uses an UPDATE statement to change the balance to $2000.balance_change. then using that value to resolve the conflict. but the pre-image on the target is $1250 because of the spouse’s transaction — not a match. In this case.balance . since the pre-image from the source system is $1500.

with source being the name of the local system for the table. changes on the server at corporate headquarters could take priority over the same changes made by a branch office. Timestamp It is recommended that you include a timestamp column in the tables and assign priority in the conflict resolution routine to the earliest or latest timestamp. The default date format for SharePlex conflict resolution is MMDDYYYY HH24MISS. The following explains how those columns play a vital role when using a conflict resolution routine to establish priority. This documentation assumes three systems. but there can be more. Tables on servers in different time zones can use Greenwich Mean Time (GMT).  l hostB is the second system.object is the fully qualified name of an object on hostB or a wildcarded specification. or conflict resolution will return errors.6. Trusted source You must assign a particular database or server to be the prevailing.  l ownerC.object is the fully qualified name of an object on hostA or a wildcarded specification. SharePlex cannot locate rows if a key value changes — and the key value will change if one of the columns is a timestamp.accept the addition of timestamp and source columns. ALTER SESSION SET nls_date_format = 'MMDDYYYYHH24MISS' Configure replication The configuration files on the systems in a peer-to-peer configuration are identical with the exception of the datasource specification and the routing.  l ownerA.  l hostC is the third system.object is the fully qualified name of an object on hostC or a wildcarded specification. For timestamp priority to work. Tables with default dates must use that format. you must make sure all of the servers involved agree on the date and time. source for two reasons:  l The conflict resolution routine has the potential to get quite large and complex the more systems you have. SharePlex 8.  l ownerB. use the following command to change the date format in SQL*Plus. or trusted. the placeholders represent the following items in the environment. One of the systems in the configuration must be considered the true source from which all other systems will be resynchronized if necessary.5) Administrator Guide 153 .6 (8. or it will cause conflicts.  l hostA is the first system. For example. the timestamp must not be part of a key. There are bound to be failures that require resynchronization at some point. Before creating a table with a default date.  l oraA is the Oracle instance on hostA. However. Conventions used in the syntax In the configuration syntax in this topic.  l You can write your conflict resolution routines so that operations from the trusted source system take priority over conflicting operations from other systems.

6.object ownerA.object ownerC.object hostB@o.object hostC@o.oraA ownerC.object hostB@o. For example.emp hr.emp hostB@o.oraC Note: If all owner names and table names are the same on all systems.oraB     ownerB.oraA ownerB. IMPORTANT!  l See Create configuration files for more information about the components of a configuration file.object hostA@o. you can use a compound routing map for each of these configuration files.% cust.object hostA@o.object hostC@o.oraC ownerB.oraB+hostC@o.object hostA@o.oraC ownerA.oraA ownerC.oraB cust.object ownerA.oraA     hr.object ownerA. the compound routing for replication from hostA is as follows: Datasource:o.sal hostB@o.oraB ownerA.object ownerB.object ownerA.5) Administrator Guide 154 .  l oraB is the Oracle instance on hostB.oraB ownerA.object hostA@o.oraB SharePlex 8. Configuration on hostA Datasource:o.object hostB@o.object hostB@o.object hostC@o.  l oraC is the Oracle instance on hostC.6 (8.object hostB@o.oraA     ownerA.oraB Example Datasource:o.object hostC@o.object ownerB.object ownerB.object ownerC.oraB ownerC.oraC Configuration on hostB Datasource:o.oraC     ownerC.object owner.oraC Configuration on hostC Datasource:o.oraA     owner.object ownerB.object ownerC.sal hr.oraB hr.% hostB@o.object ownerC.oraA ownerB.

Check the Event Log frequently to monitor for out-of-sync warnings by using the show log command in sp_ctrl.5) Administrator Guide 155 . understand the following guidelines:  l The same PL/SQL package is used for both generic conflict resolution and transformation (its name is sp_ cr). Business rules vary widely from company to company. Use either generic conflict resolution or transformation for a table.6 (8. If failed attempts at conflict resolution are not resolved. but not both. you can view a sample generic conflict resolution routine by viewing the od_employee_gen routine that was installed in the database used for the demonstration. SharePlex does not stop for out-of-sync conditions. see Transform data. but do not use them as your own routines.  l Updates are occasionally made to the conflict resolution logic. See the SharePlex Reference Guide for more information about show log and other SharePlex commands. NOTE: If you ran the SharePlex conflict resolution demonstration in the SharePlex Installation Guide. the databases can become more and more out of synchronization. For more information about transformation.  l Packaged routines that perform basic conflict resolution based on a key or column value.  l By default. which can be used as a backup measure in case the custom routines fail.  l Any table to be accessed through PL/SQL for conflict resolution requires implicitly granted privileges from the owner of the object to SharePlex. If appropriate. It is good practice to write more than one procedure. such as making site or system priority the primary routine and timestamp a secondary routine.  l Test your conflict resolution routines before you put them into production to make sure they work as intended. How to write a routine using the SharePlex generic interface SharePlex provides a generic conflict resolution PL/SQL package that can be used to pass information to and from the procedural routines that you write. examples and templates to assist you. Transformed tables cannot be compared by SharePlex and conflict resolution cannot succeed. IMPORTANT!  l This documentation provides guidelines. SharePlex 8.  l Conflict resolution does not support changes to LONG or LOB columns. Before you get started. SharePlex provides the following tools that can be used as a basis for your routines:  l A generic PL/SQL interface that you can use to write basic routines based on DML operation types. so it is impossible to create a standard set of conflict resolution rules and syntax that apply in every situation.  l Conflict resolution cannot be used for DDL changes.6. you can use generic conflict resolution and transformation for different tables in the same configuration. SharePlex only calls the transformation routine. If both are used. SharePlex invokes one routine after another until one succeeds or there are no more procedures available. so refer to the Release Notes and documentation for your version of SharePlex for any additional information that augments or supersedes these instructions. you write PL/SQL procedures that direct the action of SharePlex when a conflict occurs. You will probably need to write your own routines. See How to use use the SharePlex prepared routines.Develop conflict resolution routines To create conflict resolution routines. See How to write a routine using the SharePlex generic interface. and to make sure that one routine does not counteract another one.

for example ‘123456’. Windows Registry or V$PARAMETER table. col_values insplex. "target_rowid VARCHAR2(20). source_rowid The row ID of the source row. It is case-sensitive and is passed in the same case as in the oratab file. for example SysA . If there are named post queues in use on the target system. SharePlex 8.  l sp_cr is the name of the package that contains the PL/SQL record and table structures. "CREATE or REPLACE PACKAGE %s.row_typ.col_def_tabtyp) where:  l splex is the SharePlex schema. IN variables For each row operation that causes a conflict. Package definition SharePlex defines PL/SQL record and table structures in a public package named sp_cr in the SharePlex database schema. \n\t" "oracle_err NUMBER.  l col_def_type is the name of the PL/SQL table that stores column information (see col_def_type table). "source_table VARCHAR2(78). It is passed as a literal within single quotes. Variable Description src_host The name of the source system (where the operation occurred). src_ora_sid The ORACLE_SID of the source database. "src_ora_sid VARCHAR2(32).sp_cr.6. "src_ora_time VARCHAR2(20). for example postq1.Procedure interface Follow this template to create your procedure. "status NUMBER. "target_table VARCHAR2(78).  l row_typ is the name of the PL/SQL record that passes in/out variables (see Package definition). "reporting NUMBER "). The package uses the following parameters. "source_rowid VARCHAR2(20).6 (8.sp_cr. src_ora_time The timestamp of the change record in the source redo log. It is case-sensitive and is passed using the same case as on the source system. this variable consists of the name of the post queue. SharePlex passes this metadata information to your procedure.sp_cr AS "TYPE row_typ IS RECORD "(src_host VARCHAR2(32). "statement_type VARCHAR2(6). "action NUMBER.5) Administrator Guide 156 . (table_info in outsplex.

This value is case-sensitive and matches the way the table is named in the database. indicating whether the operation is an INSERT. If the row cannot be found using the PRIMARY key. U or D. You must specify a value for this parameter. UPDATE or DELETE statement. This is different. for example "scott"." oracle_err This is different. SharePlex does not write any log entries to the Event Log when conflict resolution succeeds. This variable is only used for conflict resolution. It is passed as a literal within single quotes. SharePlex obtains the row ID by querying the target database. SharePlex does not write any error messages to the Event Log when transformation succeeds. the action SharePlex takes depends on what you specified as the action variable.6."emp. It acts differently. depending on whether the procedure is used for conflict resolution or transformation.6 (8. In this case. expressed as owner. OUT variables These variables direct the action of SharePlex based on whether the procedure succeeded or failed). SharePlex 8. Conflict resolution: The Oracle error number that caused the conflict. for example "scott". depending on whether the procedure is being used for conflict resolution or transformation. It continues its processing by reading the next replicated operation in the post queue. the value is NULL. Variable Description target_rowid The row ID of the corresponding row in the target database.  l A value of 1 implies that the procedure was unsuccessful. either I." target_table The owner and name of the target table.  l Conflict resolution: A value of 0 directs SharePlex to proceed with the SQL statement. Variable Description status Defines whether or not the procedure succeeded. Transformation: SharePlex passes a value of 0 for this variable. It is passed within double quotes. action Defines the action that you want SharePlex to take. source_table The owner and name of the source table.table. statement_type A letter.  l (Transformation only) A value of 7 implies unsuccessful execution and instructs the Post process to stop.table. depending on whether the procedure is used for transformation or conflict resolution. It is passed within double quotes. expressed as owner.5) Administrator Guide 157 . This value is case-sensitive and matches the way the table is named in the database. for example ‘123456’.  l A value of 0 implies successful execution. Transformation: Post does not write any SQL."emp.

is_key boolean . col_def_type table SharePlex creates a col_def_tabtyp PL/SQL table for each replicated operation. You must specify a value for this parameter. type col_def_typ is record (column_name user_tab_columns.sql log and report an error to the Event Log. Your transformation routine is responsible for posting the results of the transformation either to the target table or another table. SharePlex writes column information to col_def_tabtyp.5) Administrator Guide 158 . Following is the datatype that is used to populate the col_def_tabtyp table.datatype%type .  l A value of 3 directs SharePlex to write the failed SQL statement to the SID_errlog. All fields are passed by SharePlex to your routine.new_value varchar2(32764) SharePlex 8.old_value varchar2(32764) . Variable Description Transformation: You must specify a value of 0 for this parameter.  l Values 1 and 2 are reserved for internal SharePlex use. which directs SharePlex NOT to post the SQL statement. Do not use them.  l The value of 1 is reserved for internal SharePlex use.sql log.is_changed boolean . You must specify a value for this parameter. Do not use it. The outcome of this action depends on what you specify for the reporting variable Conflict resolution: Specifies the action to take as a result of an unsuccessful conflict resolution procedure.6.  l A value of 0 directs SharePlex NOT to post the SQL statement. The outcome of this action depends on what you specify for the reporting variable. This table stores column information.6 (8.datatype user_tab_columns. SharePlex writes column information to col_def_type. if one exists.  l A value of 2 directs SharePlex to try the next conflict resolution procedure that you listed in the conflict resolution file.  l A value of 0 directs SharePlex NOT to report an error or write the failed SQL statement to the SID_errlog. reporting Determines how SharePlex reports unsuccessful procedural results. although not all will have values if SharePlex cannot locate the row.column_name%type .  l Transformation: For each row operation. It is different depending on whether the procedure is used for transformation or conflict resolution.  l Conflict resolution: For each row operation that causes a conflict.

SharePlex passes a value of FALSE. Example entries in col_def_tabtyp table per operation type The following tables illustrate the possible outcomes of each type of operation. is_changed is FALSE. If it is a key column. SharePlex passes a value of TRUE. is_changed Tells your procedure whether or not the column value has changed. This value is not case- sensitive. is_changed normally is FALSE.6. is_changed is TRUE for non-key columns. datatype Tells your procedure the datatype of the data in the replicated column. Conflict resolution only: This is the pre-image against which SharePlex compared the source and target columns as part of its synchronization check for UPDATEs and DELETEs. For key columns. This value is always in capital letters. Conflict resolution only: If a key value also was changed on the target system. for example emp_last_name. because the row did not exist in the target database before the INSERT. is_changed is TRUE for non-NULL values. but SharePlex will pass a value for a changed key column. and conflict resolution could fail.6 (8. If a NULL value is inserted. then there is a conflict. current_value Tells your procedure the current value of the column in the target table. This column is NULL for INSERTs.5) Administrator Guide 159 . is_key Tells your procedure whether or not the column is a key column. If SharePlex cannot locate the target row. If the column is not part of a key. because SharePlex replicates only the key values for a DELETE statement. the value is NULL . old_value Tells your procedure the old value of the replicated column. . type col_def_tabtyp is table of col_def_typ Description of col_def_tabtyp Column Description column_name Tells your procedure the name of the column that was replicated from the source table. If the column is not changed.current_value varchar2(32764) ). new_value Tells your procedure the new value of the replicated column.  l For UPDATEs.  l For INSERTs. SharePlex passes a value of FALSE. SharePlex will not be able to locate the correct row. for example VARCHAR2.  l For DELETEs. If it is changed. as changed on the source system. SharePlex 8. is_changed is always FALSE. If the old value passed by SharePlex does not match the current_value value obtained from the target row. SharePlex passes a value of TRUE. before it was changed on the source system. because none of the columns existed in the database.

it is because SharePlex cannot find the row by using the PRIMARY key and the pre-image.6. SharePlex returns the current value for the key column as well as the changed columns. 2 (Transformation) For an UPDATE. If SharePlex finds the row. If it cannot locate the row using just the PRIMARY key. It provides conflict resolution that relies solely on the key value of the changed row. then current_value is NULL DELETE operation column_name is_changed old_value new_value current_value1 is_key C1 FALSE bind NULL NULL TRUE 1 When a DELETE fails.5) Administrator Guide 160 . UPDATE operation column_name is_changed old_value new_value current_value1. If SharePlex cannot find the row by using just the PRIMARY key.INSERT operation column_name is_changed old_value new_value current_value1 is_key C1 TRUE NULL bind NULL FALSE C2 TRUE NULL bind NULL TRUE C3 FALSE NULL NULL NULL TRUE | FALSE 1 When an INSERT fails. it searches for the row using just the PRIMARY key. !UpdateUsingKeyOnly prepared routine !MostRecentRecord(column_name) prepared routine !UpdateUsingKeyOnly prepared routine SharePlex provides this prepared conflict resolution routine for UPDATE operations. it is because SharePlex could not find the row by using the PRIMARY key. it returns the current value for the key column as well as the changed columns. because the pre-images are different due to transformation. If the row cannot be found. Therefore. If it finds it. As an alternative. SharePlex cannot locate a row using the PRIMARY key and the pre-images. SharePlex 8. SharePlex returns a NULL. SharePlex searches for the row by using only the PRIMARY key. 2 is_key C1 TRUE bind bind NULL | target_value FALSE C2 FALSE bind NULL NULL | target_value TRUE C3 TRUE bind bind NULL | target_value TRUE 1 (Conflictresolution) When an UPDATE fails. How to use use the SharePlex prepared routines SharePlex provides the following optional prepared routines for use in conjunction with custom routines. it is because a row with the same PRIMARY key already exists in the target database. These options can be used with basic and generic conflict resolution formats. then SharePlex returns a NULL.6 (8. SharePlex does not return the current value for INSERTs. There are no limitations on column types with the following prepared procedures.

SID After you create the conflict resolution procedure(s).procedure_up_A owner.table1 u owner.SID file.table1 u owner. It must be typed exactly as shown in these instructions. where SID is the ORACLE_SID of the target instance. but with the understanding that it does not include logic that assigns priority.procedure_up_A owner.table1 u owner.SID.table1 during an UPDATE. in case of multiple concurrent UPDATEs. relying on !UpdateUsingKeyOnly as a final option if the custom routines fail. The !MostRecentRecord routine directs SharePlex to post data even though the pre-image value doesn't match.6 (8. the WHERE clause uses both the key and the pre-image of the columns that changed to ensure synchronization.table1 u !MostRecentRecord(C2) C2 is the column_name which is a TIMESTAMP datatype List the routines in conflict_resolution.table1 u !UpdateUsingKeyOnly The !UpdateUsingKeyOnly name is case sensitive. more specific routines. and in which order. See List the routines in conflict_resolution. Where to find the conflict resolution file A blank conflict_resolution. The following is an example of this routine specified in the conflict resolution file. If appropriate. this routine can be used as the sole routine for UPDATEs.Normally. when SharePlex builds a SQL statement to post data. IMPORTANT: !UpdateUsingKeyOnly must be the last entry in the list of routines.6.5) Administrator Guide 161 . The !UpdateUsingKeyOnly routine directs SharePlex to post the data even though the pre-image values do not match. the WHERE clause uses both the key and the pre-image of the columns that changed to ensure synchronization. !MostRecentRecord(column_name) prepared routine SharePlex provides this prepared conflict resolution routine for UPDATE and DELETE operations. If the value of the column_name sent over is greater than the target column_name value.table1 u !UpdateUsingKeyOnly owner. It provides conflict resolution based on the value of column_name. assuming the keys match. owner. SharePlex 8. It will make the change to the current row based on the comparison of the column_name specified.SID. Normally. Use the file on the target system. This routine can be used in a time based replication to resolve conflicts. Do not list an owner name with this routine in the configuration file. was included in the data sub-directory of the SharePlex variable-data directory when SharePlex was installed. when there is a conflict for owner. construct the conflict resolution file. For INSERT and DELETE operations. owner. This file tells SharePlex which procedures to use for which objects and operation types. thus assigning it last priority. To avoid out-of-sync errors. SharePlex calls the two custom routines first (in order of priority) and then calls the !UpdateUsingKeyOnly routine. with no spaces between words. Dell recommends using !UpdateUsingKeyOnly in conjunction with other.procedure_up_B owner. In the following example. custom logic must be used. it will apply the changes. See List the routines in conflict_resolution. such as system or time priority. when SharePlex builds a SQL statement to post data.

 l For scott. for example id or iud. the operation type specification.emp_cr2 like:scott% IUD scott. and the procedure specification. a procedure is called for UPDATEs before the other routines are used for all operations. (See Syntax rules)  l i| u | d is the type of operation that creates the conflict that is resolved with the specified procedure.sal_cr routine is used for the scott.object is the owner and name of a target object.emp_cr2 procedure for all tables meeting the search criteria. It must be named conflict_ resolution. How to make entries in the conflict resolution file Use the following template to link a procedure to one or more objects and operation types.SID.)  l You can use an underscore (_) to denote a single-character wildcard. (See the Example.  l You a comment line anywhere in the file.cust U scott.%\_corp\_ emp. Example conflict resolution file scott.sal_cr like:scott.emp_cr1 like:scott.  l The scott.procedure is the owner and name of the conflict resolution procedure that will handle the specified object and operation type.%\_corp\_emp IUD scott.If this file does not exist.emp_cr1 procedure is used for that table. SharePlex 8.sal IUD scott.sal table before the scott. If you are not using the LIKE operator.%\_corp\_emp IUD scott. If you list a table-specific procedure. SharePlex uses it before procedures that are specified with a wildcarded object name.  l You can use the LIKE operator and a SQL wildcard (%) to specify multiple objects by using a search string. For table names that contain an underscore character (for example emp_sal).6. You can specify any or all operation types. IMPORTANT! There can be only one conflict_resolution. the backslash escape character is not required if an object name contains an underscore. Note: the SID is case-sensitive.cust.emp_cr1 procedure is used before the scott. Upper or lower case are both valid.  l owner. and so forth. Syntax rules  l There must be at least one space between the object specification.emp_cr3 scott. SharePlex recognizes the backslash (\) as an escape character to denote the underscore as a literal and not a wildcard.sal_cr How it works:  l The scott.5) Administrator Guide 162 . Start a comment line with the pound symbol (#). or a wildcarded entry. for example: like:scott. where SID is the ORACLE_SID of the target instance.  l The order in which you list the procedures in the conflict resolution file determines their priority of use (in descending order). where:  l owner.6 (8. you can create one in ASCII format in an ASCII text editor.SID file per active configuration.

It must be typed in all capital letters. A prepared routine is used only if the custom routine fails.table1 take precedence.How to specify SharePlex prepared routines in the conflict resolution file To use the SharePlex prepared routines for all tables in the replication configuration. Cascading replication can be used to support various replication objectives as a workaround in such conditions as the following:  l Your replication strategy exceeds the 1024 routes that are allowed directly from a given source system: You can send data to the intermediary system and then broadcast to the additional targets from there.table1.5) Administrator Guide 163 . After you change the conflict resolution file. use the !DEFAULT parameter instead of specifying an owner and object name. and then from the intermediary system to one or more remote target systems. To use a cascading strategy. the !UpdateUsingKeyOnly procedure is used for UPDATEs and DELETEs for all tables. A custom routine takes priority over a SharePlex prepared routine. although the user-defined procedures listed for james.6.procedure_upd james. including james.table1 U james. !DEFAULT U !UpdateUsingKeyOnly !DEFAULT D !UpdateUsingKeyOnly james.procedure_del How to change the conflict resolution file while replication is active You can change the conflict resolution file any time during replication to add and remove tables and procedures.procedure_ins james.6 (8. although the ability to make a direct connection is not required. the source machine must be able to resolve the final target machine name(s). Configure replication through an intermediary system These instructions show you how to set up cascading replication.This stragegy replicates data from a source system to an intermediary system. In the following example. stop and re-start the Post process. You can cascade to a system that does allow remote connection from the source system. because of firewall restrictions or other factors.table1 I james. The !DEFAULT parameter is case-sensitive.  l The source has no direct connection to the ultimate target.table1 D james. also known as multi-tiered replication. Supported targets Oracle (intermediary system) Oracle and Open Target (final target) SharePlex 8. This is true regardless of the order in which the !DEFAULT-associated routine appears in the file.

Different systems are identified by appending a letter to the names.  l db is a database specification. or r. A database identifier is not required if the target is JMS.5) Administrator Guide 164 . The sequence itself does not have to be replicated.  l Prepare the environment for replication. Conventions used in the syntax In the configuration syntax in this topic. See Prepare an Oracle environment for replication. Even if a sequence is used to generate keys in a source table. or database name. prepended to the Oracle SID. tns_names alias.  l host is the name of a system where SharePlex runs. install SharePlex. IMPORTANT! Create the same SharePlex user on all systems if you will be using SharePlex to post to a database on the intermediary system. the placeholders represent the following:  l source_specification[n] is the fully qualified name of a source object (owner.Capabilities This replication strategy supports the following:  l Replication to one or more target systems  l Identical or different source and target names  l Use of vertically partitioned replication  l Use of horizontally partitioned replication  l Use of named export and post queues Requirements  l Prepare the system. IMPORTANT! These instructions assume you have a full understanding of SharePlex configuration files.6. do not replicate them.6 (8. the sequence values are part of the key columns when the replicated rows are inserted on the target system. SharePlex 8. or a file.  l Disable triggers that perform DML on the target objects. Tables on the target system that are outside the replication configuration can have DML and DDL operations without affecting replication.  l If sequences are unnecessary on the target system. See Create configuration files for more information. like hostB. They use abbreviated representations of important syntax elements.  l No DML or DDL should be performed on the target tables except by SharePlex.  l target_specification[n] is the fully qualified name of a target object or a wildcarded specification. Kafka. as appropriate for the connection type.object) or a wildcarded specification. It can slow down replication. The database specification consists of either o. and configure database accounts according to the instructions in the SharePlex Installation Guide. IMPORTANT!  l See Create configuration files for more information about the components of a configuration file.

 l DDL replication is not supported from an intermediary system to the target systems.5) Administrator Guide 165 . It passes the data directly from the source system to the target(s).6 (8.  l Triggers must be disabled in the intermediary database. queue.  l You create two configuration files: one on the source system. This is known as a pass-through configuration.  l SharePlex database accounts must exist on all systems and must be the same name on all systems. Cascade with posting on intermediate system To use this configuration:  l Oracle is the only supported database type for this purpose. See the SharePlexInstallation Guide for more information. you can configure SharePlex to import. SharePlex 8. This account is usually created when SharePlex is installed. you have the following options:  l If there is an Oracle database on the intermediary system. disable the SP_OCT_REPLICATE_DDL and SP_OCT_REPLICATE_ALL_DDL parameters. It is supported only from the source system to the intermediary system. To disable the replication of DDL on the intermediary system.Deployment options To cascade data.  l If there is not a database on the intermediary system.  l Enable archive logging on the source and intermediary systems in case the redo logs wrap before Capture is finished with them.6. There is no Capture process on the system. and one on the intermediary system. as well as on the target system. you can configure SharePlex to post to that database and then capture the data again to replicate it to one or more remote targets. and then export the data to one or more remote targets.

.sal hr. (The default is 0.] source_specification2 target_specification2 hostD[@db][+. hostB is the intermediary system.6 (8.SID Example on source system Datasource:o.6.accounts table to different regional databases. Datasource:o.oraB     hr. you could route data from other source objects directly to other targets.oraA     hr.sal2 hostD@o. issue the following command.emp2 hostC@o.Configuration options on source system This configuration replicates from the source system to the database on the intermediary system. The target can be any supported SharePlex target.% hostB@o. Just specify the appropriate routing on a separate line. The change takes effect the next time Capture starts. The tables that were the target tables in the source configuration are the source tables in this configuration. See Configure horizontally partitioned replication.oraB cust.) In sp_ctrl.% !cust_partitions NOTE: The last entry in this example shows the use of horizontally partitioned replication to distribute different data from the sales.. Configuration options on intermediary system This configuration captures the data from the database on the intermediary system.emp hr.emp hr. Required parameter setting on intermediary system Set the SP_OCT_REPLICATE_POSTER parameter to 1.] Example on intermediary system Datasource:o. NOTE: In this template.sal hr..SID source_specification2 target_specification2 hostB@o.oraC hr.5) Administrator Guide 166 . without cascading through the intermediary system. then replicates it to the target system(s). This instructs the Capture process on the intermediary system to capture the changes posted by SharePlex and replicate them to the target system.oraB NOTE: In this same configuration.sal2 hostB@o.SID     source_specification1 target_specification1 hostB@o.emp2 hostB@o. Datasource:o.oraD+hostE@r. meaning that Capture ignores Post activity on the same system.SID     source_specification1 target_specification1 hostC[@db][+.% cust.oraB hr.mssE cust. set param SP_OCT_REPLICATE_POSTER 1 SharePlex 8.% cust..

Cascade with pass-through on intermediary system To use this configuration:  l An Oracle instance must be installed on the intermediary system.oraD+hostE@o. hostB is the intermediary system. SharePlex operates as follows: SharePlex 8. which is on the source system.5) Administrator Guide 167 . The configuration on the secondary (standby) machine remains in an activated state with the Export process on that system stopped in readiness for failover if the primary machine fails..6 (8.oraC hr.  l You create one configuration file..  l If using a compound routing map where all data passes through the intermediary system first. and also through the intermediary system to another target. Configuration options on source system NOTE: In this template. This strategy uses bi-directional replication with two SharePlex configurations that are the reverse of each other. as in the third line of this configuration file."Emp_3" hostB*hostC@r.oraE Configure replication to maintain high availability These instructions show you how to set up SharePlex for the purpose of high availability: replicating to a secondary database that is a mirror of the source database.emp2 hostB*hostC@o. Example Datasource:o.  l DDL replication is not supported.SID     source_specification1 target_specification1 hostB*hostC[@db] source_specification2 target_specification2 hostB*hostD[@db][+hostB*hostE[@db][+.% cust.  l You can also use a compound routing map where data from a source object is replicated directly to one target.% hostB*hostD@o. The database can be empty.oraA     hr.6.] source_specification3 target_specification3 hostB*hostX[@db]+hostY[@db]  l The hostB*host syntax configures the pass-through behavior. and an ORACLE_SID must exist in the oratab file (Unix and Linux systems) or the Windows Registry.emp hr. This strategy supports business requirements such as the following:  l Disaster recovery  l Continuous operation of business applications throughout maintenance cycles or mechanical failures In this strategy.emp hr. make certain to use the hostB* component in each target route.mssB cust. Datasource:o.

 l All objects must exist in their entirety on both systems.  l Enable archive logging on all systems.  l Create a script that grants INSERT. Source and target objects can have different names but this makes the management of a high-availability structure more complicated. See Prepare an Oracle environment for replication.  l When the primary system or database is offline and users are transferred to the secondary system. NOTE: Column mapping and partitioned replication is not appropriate in a high availability configuration.6 (8. Supported targets Oracle Capabilities This replication strategy supports the use of named export and post queues.  l Prepare the environment for replication. the following are required:  l Make the applications used on the primary system available on the secondary system. Requirements  l Prepare the system.6. keep the script. SharePlex captures their changes and queues the data on that system until the primary system is restored.5) Administrator Guide 168 . NOTE: If you use an Oracle hot backup to create the secondary instance.  l Copy non-replicated database objects and critical files outside the instance to the secondary system.  l Create a script that denies INSERT. For failover purposes.  l The target objects must have the same structure and qualified names as their source objects.  l Under normal conditions. and configure database accounts according to the instructions in the SharePlex Installation Guide.  l Create a script that enables constraints on the secondary system to be used during a failover procedure. UPDATE and DELETE operations to all users except SharePlex. UPDATE and DELETE privileges to all users. install SharePlex.  l When the primary system is restored. SharePlex replicates changes from the primary database to the secondary database. which can be run during a failover procedure. It can be modified to re-create the primary instance. SharePlex 8.  l Develop a failover procedure for relocating users to the secondary system. SharePlex updates it with those changes and then resumes capture and replication from the primary database.

activate the configuration on that system.  l oraA is the Oracle instance on hostA. SharePlex 8.object ownerA.  l ownerA. Configuration A high availability configuration uses two configurations that are the reverse of each other. Perform initial synchronization and startup.6.oraA     ownerA.6 (8. You will activate the source configuration during this procedure. The configuration on the secondary machine remains in an activated state.  2.object is the fully qualified name of an object on hostB or a wildcarded specification. you can use the config. Making sure the Export process is stopped on the secondary system.oraB Configuration on the target system (secondary system) Datasource:o. See Build a configuration file using a script Configuration on the source system (primary system) Datasource:o.oraB     ownerB. the placeholders represent the following:  l hostA is the primary system.  l oraB is the Oracle instance on hostB.object hostA@o. To replicate all objects in the database. but the stopped Export process and lack of user activity ensure that the system remains static in readiness for failover. On the secondary system (the one that will initially be the passive system) run sp_ctrl and then issue the following command to stop the Export process on the secondary system so that nothing accidentally happening on the secondary system (such as a scheduled job changing data) gets replicated back to the primary system.object ownerB.object is the fully qualified name of an object on hostA or a wildcarded specification.oraA Make the system ready for failover  1.  3. IMPORTANT!  l See Create configuration files for more information about the components of a configuration file.object hostB@o.  l hostB is the secondary system.5) Administrator Guide 169 .  l ownerB.Conventions used in the syntax In the configuration syntax in this topic. This is the required state of SharePlex on that system until there is a need for a role switch between systems. See Activate replication in an Oracle production environment.sql script to simplify the configuration process.

Perform recovery procedures If a system fails in your high-availability environment. Monitor the SharePlex instance that is linked to the secondary Oracle instance to make sure no non- SharePlex DDL or DML changes were performed. because the Capture process on a system ignores the Post process on that system. see Procedures to Maintain Oracle High AvailabilityThese procedures help you to move replication to a secondary system and then move it back to the primary system when it is restored. SharePlex 8.6. If there are any messages in the export queue. The queue should be empty.  4.  5. See the SharePlex Reference Guide for more information about SharePlex commands and parameters.6 (8. it means those transactions originated on the secondary system or the SP_OCT_REPLICATE_POSTER parameter was mistakenly enabled.5) Administrator Guide 170 . You can do this as follows: View the status of the export queue on the secondary system using the qstatus command in sp_ctrl. Maintain backups of replication files.

while retaining the rest of the rows in the source. You can use horizontally partitioned replication to:  l Replicate a subset of rows to the target.  l Divide the replication of a source table into parallel Post processes for faster posting to the target table.5) Administrator Guide 171 . Guidelines for using horizontally partitioned replication The following are guidelines to follow if you are considering a configuration that combines horizontally partitioned replication with vertically partitioned or full-table replication. These options provide an additional level of flexibility to divide. and filter data to meet specific requirements.6 (8. parallelize. and to where. Before proceeding. make certain you understand the concepts and processes in Create configuration files. Contents Configure horizontally partitioned replication Configure vertically partitioned replication Configure horizontally partitioned replication Use horizontally partitioned replication to divide the rows of a table into separate processing streams.6. The headquarters maintains the corporate database.  l You can combine horizontally partitioned and vertically partitioned replication for maximum control over which information is distributed. 9 Configure partitioned replication This chapter contains instructions for using the advanced SharePlex configuration options of horizontally partitioned and vertically partitioned replication. The headquarters uses vertically partitioned replication to share some of the column data of a table to those locations. while SharePlex 8. For example: A company has a headquarters and regional divisions.  l Replicate different subsets of rows to different targets. and each region maintains a regional database.

Column condition: A column condition is based on a standard WHERE clause. Define partition schemes  3. Define partitions  2.  o Use multiple column conditions to partition the rows of a table so that each set of rows replicates to a different target. you can replicate only those rows where the value of the YEAR column is greater than 2000. SharePlex does not support that combination if vertically partitioned replication is also used for the same table. you do the following:  1. depending on your objectives. For example.5) Administrator Guide 172 . for replication to the appropriate regional database.  l Horizontally partitioned replication can be used in conjunction with full-table replication for the same table. Use one or more column conditions for the following purposes:  o Use a column condition to replicate only a subset of the rows of a table.  o Use multiple column conditions to divide the rows of a table into parallel processing streams (parallel Export-Import-Post streams) for faster posting to the target table. retaining other sensitive data at headquarters. For example: replicate changes where the value of the REGION column is EAST to one location and rows where REGION is WEST to a different location. However. This use of column conditions for this purpose is appropriate only if the table contains a column that enables you to split the processing evenly among SharePlex 8. you specify a column condition or a hash value. How it works To implement horizontally partitioned replication. Specify partition schemes in the configuration file Define partitions A partition is a subset of the rows in a table that you want to replicate. To create a partition. Row changes made to the shared columns are further partitioned horizontally. for example to route groups of rows to different reporting systems and all rows to a failover system.6. For example. The following explains these concepts.6 (8. you can improve the flow of replication to a heavily updated target table.

non-partitioned table that can cause row shift: UPDATE that changes row size so that the data does not fit into the current block. the use of numerous queues may require the number of semaphores to be increased.6. DELETE of a row and then re-insert. SharePlex 8. You can use a hash value to divide the rows of a table into parallel Post processing streams if it is not practical to use a column condition for this purpose. The advantage of using a hash partition rather than a column condition is that the rows are divided evenly and automatically." see Post stopped in the Solve replication problems topic.  l Hash horizontal partitioning cannot be enabled on an index-organized table (IOT) or tables that contain LOBs or LONGs.6 (8. If Post returns the error message "shs_SEMERR: an error occurred with the semaphore. the table cannot be compared or repaired with the compare and repair commands. Examples of operations that cause rows to migrate are:  o Export or import of the table  o ALTER TABLE with the MOVE option  o ALTER TABLE with the SHRINK SPACE option  o FLASHBACK TABLE  o Split a partition or combine two partitions  o Update a value so that it moves to a new partition  o Online table reoraganization  o Redefine a table by using dbms_redefinition  o DML applied to a regular.  l Hash horizontal partitioning is not supported for tables with operations that may cause rows to migrate. NOTE: On a Windows system. without the need for you to reference table columns in WHERE clauses. IMPORTANT: The following restrictions apply:  l When hash partitioning is in use.5) Administrator Guide 173 .  l Hash horizontal partitioning cannot be combined with horizontal partitioning that uses a column condition. parallel Post processes. Hash value: A hash partition (known as hash horizontal partitioning) directs SharePlex to create row partitions by using a hash algorithm based on the rowid.

you specify the partition scheme as the routing map in the configuration file. To define a partition based on a hash Use a standard INSERT statement to enter the information described in "SHAREPLEX_PARTITION columns and input" into one row of the SHAREPLEX_PARTITION table. for example "Scott". You define and link partitions by using the SHAREPLEX_PARTITION table. Enclose case-sensitive names in double quote marks.5) Administrator Guide 174 . even though SharePlex creates the partitions.  l Set the SP_ORD_FIRST_FIND parameter to 0 so that SharePlex checks all of the column conditions in the partition scheme.  l Each INSERT must be identical. SharePlex obeys the specifications of the partition scheme to process the row subsets. For more information. SharePlex will detect the other target names when the configuration is activated.SALES could have four column conditions. You must also specify a partition scheme if using the hash horizontal partitioning option. To define a partition based on a column condition For each group of row subsets that you want to define as a partition. do the following:  l Issue and commit a separate INSERT statement for each target table that has a different owner or name from the other target tables. Use one SHAREPLEX_PARTITION table for all configurations that replicate data from the same Oracle instance.Define partition schemes A partition scheme is a logical container for related row partitions and is the element that is used in the configuration file to direct SharePlex to use horizontal partitioning. in relation to the target system specified in the ROUTE column. except to specify the appropriate name values in the TARGET_ TABLE_OWNER and TARGET_TABLE_NAME columns.6.SALES table to different regional sales offices. Specify partition schemes in the configuration file To direct SharePlex to use a specific partition scheme for a source table. Define partitions and schemes These instructions help you to define your partitions and link them to partition schemes.6 (8. For example. each replicating the appropriate data subsets of the CORPORATE. specify any target table. SharePlex 8. see the SharePlex Reference Guide. One row captures the information that SharePlex needs to build the partitions automatically with a hash algorithm. a simple partition scheme named CORPORATE. By default SharePlex assumes that any given row change will satisfy only one column condition in the partition scheme."emp". To route a partition to multiple targets If a row partition must be sent to multiple target tables and the owner or table names are not all identical. NOTE: This table was installed in the SharePlex schema on the source system during the installation of SharePlex. use a standard INSERT statement to enter the information described in "SHAREPLEX_PARTITION columns and input into the SHAREPLEX_PARTITION table.  l When you create an entry for this partition scheme in the configuration file.

This can be one of the following. This can be one of the following:  l A NULL value if there is only one target table name across all routes. it helps to identify or describe each one. Only those that are listed in an active configuration file are active.5) Administrator Guide 175 . ROUTE VARCHAR2(1024) The routing map for this partition. See To route a partition to multiple targets. You can:  l Define only one partition scheme per table in the replication configuration. If creating a partition with a column condition:  l Specify a standard SharePlex routing map. for example to give each partition a name.  l If you are sending the partition to multiple target tables with different owner names. but if you are creating numerous partitions. for example: sysB@o.6 (8. A route with a named export or post SharePlex 8. You can enter a NULL value. specify one of the owner names.  l Use any or all of your partition schemes in a configuration file.myora. specify one of the target names.6. TARGET_TABLE_NAME VARCHAR2(30) The name of the target table. depending on whether you are using a column condition or a hash to create the partitions. DESCRIPTION VARCHAR2(61) A description of the partition. TARGET_TABLE_OWNER VARCHAR2(30) The owner of the target table. See To route a partition to multiple targets. This can be one of the following:  l A NULL value if there is only one target owner name across all routes.Table 14: SHAREPLEX_PARTITION columns and input Column Datatype Input PARTITION_SCHEME VARCHAR2(30) The name of the partition scheme for which you are creating a row partition.  l If you are sending the partition to multiple target tables with different names.

if applicable. | r. ORDER NUMBER NULL. OPTIONS VARCHAR2(32) Specify one of the following. See To route a partition to multiple targets.  l database is the name or SID of the target database. depending on how you are defining the partitions: If defining a partition based on a column condition: NULL SharePlex 8. This column is reserved for use by SharePlex. you must use a separate INSERT statement for each one.6 (8.6.5) Administrator Guide 176 . If creating a partition with a hash: Use the following format to direct SharePlex to automatically generate the named post queues: host:name|#[o. See Create configuration files.  l |# directs SharePlex to sequentially number the queues. Each name is appended with an integer from 0 to the number of partitions that you specify in the OPTIONS column.]database where:  l host is the name of the target system. This column is reserved for use by SharePlex. Compound routing maps are also supported.  l name is the base name of the post queues that SharePlex will create. PRIORITY NUMBER NULL. See Configure named export queues and Configure named post queues for more information about named queues.Column Datatype Input queue is supported.  l If routing to multiple target systems where the names of the target owners or tables (or both) are different.

How to create a column condition The following are guidelines for creating column conditions. This directs SharePlex to create the hash based on the rowid of the rows. Choose appropriate columns Use columns whose values will not change. The numbering starts at 0. where changes made to the conditional columns of a partition can cause the underlying data to satisfy the conditions of a different (or no) partition. Column Datatype Input If defining a partition based on a hash: HASH#.5) Administrator Guide 177 . HASH4 creates the post queues hash00.6 (8. Partition shift case 1: The column value is updated and the new value no longer satisfies any column condition:  l SharePlex performs the operation. For example. where # is the number of partitions (post queues and processes) that you want SharePlex to use. COL_CONDITIONS VARCHAR2(1024) Specify one of the following. hash01. depending on how you are defining the partitions: If defining a partition based on a column condition: Use standard WHERE conditional syntax such as ((region_id = West) and region_id is not null).  l Example: Column condition is “C1=A and C2=B”.  l The source and target tables of the original partition are now out of synchronization. so the row is replicated to the target system. The objective is to avoid a partition shift. but Post returns no errors. but future operations on that row are not replicated.  1. hash02. The reason: the row no longer satisfies a column condition. If defining a partition based on a hash: Specify a value of ROWID.6. C1 and C2 values satisfy the column condition. INSERT a row into the database. such as PRIMARY or UNIQUE key columns. See How to create a column condition for additional instructions. You can specify as many column conditions as needed. C1 C2 C3 C4 A B 1 2 SharePlex 8. and hash03.

 l Example: Column condition is “C1=A and C2=B”. Now the row satisfies the column condition. Use supported datatypes SharePlex supports the following datatypes in column conditions: CHAR DATE NUMBER LONG VARCHAR VARCHAR SharePlex 8. C1 C2 C3 C4 B B 1 2  2.  l Post returns an out-of-sync error.  l Use the compare command to repair the out-of-sync rows. Enabling this parameter causes some performance degradation.. see the SharePlex Reference Guide. but Post cannot locate the corresponding row on the target (it was never there) and returns an out-of-sync error. How to repair out-of-sync rows caused by changes to the values of column conditions You can do either of the following to repair the out-of-sync rows:  l Set the SP_ORD_HP_IN_SYNC parameter to a value of 1. so the row is not replicated to the target system. For more information about this command. INSERT a row into the database.5) Administrator Guide 178 . so SharePlex replicates it.6 (8. see the SharePlex Reference Guide. For more information about this parameter. The change is replicated. and subsequent changes to data in the row are not replicated. add a log group for that column.. This setting directs SharePlex to detect and correct the out-of-sync condition.. Now the row does not satisfy the column condition.  1.set C1=B WHERE C1=A and C2=B  3. The reason: the original change was not replicated because it did not meet the column condition. UPDATE . and you notice reduced performance with horizontally partitioned replication enabled. C1 and C2 values do not satisfy the column condition.  2..set C1=A WHERE C1=B and C2=B  3. C1 C2 C3 C4 B B 1 2 Partition shift case 2: A row that satisfies one column condition gets updated to meet a different condition:  l Post cannot find a matching target row. UPDATE .6. NOTE: If you are using a column other than a key to base the column condition on. depending on how many tables are configured for horizontally partitioned replication.

column=value not(column=value) column>value value>column column<value column<=value column>=value column<>value column!=value columnlikevalue columnbetweenvalue1andvalue2 not(columnbetweenvalue1andvalue2) columnis null columnis not null Conditions can be combined into nested expressions with parentheses and the AND. Example column conditions not (col1 = 5) (col2 = 5) and not (col3 = 6) ((col1 is not null) and (col2 = 5)) SharePlex 8. Enclose strings and dates within single quote marks (‘west’). SharePlex uses nls_date_format. Use standard conditional syntax The following list shows the conditional syntax that SharePlex supports in a column condition. For example: hiredate<‘1111 2011000000’  l Horizontally partitioned replication does not support the following:  l Oracle TO_DATE function.  l VARRAYs and abstract datatypes. OR.6.  l column is the name of a column in the table that you are configuring to use horizontally partitioned replication.  l UPDATEs or INSERTs on LONG columns larger than 100k.VARCHAR2 NOTES:  l For the DATE datatype.6 (8. with the syntax specified as MMDDSYYYYHH24MISS.  l Sequences. where:  l value can be a string or a number.  l TRUNCATEs of an Oracle partition. Do not use quote marks for numbers (10). and NOT logical connectives.  l LOB columns.5) Administrator Guide 179 .

use the following syntax. When a condition includes parentheses. If department_ id is NULL.  l exceed the 1024 bytes maximum defined storage.table and tgt_owner.table are the specifications for the source and target tables. For example. include the column is not null syntax as part of the condition. This component applies only to partitions using a column condition. SharePlex prints an error to the Event Log that indicates where the error occurred.5) Administrator Guide 180 .  l ! routing_map is a placeholder routing map. the explicit precedence is respected. See Examples.table tgt_owner.  l ! partition_scheme is the name of the partition scheme to use for the specified source and target tables. you must provide a placeholder routing map for that route on a separate configuration line. for example !schemeA+schemeB. SharePlex verifies the syntax in the column conditions of those schemes. including tables that will have full-table replication and those that will use partitioned replication. Create a separate entry for each partition scheme that you want to use for the same source table.6.  l Do not:  l include references to other tables in the column condition. This requirement usually is satisfied if partitioned replication is combined with full-table replication. it is replicated.  l If parentheses are not used to indicate operator precedence. The ! is required. A condition x AND y OR z behaves the same as (x AND y) OR z.table !partition_scheme !   routing_map Where:  l src_owner. SharePlex supports operator precedence in the same order that Oracle does.SID     src_owner. To configure entries for horizontally partitioned replication.Additional guidelines  l NULLs are replicated by SharePlex in cases such as this one: not (department_id = 90). However. To avoid replicating records with NULLs. respectively. Specify partition schemes in the configuration file Use one configuration file for all of the data that you want to replicate from a given datasource. Datasource:o. for example: not (department_id = 90) and department_id is not null. if a route in a partition scheme does not appear in a regular (non-partitioned) configuration entry or the entry for a different partition. All routes must be listed in the configuration file so that SharePlex can build a routing cache. You can use a compound routing map if the names of all target tables are identical.  l During the activation of a configuration that refers to partition schemes. This applies to different named queue routes as well as to routes to different target hosts. a condition NOT x AND y behaves the same way as (NOT x) AND y.6 (8. The name is case-sensitive. see Create configuration files. Examples Configuration file entry to specify a partition scheme SharePlex 8. If any syntax is incorrect. Compound routing of multiple partition schemes is not supported. the activation fails. See Examples. It is required only if a route that you used in a partition scheme is not listed somewhere in the configuration file. For general instructions on creating a configuration file.

6 (8.emp scott.emp_2 !partition_emp scott. SharePlex 8.cust scott.ora3 *Required only for partitions based on column conditions. you can replicate data changes made to C1.emp scott. as shown in the diagram.emp_2 !partition_schemeA scott. C2.5) Administrator Guide 181 .emp scott. but not changes made to C5 and C6.cust_2 !partition_cust Correct way to specify multiple partition schemes for the same source table Datasource:o.myora     scott.6.   Configure vertically partitioned replication Use vertically partitioned replication to replicate a subset of the columns of a table. C3. Datasource:o. and C4.myora     scott.ora2+targsys3@o.emp_3 !partition_schemeB Correct way to specify placeholder routing map* ! targsys1 ! targsys2@o. For example.

 l You can combine horizontally partitioned and vertically partitioned replication for maximum control over which information is distributed. SharePlex does not recognize the other columns. including tables that will have full-table replication and those that will use partitioned replication.) tgt_owner.table and tgt_ The specifications for the source and target tables.. and then configure vertically partitioned replication from that target to a second target that contains the table that requires only the partition columns. see Create configuration files. Row changes made to the shared columns are further partitioned horizontally. Corresponding columns must contain the same datatypes (same type.src_col. To configure entries for vertically partitioned replication.table [(tgt_col. SharePlex 8. however.table (src_col. The headquarters uses vertically partitioned replication to share some of the column data of a table to those locations. Configure vertically partitioned replication To configure vertically partitioned replication. The names of corresponding source and target columns do not need to be the same. for replication to the appropriate regional database. You can.tgt_col.  l A target table can.Guidelines for using vertically partitioned replication Follow these guidelines when creating a configuration file that includes vertically partitioned replication. Once you configure a table for vertically partitioned replication.. you specify either a column partition or an excluded column partition in the configuration file:  l A column partition replicates data changes that are made to the specified columns.)] routing_map src_owner. and to where. while retaining other sensitive data at headquarters.  l Vertically partitioned replication is appropriate for reporting and other data sharing strategies. The headquarters maintains the corporate database. but it is not appropriate for high availability environments. For general instructions on creating a configuration file...  l A table cannot be configured to replicate some columns to one target system and all columns to another (combination of vertically partitioned replication and full-table replication).SID     src_owner.6 (8. precision). configure full-table replication to an identical table on one target. For example: A company has a headquarters and regional divisions.) tgt_owner. but does not have to.. respectively. so data in those columns is not replicated.table routing_map Configuration component Description src_owner...  l An excluded column partition replicates all data changes except those made to the specified columns.src_col. use the following syntax. Use one configuration file for all of the data that you want to replicate from a given datasource. and each region maintains a regional database.. Datasource:o.table !(src_col.  l ALTER TABLE to add a column to a table configured for vertically partitioned replication is not supported.5) Administrator Guide 182 . contain all of the same columns as its source table. The target can contain just the columns being replicated from the source table.6. size..

Can be one of the following: and  l (src_col.) The source columns to be replicated..  l !(src_col.  l The maximum length of a partition is 174820 bytes (the maximum line length allowed in a configuration file)..  l A column list must be enclosed within parentheses.  l Key columns are not required to be included in the partition. third and seventh columns of a table... src_col. the actual number of columns that you can list depends on the length of each name.. so that SharePlex builds the correct correlations in the object cache.table (src_col..src_col..) specifies an excluded column partition that lists columns not to replicate. See Define a unique key for more information. the corresponding source and target column names must be identical. SharePlex 8. src_col..tgt_col.) The target columns. the target columns can be omitted. you can replicate the first.src_col. NOTE: When using an excluded column partition....  l Separate each column name with a comma. To map source columns to target columns. except for their names. Follow these rules to specify either type of column partition:  l There can be one partition per source table... If the source and target columns have identical owners or names.  l The columns can be contiguous or non-contiguous in the source table.5) Administrator Guide 183 . This is required regardless of the actual order of the target columns in the table. The remaining columns comprise the actual column partition. all of the columns in the partition scheme must be part of the column condition..6. For example. Therefore. Use this option to map source columns to target columns that have different owners or names. (tgt_col.  l If using horizontally partitioned and vertically partitioned replication together for this table.) columns to replicate.  l The target columns must have identical definitions as their source columns.Configuration component Description owner. and the excluded columns cannot be used in a key definition.  l List the target columns in the same logical order as their corresponding source columns. A space after the comma is optional. follow these rules:  l The syntax rules for the source column partition also apply to the target column list.6 (8..) specifies a column partition that lists !(src_col.

oraC The following is a vertically partitioned replication configuration replicating to a single target where the target columns have different names from those of the source.oraA     scott.6 (8. To use a compound routing map for this source table.c2) scott. a change to the second column in the source list is replicated to the second column in the target list. SharePlex 8. For more information about using a compound routing map.emp (c1. IMPORTANT! A compound routing map must be used.myora+sysC@o. see Routing specifications in a configuration file.  l Use a compound routing map like sysB@o. as in: !partition_scheme.  l If not using horizontally partitioned replication for the source table. all targets must be named scott. Configuration component Description For example. See Configure named export queues and Configure named post queues for more information about named queues.oraA     scott. Configuration examples The following is a vertically partitioned replication configuration replicating to multiple targets by using a compound routing map.sal (c5.emp (c1. Datasourceo. The routing map can be one of the following:  l If using horizontally partitioned replication for the source table.5) Administrator Guide 184 . To use a compound routing map.myora2 if replicating the column partition to multiple target systems. rather than listing multiple targets in separate entries.c2) scott. See Configure horizontally partitioned replication for more information.c6) sysB@o.myora if replicating the column partition to one target.emp (c1. because only one column condition per source table can be listed in the configuration file.sal.oraB+sysC@o.6.sal sysB@o. A route with a named export or post queue is supported. c2) twice in the configuration file. specify a partition scheme.oraB The following configuration file is not valid because it repeats the same column partition of scott. the owners and names of all of the target tables must be identical. routing_map The routing map for the column partition. specify a routing map as follows:  l Use a simple routing map like sysB@o. Datasourceo.

emp (c1.Datasourceo.cust (c1.c2) scott.c2) sysB@o.emp (c1.6.sales (c1.oraB scott.oraA     scott.oraC SharePlex 8.5) Administrator Guide 185 .c2) scott.6 (8.c2) sysC@o.

and Post process on the target to contain that data stream. Contents Configure named export queues Configure named post queues Configure named export queues A named export queue is an optional. When SharePlex creates a named export queue-process pair. it also creates a dedicated Import process. post queue. make certain you understand the concepts and processes in Create configuration files. These options provide an additional level of flexibility to divide and parallelize data to meet specific processing and routing requirements.6 (8. Any data that is not configured for processing through a named export queue is processed through the default export queue. SharePlex creates each named Export queue and associated Export process in addition to the default export queue-process pair. 10 Configure named queues This chapter contains instructions for using the advanced SharePlex configuration options of named queues. SharePlex 8. user-defined export queue that is attached to its own Export process.6.5) Administrator Guide 186 . Before proceeding. You direct SharePlex to create one or more named export queues when you create your configuration file.

see Configure named post queues.Benefits of named export queues Use named export queues to isolate the replication of:  l Individual configurations: By default. This enables you to tune the performance of the Export processes based on the objects replicating through each one. For more information about the benefits of named post queues. Because each named export queue has its own Import process.6 (8. and Post process on the target. post queue. In this way.  l You can set SharePlex parameters to different settings for each export queue-process pair. SharePlex 8.  l Selected database objects: You can use a named export queue to isolate certain objects such as tables that contain LOBs. you ensure that purge config or abort config commands that are issued for one configuration do not affect any of the others. you are able to isolate the data the entire way from source to target. SharePlex sends data from all active configurations through one export queue-process pair per target system. while allowing the others to continue processing.5) Administrator Guide 187 . but the use of named Export queues enables you to separate each of those replication streams into its own export queue and Export process.6. Additional benefits:  l You can stop the Export or Import process for one data stream.

PDBname r.table source_host:export_queue*target_host[@database_specification] Routing component Description source_host The name of the source system. Configure a named export queue Use the following syntax to define a routing map that includes a named export queue. If Post returns the error message "shs_SEMERR: an error occurred with the semaphore. Tables in the configuration with a standard routing map (targetsys@database_spec without a named queue specification) are replicated through a default export queue.Considerations when using named export queues  l Make certain that each queue name is unique.table tgt_owner. for example: sys1:export_q1*sys2@o." see Post stopped in the Solve replication problems topic. Underscores are permissible. export_queue The name of the export queue.oracle_SID NOTES: SharePlex 8.oracle_SID o.  l You can combine named export queues with default export queues. target_host The name of the target system.myora * Required component that separates the source routing component from the target routing component. source_host:export_queuename*target_host[@database] Configuration with named export queue in routing map Datasource:o. the use of numerous queues may require the number of semaphores to be increased.  l See Create configuration files for limitations that affect the number of queues that you can create.6 (8.database_name c. required if the target is a database: o.SID     src_owner. Queue names are case-sensitive on all platforms.6. NOTE: On a Windows system.tns_alias o. database specification One of the following.5) Administrator Guide 188 .  l All tables with referential integrity to one another must be in the same export queue. Use one word only.

you could simply define a named export queue for the LOB table and allow the remaining tables to be processed through the default export queue.prod scott.oraC scott.6.oraC scott.5) Administrator Guide 189 .oraA     scott.emp_LOB scott.emp scott.oraC scott.emp sysA:QueueA*sysB@o.cust scott.prod sysB@o.oraC   Datasource:o.prod sysA:QueueB*sysB@o.oraC scott.6 (8.oraB     scott.oraA     scott.oraD   The following shows how to separate a table that contains LOBs from the rest of the tables by using named export queues. Each datasource is routed through a named export queue.cust scott. See the SharePlex Reference Guide for more infomation about theses commands. which together operate in parallel to the default post SharePlex 8. Configure named post queues A named post queue is an optional component of the routing map in the configuration file. A named post queue is a user-defined post queue with its own Post process. Datasource:o.cust sysB@o.  l Use the show command to view all Export processes with their queues.cust sysA:QueueB*sysB@o.oraC scott.oraD scott.sales sysA:QueueA*sysB@o.oraC How to identify named export queues You can view named export queues through sp_ctrl:  l Use the qstatus command to view all queues on a system.oraC scott.prod scott. Datasource:o.oraC scott.sales sysA:QueueA*sysB@o. see Create configuration files.cust scott.  l For more information about the components of a configuration file.cust sysA:QueueA*sysB@o.sales scott.prod scott.emp_LOB scott.emp_LOB sysA:QueueB*sysB@o.emp_LOB sysA:lobQ*sysB@o.sales scott.sales scott. Datasource:o.oraA     scott.prod sysA:QueueA*sysB@o.  l Allow no spaces between any components in the syntax of the routing map.oraC   Alternatively. Examples   The following configuration files show two different datasources that are being replicated to two different databases on the same target system.sales sysB@o.

you can improve posting performance by isolating objects such as the following that cause processing bottlenecks:  l objects that have LOB columns. Benefits of named post queues You can use named post queues to isolate data from different tables into two or more separate Post streams.  l any objects whose operations you want to isolate. You can set SharePlex parameters to different settings for each queue-process pair.5) Administrator Guide 190 . You can define one or more named post queue-process pairs to establish a set of parallel Post replication streams. This enables you to tune the performance of the Post processes based on the objects replicating through each one. Objects in the configuration file with a standard routing map (host@target) are replicated through a default post queue. Process the remaining objects through additional named post queues. By using named post queues. or use the default post queue. See Configure horizontally partitioned replication. You can use horizontal partitioning to divide the rows of very large tables into separate named post queues as an added measure of parallelism.6 (8.  l objects that involve large transactions.6. SharePlex 8. Named post queues are recommended for objects that contain LOBs.queue and Post process.

possibly causing the target database to be inconsistent with the source database at any given point in time." see Post stopped in the Solve replication problems topic. queue The unique name of the post queue. Underscores are permissible. If interdependent objects are not replicated through the same post queue.6 (8.SID     src_owner.  l If objects are linked by relational dependencies. : A colon. process all of those objects through the same named post queue. SharePlex creates a named post queue-process pair for each one by default. Configure a named post queue If you are using named export queues. NOTE: On a Windows system.  l Specify the database with one of the following: o. This may be acceptable.table host:queue[@database_specification] Routing component Description host The name of the target system. for example: sys2:post_q1@o. the target objects might not be changed in the same order as the corresponding source objects. If you are not using named export queues.table tgt_owner. If Post returns the error message "shs_SEMERR: an error occurred with the semaphore.  l Assign each post queue a unique name. Queue names are case-sensitive on all platforms. you can disable their referential constraints on the target.myora @database_specification (If the target is a database)  l The ampersand (@) is a required component.5) Administrator Guide 191 . As an alternative to processing interdependent objects through the same queue.  l When using multiple Posts. parent and child operations may be applied out of order and will cause database errors. use the following syntax to define a named post queue in the configuration file by adding the :queue component to the routing map: host:queue@target Configuration with named post queue in routing map Datasource:o.oracle_SID SharePlex 8. This is a required component.Considerations when using named post queues  l See Routing specifications in a configuration file for limitations that affect the number of queues you can create.  l If you implement named post queues for objects in an active configuration (thus changing the routing) SharePlex locks those objects to update its internal directions. because the constraints are satisfied on the source system and then replicated to the target.6. One word only. the use of numerous queues may require the number of semaphores to be increased.

database_name c.emp sysB*sysC:Queue1@o.5) Administrator Guide 192 . See the SharePlex Reference Guide for more infomation about theses commands. Datasource:o.tns_alias o.emp scott. Routing component Description o.oracle_SID NOTES:  l Allow no spaces between any components in the syntax of the routing map. You can view named post queues through sp_ctrl:  l Use the qstatus command to view all queues on a system.oraC How to identify a named post queue A named post queue is identified by the datasource (source of the data) and one of the following:  l the name of an associated named export queue (if the Import is linked to a named export queue)  l the user-assigned post-queue name (if the Import is linked to a default export queue).oraC   The following shows how a named post queue is specified when you are routing data in a pass-through configuration using an intermediary system.cust sysB:Queue2@o.emp sysB:Queue1@o.  l Use the show command to view all Post processes with their queues. see Create configuration files. Examples The following configuration creates one post queue named Queue1 that routes data from table scott.  l For more information about the components of a configuration file.emp and another post queue named Queue2 that routes data from table scott.oraC scott.cust.emp scott.oraA     scott. see Configure replication to share or distribute data. SharePlex 8. Datasource:o.oraA     scott.6 (8.PDBname r.cust scott.6. For more information about this replication strategy.

see the target command in the SharePlex Reference Guide. rather than simply maintaining a mirror of the current state of the source data. While regular replication overlays current target data with change data.6 (8. Such overhead includes the SQL work of adding the history rows.5) Administrator Guide 193 . NOTE: File. SharePlex enables you to maintain this history. while also replicating the same data set to maintain up-to- date targets. The old data is preserved as a step-by-step record of change. change history inserts the change data to the target as a new record. you can offload the overhead from the production database.6. Contents Overview of the change-history target Configure change history Overview of the change-history target A change history target differs from a replication target in that a change history target maintains a record of every change that occurs to a source object or objects. and Kafka targets support change history by default. By using SharePlex to maintain change history on a secondary server. Capabilities This replication strategy supports the following:  l Identical or different source and target names  l Use of vertically partitioned replication  l Use of horizontally partitioned replication SharePlex 8. Metadata that is supported for these targets is included automatically when Post writes the XML. JMS. because every source change is written as a separate XML record. and the query activity against the historical data. 11 Configure replication to maintain a change history target This chapter contains instructions for how to configure SharePlex to maintain a change-history target. the extra storage of those rows. There is no overlaying of old data with new. The historical data can be queried and analyzed for such purposes as data mining or resolving customer disputes. For a list of supported metadata.

you could include only updates and deletes.  l Use of named export and post queues  l Combination of regular replication and change-history replication of the same source object(s) Supported targets Oracle target Operations supported SharePlex supports adding a change history row for these operations:  l INSERT  l UPDATE  l DELETE  l TRUNCATE  l ALTER TABLE to DROP COLUMN (NOTE: for ADD COLUMN.6. the after image consists of the new values of the columns that were changed (or added in the case of an insert). there is metadata that captures the userid of the user who made the change and the source system where the change was made (useful when change data is tracked from multiple databases). Post adds a column to the table. SharePlex 8.) Operations not supported  l Changes made to UDT or VARRAY columns  l DBMS_LOB operation that is used to change a part of a LOB column (The value stored for that column on the target will not be the complete LOB column. Each new change row that SharePlex inserts includes the following:  l the values of the key columns  l the after image of the changed columns. but does not create a change history row.6 (8.5) Administrator Guide 194 . each target table serve as a history table that records every change made to the source data as a continuous series of rows.) How SharePlex maintains change history In a change history configuration. For inserts and updates. For deletes. For example.  l (optionally) a set of metadata values that provide context for the change. For example. SharePlex can be configured to include the before image of update operations in the history or to control which operation types are included in the history. the after image consists of the key values plus the other columns set to null.

a row may have the same image as another row that has the same key. optionally. Because this is a history of changes. Create a change-history configuration file  1. see Create configuration files.Configure change history To configure change history. Post automatically populates the default metadata columns without any additional configuration. Allow no DML or DDL to be performed on the target tables except by SharePlex. For a list of default and optional metadata columns.  2. NOTE: The default columns are automatically added to new tables that are added to the SharePlex change history configuration.  l !cdc: identifies the target as a change-history table. Disable triggers on the target tables.SID specifies the target Oracle instance.table host@c.table !cdc:tgt_owner. Create the history tables with the same name and structure as the source tables whose history they will track. Post does not perform integrity checks on a change-history target. Make certain that SharePlex is installed and the system is prepared according to the instructions in the SharePlex Installation Guide.  l src_owner.  l tgt_owner.5) Administrator Guide 195 .  l c. use the target command to add them to the Post configuration. Datasource:o.SID     src_owner. product_dir/util/add_change_tracking_columns. configure filter rules and other attributes to customize the history to your needs. You can customize the script to meet your requirements.  5. FOREIGN KEY. or CHECK constraints. UNIQUE. Target tables must not have PRIMARY KEY. SharePlex 8.  l host is the target system. For more information about how to create a configuration file. create a configuration file using the follpowing syntax.table is the fully qualified name of the target history table or a wildcarded specification.  6. On the source system.object) or a wildcarded specification. you use special syntax in the SharePlex configuration file and.table is the fully qualified name of a source object (owner. To add optional columns. but omit all constraints on all columns.  4.SID is the source Oracle instance. or to change a column name.  3.6 (8. (Optional) Run the following script on the target tables to add default metadata columns with their default names.sql The script only adds the default columns.6. NOT NULL. see the target command in the SharePlex Reference Guide.SID where:  l o. nor can columns be defined with a DEFAULT value.

You can override the global setting of SP_OPO_TRACK_PREIMAGE at the table level by using the set cdc preimage option of the target command. This parameter causes Post to insert two rows to a history table for every change made to the tracked source table: one for the after image and one for the before image.The default is I/U/D which sends all DML operation types to the history records. For instructions. configure the following:  1. Turn on supplemental logging for all columns of the source tables that are being tracked. unless the SP_OCT_USE_SUPP_KEYS parameter is used. change the parameter to I/U.5) Administrator Guide 196 . Disable change history of an operation type To disable the change history of a DML operation type.6 (8. Include all columns of an operation in the history To include the values of all table columns in each history record. The before image is composed of the key values plus the before values of the columns that were changed. see the SharePlex Reference Guide.Additional change history configuration options This section describes how you can customize the SharePlex change history configuration. Separate values with a slash (/). NOTE: When both SP_OCT_USE_SUPP_KEYS and SP_OPO_TRACK_PREIMAGE are enabled. see the SharePlex Reference Guide. For example: Alter table emp ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS. to maintain change history only for inserts and updates. rather than only the changed columns. For example.6. the before image includes all column values as they were before the change. the SHAREPLEX_SOURCE_OPERATION column values for the two records will be: UPDATE BEFORE UPDATE AFTER NOTE: The before row will not include the before image of any LOB columns.  2. SharePlex 8. For more information about SP_OPO_TRACK_PREIMAGE and the target command. Customize column names You can use the target command with the colname option to customize the name of any metadata column. Add the before image to each change row You can include the before image of updates by setting the SP_OPO_TRACK_PREIMAGE parameter to U. Set the SP_OCT_USE_SUPP_KEYS parameter to 1. set the SP_OPO_TRACK_OPERATIONS parameter to the appropriate value or values. When before images are enabled. because the redo log does not contain the before image of LOBs.

SharePlex 8.6 (8. you can specify a rule that if column 1 and column 3 are changed.5) Administrator Guide 197 . then apply the operation and discard any changes that apply to other columns. the COMMIT record is not included in the history tables. To configure Post to insert a row for every COMMIT.Set rules and filters You can use the set rule option of the target command to apply conditions on columns to control whether a change is applied to the target history table. Include COMMITs By default.6. For instructions. For example. set the SP_OPO_TRACK_COMMITS parameter to 1. see the SharePlex Reference Guide.

Changes that bypass the redo logs are not replicated. SharePlex replicates some DDL for objects that are listed in the active configuration (explicitly or by wildcard). DDL replication is supported only from the source system to the intermediary system. Control DDL replication By default.5) Administrator Guide 198 . see the SharePlex Release Notes. IMPORTANT! SharePlex 8. For details on the DDL that SharePlex supports. DDL against objects owned by the SharePlex user or against system-owned objects is not replicated. 12 Set up DDL Replication This chapter contains the information that you need to know in order to replicate DDL that is supported by SharePlex.6. NOTE: Because the source and target databases can be of different versions in SharePlex replication. In a cascading configuration. but not from the intermediary system to target systems. see Configure replication through an intermediary system. Contents DDL that SharePlex supports Control DDL replication Filter DDL Replication Best practices for ALTER TABLE DDL DDL logging and error handling DDL that SharePlex supports SharePlex replicates certain DDL changes that are written to the redo logs. the source and target objects can be different. For more information about cascading replication. it may fail if the operation is forbidden on the target but allowed on the source. When DDL is applied to the target. For a list of objects for which DDL is supported. see the SharePlexSharePlex Release Notes. but you can expand this support with parameter settings.6 (8.

 l DDL replication is supported only to Oracle targets. NOTE: SharePlex does not replicate materialized views to materialized views. To auto-add materialized views  1. The default setting of 3 replicates ALTER and TRUNCATE.2. You can expand this support through parameter settings.5) Administrator Guide 199 . Set the SP_OCT_AUTOADD_MV parameter to 1.6. SharePlex does the following:  l replicates the CREATE to add the object to the target  l adds the object to replication  l maintains that object through future DDL and DML changes The Auto-Add feature is controlled by the SP_OCT_AUTOADD_ENABLE parameter. This functionality is controlled by the SP_OCT_REPLICATE_DDL parameter. If you are replicating data to an Open Target target.6.  3. SharePlex converts a CREATE MATERIALIZED VIEW to a CREATE TABLE. applies the CREATE TABLE to the target.6 (8.  2. A setting of 1 replicates ALTER but not TRUNCATE. Set the SP_OCT_TARGET_COMPATIBILITY parameter to at least 8. SharePlex provides default DDL support for objects in the configuration file. which are supported for all SharePlex targets. See the SharePlex Reference Guide for details about this parameter. see the SharePlex Release Notes provided with this release. which is set to 1 (enabled) by default. and then replicates the SharePlex 8. NOTE: Auto-Add is not supported to Open Target targets. When SharePlex detects a CREATE statement for one of these objects and its name satisfies a wildcard in the configuration file. the SharePlex Auto-Add feature is also enabled to provide DDL support for tables and indexes that are created after activation. SP_OCT_AUTOADD_ENABLE should be set to 0 and SP_OCT_REPLICATE_ALL_DDL should be set to 0. except for ALTER TABLE to ADD COLUMN or DROP COLUMN. That information may supercede what is documented here. By default.  l For the most current information about supported DDL and requirements or limitations. A setting of 2 replicates TRUNCATE but not ALTER. Expanded Auto-Add support You can expand Auto-Add support to add new sequences and materialized views to replication if their names satisfy a wildcard specification in the active configuration file. Make certain the SP_OCT_AUTOADD_ENABLE parameter is set to 1. See the SharePlex Release Notes for detailed information about the DDL that is supported by SharePlex. Default DDL support By default SharePlex replicates the TRUNCATE TABLE command and the ALTER TABLE command to ADD or DROP columns when:  l the affected object exists in the source and target at the time of activation and  l its name is listed in the configuration file (explicitly or through wildcard).

The objects must exist in the source and target prior to configuration activation. Therefore.3. Make certain the SP_OCT_AUTOADD_ENABLE parameter is set to 1. See the SharePlex Reference Guide for details about these parameters. All DDL performed on objects inside the replication configuration must be replicated to keep the source and target metadata consistent so that DML succeeds. See the SharePlex Reference Guide for details about this parameter. NOTE: DDL filtering is only allowed for objects outside the replication configuration. Name Type ------------. SharePlex replicates DROP MATERIALIZED VIEW. To auto-add sequences  1. DDL support for objects outside the replication configuration You can configure SharePlex to replicate DDL for certain objects that are not listed in the configuration file. SharePlex replicates the DDL statements. but not ALTER MATERIALIZED VIEW. Set the SP_OCT_AUTOADD_SEQ parameter to 1. Set the SP_OCT_TARGET_COMPATIBILITY parameter to at least 8.5) Administrator Guide 200 .6. To replicate DDL for objects outside the replication configuration Set the SP_OCT_REPLICATE_ALL_DDL parameter to 1. See the SharePlex Release Notes for more information about supported DDL for objects that are not in the configuration file.6.  2. SharePlex does not maintain synchronization of these objects on the target. ------------ DDL_PARAMETER NUMBER DDL_CODE NUMBER SCHEMA_FILTER VARCHAR2(32) OBJECT_FILTER VARCHAR2(32) SharePlex 8. but does not replicate any data change operations made to the objects because they are not part of active replication. Filter DDL Replication You can filter the objects for which DDL is replicated when the SP_OCT_REPLICATE_ALL_DDL parameter is enabled.DML that populates the view.  3. This is the DDL that is not in the replication configuration. DDL filtering is controlled in the SHAREPLEX_DDL_CONTROL table that is installed in the SharePlex schema.6 (8.

See DDL codes. The following filters out of replication all DDL for all objects with names that begin with TEST_ in any schema: INSERT INTO SPLEX. OBJECT_FILTER) values (null.  l DDL_CODE filters by the code number of a DDL type. OBJECT_FILTER) values (‘0x01’.Each row in the SHAREPLEX_DDL_CONTROL table defines a filter based on what you specify in each of the following columns:  l SCHEMA_FILTER filters DDL by a schema name.SHAREPLEX_DDL_CONTROL (DDL_CODE.'Sales'.null.null). To filter DDL Insert a row into the table with the desired values in the active columns.6. The following filters out of replication the DDL for CREATE TABLE for the "Sales" schema and objects with names that begin with "TEST_": INSERT INTO SPLEX. SCHEMA_FILTER. Examples The following filters out of replication the DDL for ALTER TABLE: INSERT INTO SPLEX.  l OBJECT_FILTER filters DDL by an object name.null. OBJECT_FILTER) values (‘0x0F’.'TEST_%'). DDL codes DDL Type DDL_CODE CREATE TABLE 0x01 ALTER TABLE 0x0F DROP TABLE 0x0C ASSOCIATE STATISTICS 0xA8 DISASSOCIATE STATISTICS 0xA9 COMMENT ON TABLE   COMMENT TABLE COLUMNS 0x1D TRUNCATE 0x55     CREATE INDEX 0x09 ALTER INDEX 0x0B DROP INDEX 0x0A SharePlex 8.'TEST_%').SHAREPLEX_DDL_CONTROL (DDL_CODE. SCHEMA_FILTER.5) Administrator Guide 201 . SCHEMA_FILTER.SHAREPLEX_DDL_CONTROL (DDL_CODE. A null value in the DDL_CODE column means that the filter applies to all of the DDL types A null in the SCHEMA_ FILTER or OBJECT_FILTER column means that the filter applies to any schema or object name. NOTE: The DDL_PARAMETER column is not an active column as of this release of SharePlex.6 (8.

6 (8.DDL Type DDL_CODE     CREATE SEQUENCE 0x0D ALTER SEQUENCE 0x0E DROP SEQUENCE 0x10     CREATE CLUSTER 0x04 DROP CLUSTER 0x08     CREATE USER 0x33 ALTER USER 0x2B DROP USER 0x35     CREATE_ROLE 0x34 ALTER_ROLE 0x4F DROP_ROLE 0x36 GRANT 0x11 REVOKE 0x12     CREATE SYNONYM 0x13 DROP SYNONYM 0x14     CREATE VIEW 0x15 ALTER VIEW 0x58 DROP VIEW 0x16         CREATE TYPE 0x4D ALTER TYPE 0x50 DROP TYPE 0x4E CREATE TYPE BODY 0x51 DROP TYPE BODY 0x53     SharePlex 8.5) Administrator Guide 202 .6.

Tables with VARRAY or ABSTRACT types Do not add a VARRAY column or abstract datatype column if you plan to issue an ALTER TABLE to drop a column or set a column unused soon thereafter. If the second DDL was performed before SharePlex was able to process the first DDL. such as the storage parameters of database objects.6 (8. DDL Type DDL_CODE CREATE FUNCTION 0x5B ALTER FUNCTION 0x5C DROP FUNCTION 0x5D     CREATE PROCEDURE 0x18 ALTER PROCEDURE 0x19 DROP PROCEDURE 0x44     CREATE PACKAGE 0x5E ALTER PACKAGE 0x5F DROP PACKAGE 0x60 CREATE PACKAGE BODY 0x61 ALTER PACKAGE BODY 0x62 DROP PACKAGE BODY 0x63     CREATE DIRECTORY 0x9D DROP DIRECTORY 0x9E Best practices for ALTER TABLE DDL The following are best practices for replication of ALTER TABLE replication.5) Administrator Guide 203 . one of two things can happen: either the target table will assume the storage of the source table or.6. there may be unexpected results when DDL on that metadata is replicated. if the DDL is not supported by the target. Tables with system-specific metadata If some metadata is system-specific. If the source and target objects were not created with the same storage parameters. SharePlex replicates all of the storage parameters for a source Oracle object. SharePlex 8. SharePlex must query the database to obtain information about this data type. an error will be generated. For example. the query will fail because the metadata is already changed. even though only some of them were changed with the ALTER TABLE command.

such as ALTER TABLE. the names of those partitions on the source will not match the names of their corresponding partitions on the target. When the keys are not logged. This causes Oracle error 01570. Alternatively. before you restart Post. SharePlex fetches their values based on the rowid.. Post maps the partition ID to the correct partition name on the target table. For more information. set the SP_OCT_TRUNC_PARTITION_BY_ID parameter to 1. Otherwise.MOVE. Any operation that changes the rowid. Tables that are renamed When ALTER TABLE RENAME is issued on a source table that is currently in replication.6.4 or later. SharePlex does not support TRUNCATE of a system-generated sub-partition if the sub-partition is empty. but MAXEXTENTS is not changed. If the source and target table names are the same. SharePlex changes the name of the table in the active configuration file by commenting out the old configuration line and adding a new line at the end of the configuration file.table2 sysA@o. rather than by using the partition name that is specified in the original ALTER TABLE command. and a target table with MAXEXTENTS 505 and MINEXTENTS 4.. ALTER TABLE. 2003 10:14 scott.ora555 Whether the Post process stops on RENAME operations or not depends on the setting of the SP_OPO_STOP_ON_ DDL_ERR parameter. just the source name is changed. The following is an example: # Table scott. This setting directs SharePlex to identify the partition by using the partition ID. both are changed to the new name. set the SP_OPO_CONT_ON_ERR parameter to 1 and add error number SP-OPO01002 to the top of the oramsglist file. both the source and target must be SharePlex version 8. Tables with system-generated interval partitions/subpartitions Because the database generates the names of system-generated interval partitions/subpartitions. Example: consider a source table with MAXEXTENTS 525 and MINEXTENTS 20. To ensure that SharePlex truncates the correct partition when it replicates an ALTER TABLE to TRUNCATE a system-generated interval partition.table2 scott.table1 renamed to scott. To configure Post to ignore this error. see SP_OCT_TRUNC_PARTITION_BY_ID. because MINEXTENTS cannot be larger than the extents currently allocated.6. To support the replication of system-named interval partitions/subpartitions. SharePlex changes the name of the table in the active configuration file by commenting out the old configuration line and adding a new line at the end of the configuration file. Otherwise. can cause the wrong key values to be used for subsequent DML operations.5) Administrator Guide 204 . which results in target parameters of MAXEXTENTS 525 and MINEXTENTS 1.MOVE ALTER TABLE DDL commands that change the rowid of a table can affect subsequent DML operations if the primary or unique keys of the tables in replication are not being logged. and Post stops with error SP-OPO01002. SharePlex 8. SharePlex replicates both.6 (8. If the MAXEXTENTS of the source object is changed to unlimited..table2 August 5. if the MINEXTENTS is changed to 1 on the source. If the source and target table names are the same. both are changed to the new name. just the source name is changed. The following is an example:When ALTER TABLE RENAME is issued on a source table that is currently in replication.. SharePlex will replicate both the MAXEXTENTS change and the non-changed MINEXTENTS of 20.

SharePlex stores the DDL logs in the log subdirectory of the variable-data directory on the source and target systems.log 01. Post stops on DDL errors. By default.5) Administrator Guide 205 .log SharePlex 8. but it may be truncated.6. see the SharePlex Reference Guide.ora12_ocap_ddl_01.log 01. This enables you to correct the problem and keep the databases synchronized. Only the Post DDL log contains complete DDL statements.log o. The default setting of the SP_OPO_ STOP_ON_DDL_ERR parameter stops Post on DDL errors. Table 15: SharePlex DDL log naming conventions DDL log type Naming convention Example Capture o. An error usually indicates that the database component for which the DDL was executed on the source system does not exist in the target database.log Open Target r.ora12_server2_opo_ddl_ number.6 (8. For more information about this parameter.ORACLE_SID_machine_name_opo_ddl_log_ o.ORACLE_SID_ocap_ddl_log_number. SharePlex also prints replicated DDL to the SharePlex Event Log.database_name_machine_name_xpst_ddl_log_ r.DDL logging and error handling Both Capture and Post log the DDL that they process.log Oracle target o.mssdb1_server3_xpst_ddl_ target number. so that subsequent DML on that object does not fail.

and it will stop for those messages even if they are listed in the oramsglist file. Check the SID_errlog.5) Administrator Guide 206 . you can configure Post to ignore specific Oracle DML errors and specific SharePlex error messages and continue processing. For more information about these logs. Post also logs the error and the SQL statements that caused the error to the Error log. When Posts ignores an error. Contents Continue to post when there is a DML error Continue to Post when there is a DDL error Increase the number of retries on error Stop Post when data is out-of-sync Continue to post when there is a DML error SharePlex provides a way for Post to continue processing after it encounters a DML error. This log is named SID_errlog.sql log frequently to see if there were errors that could cause replication problems. IMPORTANT: Use caution when using this feature. 13 Set up error handling This chapter contains an overview of the tools that SharePlex provides to handle errors that are returned by the Post process. see View events and errors. it writes the error to the SharePlex Event Log. rather than stop.6 (8. Post determines which messages to ignore based on the list in the oramsglist file.6. It could result in hidden out-of-sync conditions.sql log file and is stored in the data directory in the SharePlex variable-data directory. but you can remove any of them as desired. NOTE: There are certain errors that Post will not ignore. The file is installed with a small list of errors by default. SharePlex 8. Enable this parameter only if your target users cannot tolerate replication lag and it is acceptable to have some out-of-sync data. Continue posting on Oracle and SharePlex errors Valid for Oracle targets When SharePlex posts to an Oracle target.

where ID is the database identifier. On the target system. see View events and errors. The messages need not be in numerical order.  9. add the number of each Oracle or SharePlex error. Save and close the file.  3. If you edited a copy of the oramsglist file. one per line as shown in the preceding example.sql log file. IMPORTANT: Use caution when using this feature. It could result in hidden out-of-sync conditions.  6. save the copy to the original name of oramsglist.6. Starting at the end of the file. For example. sp_ctrl> set param SP_OPO_CONT_ON_ERR 1  10. Start Post. Find the oramsglist file. sp_ctrl> start post Continue posting on ODBC errors Valid for Open Target When SharePlex posts to an Open Target target.  7. This number must be equal to the total number of errors that are in the file. The file is stored in the data directory in the SharePlex variable-data directory. ora@sys1dad > vi oramsglist 10 604 900 902 908 909 910 911 932 960 1026  5. open the file in a text editor.  4. Change the value of the SP_OPO_CONT_ON_ERR parameter to 1. If replication is active. Post also logs the error and the SQL statements that caused the error to the Error log. For more information about these logs.  2. make a copy of the file and then open the copy in the editor.To configure Post to continue on errors  1. sp_ctrl> stop post  8. Increase the number on the first line by the number of errors that you are adding. This log is named ID_errlog. Post writes the error to the SharePlex Event Log. in the following file there are 10 errors listed.6 (8. Enable this parameter only if your target users cannot tolerate replication lag and it is acceptable to have some out-of-sync SharePlex 8. change directories to the data sub-directory of the SharePlex variable-data directory.5) Administrator Guide 207 . you can configure Post to ignore ODBC errors and continue processing. Stop Post (if running). If replication is not active.

open the file in a text editor. Change the value of the SP_OPX_CONT_ON_ERR parameter to 1.6.5) Administrator Guide 208 . If replication is active. The messages need not be in numerical order. If you copied the original file. depending on the database. Example: sqlservermsglist: 8102 8180 544 2627 3621  5. On the target system. If replication is not active. Stop Post (if running). one per line as shown in the example. Save and close the file. add the number of each error. make a copy of the file and then open the copy in the editor. Start Post. sp_ctrl> set param SP_OPX_CONT_ON_ERR 1  9. Post stops on DDL errors. The default setting of the SP_OPO_ SharePlex 8. sp_ctrl> start post Continue to Post when there is a DDL error By default. To configure Post to continue on errors  1. Look for one of the following files. change directories to the data sub-directory of the SharePlex variable-data directory.  3.  6. These files are installed empty. Check the SID_errlog. save it back to its original name.6 (8. even if you list those errors in the message file.  8. An error usually indicates that the database component for which the DDL was executed on the source system does not exist in the target database.data. Starting at the end of the file.sql log frequently to see if there were errors that could cause replication problems. File name Supported database postgresmsglist EDB™ Postgres Advanced Server® sqlservermsglist Microsoft SQL Server sybasemsglist SAP Adaptive Server Enterprise (ASE) tdmsglist Teradata NOTE: There are certain errors for which Post will stop.  2. sp_ctrl> stop post  7.  4.

For more information about this parameter.STOP_ON_DDL_ERR parameter stops Post on DDL errors. possibly causing them to exceed the available disk space. you can increase the SP_OPO_RETRIES_MAX parameter so that Post tries the operation more times. so that subsequent DML on that object does not fail. Stop Post when data is out-of-sync By default Post does not stop when it determines that a row is out of synchronization.6. increase the SP_OPO_RETRY_DELAY_ TIME parameter to increase the time interval between the attempts. At the same time. This enables you to correct the problem and keep the databases synchronized. If Post stops. If the Post process is set to continue on error (SP_SYS_SUSPEND_ON_ERROR=0) or if the error message is listed in the oramsglist file. For more information.sql log file (where ID is the database identifier) and then continues processing to avoid replication lag. make certain to monitor replication frequently. Post moves on to the next transaction in the queue. You can configure Post to stop when it encounters an out-of-sync condition by setting the following parameter to 1:  l Oracle targets: SP_OPO_OUT_OF_SYNC_SUSPEND  l Open Target targets: SP_OPX_OUT_OF_SYNC_SUSPEND If you use this feature. latency increases and data accumulates in the queues. It logs the SQL statement and data to the ID_errlog. To increase the likelihood that the failed operations are successful. For more information.6 (8. Increase the number of retries on error Post will retry certain failed operations when there is the possibility that they will succeed with another attempt. That gives the lock or other blocking operation enough time to be resolved between attempts. see the SharePlex Reference Guide. Post stops after it reaches the maximum allowed attempts. see SP_OPO_RETRIES_MAX in the SharePlex Reference Guide. or locks on tables when Post needs to apply a TRUNCATE. see the parameter documentation in the SharePlex Reference Guide. The main operations that Post will retry are TNS write failures. connection failures. IMPORTANT: Reducing this parameter can cause the data to accumulate in the queues. In all other cases. SharePlex 8.5) Administrator Guide 209 .

Post takes no action on the replicated data.6.5) Administrator Guide 210 . Transformation enables SharePlex to manipulate data before. SharePlex 8. Contents Overview of transformation Considerations when using transformation Deploy transformation Overview of transformation Transformation directs the Post process to call a PL/SQL procedure (defined as a transformation routine) instead of applying a SQL operation to the target database. Therefore. if a source table and its target table are dissimilar in construction — like when a person’s first and last name are in one column in the source table but in separate columns in the target table — you can write a transformation routine to convert the data for those columns so that replication succeeds. This makes it practical for reporting. posting it to a target. when writing your routine. units of measurement. Supported databases Oracle source and target only Supported replication strategies Transformation is a convenient way to use SharePlex to transfer data from one table to another without concern for maintaining identical structure or data. When you specify transformation for a table. and data mart and warehousing applications. or character sets. broadcast. 14 Transform data This topic contains instructions for using the transformation feature of SharePlex. and for many other business requirements. For example. is your responsibility to include in your procedure the necessary SQL operations for posting. it passes data values to your transformation routine. You can use them instead of database triggers to reduce I/O overhead. or instead of. enabling you to control both the form and destination of the data with the procedure. posting to a target. You can use transformation routines to convert datatypes. post to an alternate location. or both. You can post to the target table. Transformation enables replicated data to be manipulated before. Instead. or instead of.6 (8.

6.Transformation is not suitable for peer-to-peer or high-availability replication environments. This option restricts the comparison to just the key values and is not a complete confirmation of synchronization. Review the following considerations before implementing transformation to ensure that your transformation procedures succeed. the repair command cannot be used to resynchronize data. It does not (and cannot) indicate whether values in non- key columns are properly correlated to those in the source columns. SharePlex locates the target row for UPDATEs and DELETEs by using the key. For peer-to-peer replication SharePlex must be able to detect and resolve conflicts when there are concurrent changes to the same record. You must devise your own resynchronization procedures based on your company’s business rules and the database environment. and the table also is part of a group of tables for which another routine is specified. Privileges Any table that will be accessed through PL/SQL for transformation requires implicitly granted privileges from the owner of the object to SharePlex. When data is transformed. Keys A PRIMARY or UNIQUE key is required for all tables using transformation. SharePlex 8. which enables it to return values to your transformation routine from the target table for UPDATE operations. and to make sure that one routine does not counteract another one. because the target data was transformed. SharePlex cannot compare before and after values to verify synchronization and detect conflicts. When data is transformed. For those reasons. It is a customization of SharePlex processing. SharePlex cannot compare before and after values to verify synchronization. Considerations when using transformation Because transformation changes data and because SharePlex does not post the data.  l You can use one procedure for all tables. which is a measure of whether the routines are performing correctly.6 (8.5) Administrator Guide 211 . High availability requires identical databases that are kept synchronized by replication. UPDATE and DELETE operations. The only way to confirm synchronization is to use the compare command with the key option. Do not allow keys to be changed on the target system. It only detects missing or extra rows. only the table-specific routine is used for that table when the associated DML operation occurs. If a transformation routine is specified for an individual table. or use different procedures for different tables. transformation changes the behavior of replication. or SharePlex will not be able to locate the row to pass values to your routine. or you can create a procedure for each operation type. You can do the following when developing procedures:  l You can create one procedure for all three operation types. SharePlex allows this through the use of wildcards to specify the tables. Supported operations Transformation supports only INSERT. Test your routines Test your transformation routines before you put them into production to make sure they work as intended.

Procedure interface Follow this template to create your procedure. you can use generic conflict resolution and transformation for different tables in the same configuration. See Create configuration files.Dates The default date format for SharePlex transformation is MMDDYYYY HH24MISS. For more information about conflict resolution.5) Administrator Guide 212 . SharePlex only calls the transformation routine.6. use the following command to change the date format in SQL*Plus.sp_cr. Tables with default dates must use that format. see Configure replication to maintain multiple peer databases.  l sp_cr is the name of the package that contains the PL/SQL record and table structures.  l Create configuration entries for the source and target tables to be transformed. Deploy transformation Deployment of transformation involves the following steps.  l Create transformation routines. or transformation will return errors. but not both. col_values insplex. This package was installed in the SharePlex schema in the database. The package uses the following parameters. SharePlex 8. combined with that of executing the procedure itself. If appropriate. (table_info in outsplex. Configure them as you would any other table. ALTER SESSION SET nls_date_format = 'MMDDYYYYHH24MISS' Other considerations  l Transformation does not support changes to LOB and LONG columns.6 (8. Transformed tables cannot be compared by SharePlex and conflict resolution cannot succeed.  l The processing overhead for passing data to your procedure.  l Complete the transformation file Create transformation routines Write your transformation routines with dynamic PL/SQL procedural language. There are no special configuration procedures for tables that use transformation. Use either generic conflict resolution or transformation for a table.  l The same PL/SQL package is used for both generic conflict resolution and transformation (its name is sp_ cr). Use parameters and record and table structures defined in the public package named sp_cr. If both are used. Before creating a table with a default date.row_typ.col_def_tabtyp) where:  l splex is the SharePlex schema.sp_cr. degrades overall performance on the target system compared to normal replication and posting.

"source_rowid VARCHAR2(20). "src_ora_time VARCHAR2(20). for example ‘123456’. indicating whether the operation is an INSERT.6 (8. If the row cannot be found using the PRIMARY key. for example postq1. Variable Description src_host The name of the source system (where the operation occurred). src_ora_sid The ORACLE_SID of the source database. SharePlex passes this metadata information to your procedure. target_rowid The row ID of the corresponding row in the target database. "src_ora_sid VARCHAR2(32)." SharePlex 8."emp.  l col_def_type is the name of the PL/SQL table that stores column information (see col_def_type table). "source_table VARCHAR2(78). Package definition SharePlex defines PL/SQL record and table structures in a public package named sp_cr in the SharePlex database schema. "action NUMBER. UPDATE or DELETE statement. either I. It is passed as a literal within single quotes. The package uses the following parameters. "CREATE or REPLACE PACKAGE %s. for example ‘123456’. It is case-sensitive and is passed in the same case as in the oratab file. the value is NULL. U or D. Windows Registry or V$PARAMETER table. src_ora_time The timestamp of the change record in the source redo log. "statement_type VARCHAR2(6).  l row_typ is the name of the PL/SQL record that passes in/out variables (see Package definition). "status NUMBER.5) Administrator Guide 213 . SharePlex obtains the row ID by querying the target database. "reporting NUMBER "). this variable consists of the name of the post queue. This value is case-sensitive and matches the way the table is named in the database. "target_rowid VARCHAR2(20). for example SysA . expressed as owner. It is passed within double quotes. "target_table VARCHAR2(78). for example "scott". source_table The owner and name of the source table. It is case-sensitive and is passed using the same case as on the source system. If there are named post queues in use on the target system.sp_cr AS "TYPE row_typ IS RECORD "(src_host VARCHAR2(32).table. IN variables For each row operation that causes a conflict. statement_type A letter. \n\t" "oracle_err NUMBER.6. source_rowid The row ID of the source row. It is passed as a literal within single quotes.

action Defines the action that you want SharePlex to take. Transformation: SharePlex passes a value of 0 for this variable. You must specify a value for this parameter.  l Conflict resolution: A value of 0 directs SharePlex to proceed with the SQL statement."emp. which directs SharePlex NOT to post the SQL statement. Variable Description target_table The owner and name of the target table.table. Conflict resolution: The Oracle error number that caused the conflict.6. In this case. Variable Description status Defines whether or not the procedure succeeded.5) Administrator Guide 214 .  l A value of 0 directs SharePlex NOT to post the SQL statement. the action SharePlex takes depends on what you specified as the action variable. depending on whether the procedure is used for conflict resolution or transformation." oracle_err This is different. expressed as owner. depending on whether the procedure is used for transformation or conflict resolution. This value is case-sensitive and matches the way the table is named in the database. SharePlex does not write any error messages to the Event Log when transformation succeeds. The outcome of this action depends on what you specify for the reporting variable Conflict resolution: Specifies the action to take as a result of an unsuccessful conflict resolution procedure. It acts differently. SharePlex does not write any log entries to the Event Log when conflict resolution succeeds. OUT variables These variables direct the action of SharePlex based on whether the procedure succeeded or failed).6 (8. It continues its processing by reading the next replicated operation in the post queue. for example "scott".  l A value of 1 implies that the procedure was unsuccessful. You must specify a value for this parameter. This variable is only used for conflict resolution. depending on whether the procedure is being used for conflict resolution or transformation. Your transformation routine is responsible for posting the results of the transformation either to the target table or another table. SharePlex 8. Transformation: You must specify a value of 0 for this parameter. Transformation: Post does not write any SQL. This is different.  l (Transformation only) A value of 7 implies unsuccessful execution and instructs the Post process to stop. It is passed within double quotes.  l A value of 0 implies successful execution.

 l Conflict resolution: For each row operation that causes a conflict. You must specify a value for this parameter.old_value varchar2(32764) . Variable Description The outcome of this action depends on what you specify for the reporting variable.is_key boolean .5) Administrator Guide 215 .6. SharePlex writes column information to col_def_tabtyp.  l A value of 0 directs SharePlex NOT to report an error or write the failed SQL statement to the SID_errlog.is_changed boolean .sql log and report an error to the Event Log.  l Transformation: For each row operation. for example emp_last_name. SharePlex writes column information to col_def_type. type col_def_tabtyp is table of col_def_typ Description of col_def_tabtyp Column Description column_name Tells your procedure the name of the column that was replicated from the source table. col_def_type table SharePlex creates a col_def_tabtyp PL/SQL table for each replicated operation. Following is the datatype that is used to populate the col_def_tabtyp table.datatype user_tab_columns. if one exists.new_value varchar2(32764) .column_name%type . reporting Determines how SharePlex reports unsuccessful procedural results. type col_def_typ is record (column_name user_tab_columns. although not all will have values if SharePlex cannot locate the row. This value is not case- SharePlex 8.sql log. Do not use them. Do not use it.datatype%type . All fields are passed by SharePlex to your routine.  l Values 1 and 2 are reserved for internal SharePlex use.6 (8.  l A value of 2 directs SharePlex to try the next conflict resolution procedure that you listed in the conflict resolution file. This table stores column information.  l The value of 1 is reserved for internal SharePlex use. It is different depending on whether the procedure is used for transformation or conflict resolution.current_value varchar2(32764) ).  l A value of 3 directs SharePlex to write the failed SQL statement to the SID_errlog.

 l For UPDATEs. old_value Tells your procedure the old value of the replicated column. is_key Tells your procedure whether or not the column is a key column. is_changed Tells your procedure whether or not the column value has changed. SharePlex passes a value of TRUE. INSERT operation column_name is_changed old_value new_value current_value1 is_key C1 TRUE NULL bind NULL FALSE C2 TRUE NULL bind NULL TRUE C3 FALSE NULL NULL NULL TRUE | FALSE SharePlex 8. If a NULL value is inserted. datatype Tells your procedure the datatype of the data in the replicated column. SharePlex passes a value of TRUE. because none of the columns existed in the database.  l For INSERTs. and conflict resolution could fail. For key columns. Column Description sensitive. is_changed is always FALSE. for example VARCHAR2. current_value Tells your procedure the current value of the column in the target table. Conflict resolution only: This is the pre-image against which SharePlex compared the source and target columns as part of its synchronization check for UPDATEs and DELETEs. then there is a conflict. SharePlex passes a value of FALSE. SharePlex will not be able to locate the correct row. the value is NULL . as changed on the source system. but SharePlex will pass a value for a changed key column.6 (8.5) Administrator Guide 216 . is_changed is TRUE for non-key columns.  l For DELETEs. Conflict resolution only: If a key value also was changed on the target system. If the column is not part of a key. is_changed is FALSE. If SharePlex cannot locate the target row. Example entries in col_def_tabtyp table per operation type The following tables illustrate the possible outcomes of each type of operation.6. This value is always in capital letters. is_changed normally is FALSE. This column is NULL for INSERTs. because SharePlex replicates only the key values for a DELETE statement. new_value Tells your procedure the new value of the replicated column. If the column is not changed. SharePlex passes a value of FALSE. because the row did not exist in the target database before the INSERT. is_changed is TRUE for non-NULL values. If it is a key column. before it was changed on the source system. If it is changed. If the old value passed by SharePlex does not match the current_value value obtained from the target row.

How to make entries in the file Use the following template to link a procedure to one or more objects and operation types. because the pre-images are different due to transformation.procedure SharePlex 8. UPDATE operation column_name is_changed old_value new_value current_value1. If the row cannot be found. IMPORTANT! There can be only one transformation.SID file. where SID is the ORACLE_SID of the target instance. Complete the transformation file To direct SharePlex to call transformation routines instead of posting SQL operations. If SharePlex cannot find the row by using just the PRIMARY key. If this file does not exist. Note: the SID is case-sensitive.SID file per active configuration.6 (8.object {i | u | d | iud} owner. If it cannot locate the row using just the PRIMARY key. SharePlex returns a NULL.SID file. 2 is_key C1 TRUE bind bind NULL | target_value FALSE C2 FALSE bind NULL NULL | target_value TRUE C3 TRUE bind bind NULL | target_value TRUE 1 (Conflictresolution) When an UPDATE fails. SharePlex does not return the current value for INSERTs. it returns the current value for the key column as well as the changed columns. Therefore. SharePlex cannot locate a row using the PRIMARY key and the pre-images. Post reads this file to determine if there is a transformation routine that it must call. use the transformation. then current_value is NULL DELETE operation column_name is_changed old_value new_value current_value1 is_key C1 FALSE bind NULL NULL TRUE 1 When a DELETE fails. If SharePlex finds the row. SharePlex returns the current value for the key column as well as the changed columns. it is because SharePlex could not find the row by using the PRIMARY key.1 When an INSERT fails.SID.5) Administrator Guide 217 . SharePlex searches for the row by using only the PRIMARY key. it searches for the row using just the PRIMARY key. you can create one in ASCII format in an ASCII text editor. If it finds it. it is because SharePlex cannot find the row by using the PRIMARY key and the pre-image. As an alternative.6. Use the file on the target system. then SharePlex returns a NULL. was included in the data sub-directory of the SharePlex variable-data directory when SharePlex was installed. Where to find this file A blank transformation. owner. It must be named transformation. Before executing a SQL operation. where SID is the ORACLE_SID of the target database. it is because a row with the same PRIMARY key already exists in the target database. 2 (Transformation) For an UPDATE. where SID is the ORACLE_SID of the target instance.

6 (8.)  l You can use an underscore (_) to denote a single-character wildcard.emp_tr2 scott. If you are not using the LIKE operator.6. You can specify any or all operation types. Start a comment line with the pound symbol (#). Syntax rules  l There must be at least one space between the object specification. For table names that contain an underscore character (for example emp_sal). SharePlex 8.  l owner. for example: like:scott.  l You a comment line anywhere in the file.  l You can use the LIKE operator and a SQL wildcard (%) to specify multiple objects by using a search string.procedure is the owner and name of the procedure that will handle the specified object and operation type.object is the owner and name of a target object. Upper or lower case are both valid. stop and re-start the Post process.%\_corp\_emp IUD scott.emp_tr1 like:scott% IUD scott.sal IUD scott. Example transformation file scott.sal_tr like:scott. SharePlex recognizes the backslash (\) as an escape character to denote the underscore as a literal and not a wildcard. or a wildcarded entry. and the procedure specification. the backslash escape character is not required if an object name contains an underscore.sal_tr How to change the file during replication You can change the transformation file any time during replication to add and remove tables and procedures.5) Administrator Guide 218 . After you change the file.%\_corp\_ emp.cust U scott. (See Syntax rules)  l i| u | d is the type of operation to be transformed by the specified procedure. the operation type specification. (See the Example. for example id or iud.where:  l owner.

 l The name of the local system must be the first non-commented line of this file.  l If an auth_hosts file does not exist on a system. SharePlex accepts all requests from all systems that attempt to connect to sp_cop.6 (8. SharePlex sends an error message similar to the following example to the Event Log: unauthorized connection attempt.  l All entries. or host authorization will not function.5) Administrator Guide 219 . the auth_hosts file must contain valid entries. including comments. This chapter provides guidelines for the configuration and use of these features. Contents Secure connections to SharePlex Secure data with SSH Encrypt data across the network Assign SharePlex users to security groups Secure connections to SharePlex SharePlex provides host authorization security that verifies whether or not SharePlex processes on specific remote systems are authorized to connect to the local system for service and command requests. must end with a return. SharePlex 8. Requirements  l If used. If this file exists but is empty or contains invalid entries. 15 Configure SharePlex security features SharePlex provides a number of security features that help protect replicated data on the local system and during transfer across a network. To configure the auth_hosts file NOTE: Begin comment lines with a pound character (#).6. To implement host authorization. you create an ASCII text file named auth_hosts in the data sub-directory of the SharePlex variable-data directory and then populate it with the names of systems being granted connection permission.

 3. NotePad (Windows).  2. On the first non-commented line.mycorp. If running multiple instances of sp_cop.com #Comment: remaining lines are remote hosts.  1.6. for example:Localhost.mycorp.6 (8.com remotehost3.mycorp. SharePlex 8. Specify as many host names as needed. Port forwarding allows you to establish a secure SSH session and then tunnel TCP connections through it.  l Using SSH with SharePlex requires the use of local port forwarding (also known as tunneling) within the SSH configuration. or WordPad (Windows) to open a blank file. Example Note the name of the local host is on the first non-commented line.com Secure data with SSH SharePlex uses the SSH® Secure ShellTM utility to provide encryption for network services such as secure remote login and other services over an insecure network. If you are using a Unix and Linux text editor. Localhost. Requirements  l Purchase and install the SSH software.  4. each on its own line.mycorp. remotehost. Run an ASCII text editor such as vi (Unix and Linux). #Comment: first line is local host name.  l This feature is supported on Unix and Linux.com.mycorp.5) Administrator Guide 220 .mycorp.com remotehost2.  l SharePlex can be configured to work with SSH software between a source system and one target system. enter the full machine name of the local system. for example remotehost. On the next non-commented line. enter one of the following: Value Description all Grants connection authorization to processes on all remote systems.com. If a source replicates to multiple targets. SSH is not included with Shareplex. Enter the fully qualified machine name. only one of the routes can be configured with SSH. hostname Grants connection authorization to the specified host. make certain to save the file to the correct variable-data directory. Save the file as auth_hosts in the data sub-directory of the SharePlex variable-data directory. change directories to the data sub-directory of the SharePlex variable-data directory before you run the editor.

 6. you can activate a configuration at this point. If there is an active configuration. On the source system. On the source system. set the SP_XPT_USE_LOCALHOST parameter in one of the following ways. This command connects to the target system to set up the tunnel.6. On the source system. set the parameter with the following syntax: sp_ctrl> set param SP_XPT_USE_LOCALHOST 1  l If there are multiple targets. use the list param command with the modified option to verify the parameter setting. export the correct variable-data directory for the instance of sp_cop for which you are setting up SSH.5) Administrator Guide 221 . the terminal window you are using must be kept open.  l source_port is the port number on the source system.To set up SharePlex to use SSH  1. For more information about starting SharePlex. Replication to the other target systems will connect directly in the normal fashion. stop and then start sp_cop to make the new parameter setting SharePlex 8. start sp_cop. ksh shell: export SP_SYS_VARDIR=/full_path_of_variable-data_directory csh shell: setenv SP_SYS_VARDIR /full_path_of_variable-data_directory  4.  l target_port is the port on the target system. You will be prompted for the password.  2.6 (8. see Run SharePlex. On the source and target systems. sp_ctrl> list param modified  8. If this argument is omitted.  7. For other replication strategies.  l target_host is the name of the target system.  l userid is your Unix and Linux user ID. use the following command to set up a tunnel to the target that will use SSH. choose an available local port to be used as the tunnel port. Refer to your SSH documentation for more information about these commands. run sp_ctrl from the bin subdirectory of the product directory.  l If there is only one target system. $ ssh -L source_port:target_host:target_port userid@target_host -N -f where:  l -L specifies that the specified port on the local host (acting as the client) is to be forwarded to the remote host and port.  3.  l -f forces the SSH shell to work in the background just before command execution. sp_ctrl> set param SP_XPT_USE_LOCALHOST to host 1 where: host is the name of the target system that will use the tunnel. choose a different port on each system. the port must be the same number on both systems. If the setting is correct. issue the following command from the command prompt. In sp_ctrl.  l -N specifies not to execute a remote command. This is used just to forward a port (protocol version 2 only). SSH cannot be started with nohup. For peer-to-peer and high availability replication.  5. In sp_ctrl. (If using multiple SharePlex instances) On the source system.

On the source system:  2. 256 bits). Encryption guidelines  l Use one encryption key for all Export processes in the SharePlex instance. Run the set encryption key command. The Export process controls whether encryption is performed and the size of the key. this parameter is set to 0 (encryption is disabled).  4. On the source system:  6. Enable encryption on the source system Set the Export parameter SP_XPT_ENABLE_AES to 1 on the source system.3 or later). Review the Encryption guidelines.6. See Set the key on the source and target. sp_ctrl> set param sp_xpt_enable_aes 1 Restart Export to activate this setting after you finish configuring encryption. Enable encryption in SharePlex by setting the SP_XPT_ENABLE_AES parameter to 1.  l SharePlex on both the source and target must be of a version that supports encryption (version 8. To stop sp_cop: sp_ctrl> shutdown /productdir/bin/sp_cop & To start sp_cop: $ /productdir/bin/sp_cop & Encrypt data across the network SharePlex encryption provides the ability to encrypt replicated data across the network. See Enable encryption on the source system  3. To configure encryption  1. See Create an encryption key on the source system. (Optional) Set the size of the key by setting the SP_XPT_AES_KEY_LENGTH parameter to the desired length (128-the default. 192.5) Administrator Guide 222 .6. By default. Stop and start Export to activate the SP_XPT_ENABLE_AES parameter. SharePlexuses industry-standard Advanced Encryption Standard (AES) encryption. It communicates these factors to the Import process. On the source and target systems:  5. SharePlex 8. Create an encryption key by running the create encryption key command.6 (8. active. See Set the key size on the source system.

The parameter takes effect the next time that Export starts. Set the key on the source and target The encryption key must be set on the source system plus all of the target systems. for example: E5F5D4CBA329D2C86B5D7ABA096C18600595490129F55A1422AAB0248B28D0E4. Without further options. To increase the key size to 192 or 256 bits. On the source: sp_ctrl> create encryption key On target 1: SharePlex 8. sp_ctrl> set encryption key key Component Description key The encryption key that was generated by the create encryption key command. See Set the key on the source and target. It must be 64 bytes long. The key must be set to the entire value that was generated by create encryption key. NOTE: This command only generates the key. set the Export parameter SP_ XPT_AES_KEY_LENGTH to the desired length on the source system.5) Administrator Guide 223 . the command affects all routes. Example: sp_ctrl> set encryption key E5F5D4CBA329D2C86B5D7ABA096C18600595490129F55A1422AAB0248B28D0E4 Example The following example creates and sets the encryption key.Set the key size on the source system By default the AES key size is 128 bits. You must set the key on all systems. To set a key Run the following command in sp_ctrl on the source and target systems.6. sp_ctrl> set param sp_xpt_aes_key_length {128 | 192 | 256} Create an encryption key on the source system Run the following command in sp_ctrl on the source system: sp_ctrl> create encryption key The command returns a randomly generated AES key.6 (8.

a user must have that command’s authorization level or higher.6 (8. anyone with permissions on the system can use the commands that view. Each group corresponds to an authorization level. sp_ctrl> set encryption key E5F5D4CBA329D2C86B5D7ABA096C18600595490129F55A1422AAB0248B28D0E4 On target 2: sp_ctrl>set encryption key E5F5D4CBA329D2C86B5D7ABA096C18600595490129F55A1422AAB0248B28D0E4 View and reset encryption To view the encryption key Use the show encryption key command to view the key that is being used by SharePlex. and control data replication. Description of the SharePlex security groups Refer to the following table to determine the group and authorization level that you want to grant each SharePlex user. or change SharePlex replication. sp_ctrl> show encryption key To reset the encryption key Use the reset encryption key command to remove the encryption key. which determines which SharePlex commands a person can issue. a person must be assigned to one of the SharePlex security groups on the systems where he or she will be issuing commands.5) Administrator Guide 224 . Commands that can only be issued by a SharePlex Administrator are: SharePlex 8. Overview of SharePlex security groups To monitor.6. Can issue all SharePlex commands. Without proper configuration of these groups. control. User Authorization Levels and Roles Auth User type User User roles level group 1 Administration spadmin* You need at least one user with Administrator rights on each source and target system. To execute a command. sp_ctrl> reset encryption key Assign SharePlex users to security groups The SharePlex security groups provide access control to the SharePlex command and control system. configure.

and logs to monitor replication only. For example: $ useradd –g spadmin –G dba. You must add the SharePlex Administrator user to the other nodes. unless you install SharePlex as a root user. status screens. create the groups in the /etc/group file before you run the SharePlex installer. shutdown  l all configuration commands relating to an active configuration  l all parameter commands except list param   l start capture   l stop capture   l abort capture   l truncate log The SharePlex Administrator user must be in the Oracle dba group. * The groups must exist because the installer adds the SharePlex Administrator user to the spadmin group during the installation process. In a cluster.5) Administrator Guide 225 . 3 Viewer spview Can view lists. the SharePlex Administrator user and the SharePlex admin group must exist prior to installation. The membership in Oracle Inventory group must be listed explicitly in the etc/group file. create them on all nodes.6 (8. but you must create them yourself on the other nodes. the installer creates the groups on the primary node. you can direct the installer to create the groups in the /etc/group file. Create and populate SharePlex groups on Unix and Linux Where and when to create the SharePlex groups on Unix and Linux depends on whether you install SharePlex as a root or non-root user.*  l If you install SharePlex as a root user.oinstall. 2 Operator spopr Can issue all SharePlex commands except those listed above. but you can designate any group or specify any name for that group during installation. If you install in a cluster. For Oracle RAC and ASM 11gR2 and above. Auth User type User User roles level group  l startup. On Unix and Linux. In a cluster. this user is only added to the primary node.  l If you install as non-root. the user must also be in the Oracle Inventory group. To create the groups in /etc/group # groupadd spadmin # groupadd spopr # groupadd spview SharePlex 8. NOTE: The default name for the SharePlex administrator group is spadmin.6.

To assign a user to a group  1. Open the /etc/group file.  3. The group ID must be unique.6. To assign a list of user names to a group. use a comma-separated list (see the following example).root. Create and populate SharePlex groups on Windows On Windows.jim. SharePlex 8. the SharePlex groups are created in the Windows User Accounts control panel by the SharePlex installer. In the example. Add the Unix or Linux user name to the appropriate group.jane.5) Administrator Guide 226 . no password is associated with the group.joyce. To assign users to these groups. “102” represents the numerical group ID. use that control panel after you install SharePlex. Users can verify their authorization levels by issuing the authlevel command in sp_ctrl. Save the file.  2.jerry If the password field is null. spadmin:*:102:spadmin. and spadmin is the group.6 (8. the asterisk (*) represents the password. Users can verify their authorization levels by issuing the authlevel command in sp_ctrl.

 l Reconcile replicated data with the copied data. During the activation of a configuration file.  l Start the processes that maintain the capture and replication of source transactions. The reconcile process is only required for procedures that start replication while the source database is active. Contents What is activation? Activation commands Requirements for activating a configuration Test the configuration before activation Frequently Asked Questions about activation How to activate multiple configuration files Activate replication with an Oracle hot backup on an active database Activate replication with an Oracle hot backup on a quiet database Activate replication with Oracle transportable tablespaces Activate replication with cold copy/transfer methods What is activation? When you activate a configuration. SharePlex 8.6 (8. SharePlex does the following:  l Copy the source data to the target database to establish an initial synchronization point. but it does capture and store active source transactions while the target is being established. Only one configuration can be active for any given datasource at a time.5) Administrator Guide 227 .6.  l Activate (read) the configuration file to build a series of internal structures that identify objects and routes. through the activate config command in sp_ctrl. Configurations for different datasources on a system can be active at the same time. SharePlex performs the following procedures. SharePlex applies transactions that occurred after the copy was taken and discards transactions that occurred before the copy (and thus were applied by the copy and would be redundant if applied by replication). 16 Activate replication in an Oracle production environment This chapter contains instructions for the initial startup of replication from an Oracle source database to an Oracle target database on production systems. SharePlex does not establish or populate the target database.

add the activation marker. Lock the tables. This number is stored in the SHAREPLEX_ACTID internal table and is transparent to SharePlex users. and whether a column is part of a key. NOTE: If an application uses NOWAIT locking on tables in the replication configuration. Assign an activation ID SharePlex assigns an activation ID number to each configuration activation and its associated replication processes and queues. This command retains control of the sp_ctrl command line until the activation is finished. A configuration can be activated many times. the NOWAIT could fail if it attempts to obtain a lock on an object that is already locked because it is being activated.5) Administrator Guide 228 . SharePlex 8. the marker deactivates it. Replication of each table begins as soon as its activation is complete. deactivate and view information about a configuration activation. Unlock the tables Each table is locked for a very short time. it places an activation marker in the data stream that tells the Capture process to start (or stop) replicating that table. 2. see the SharePlex Reference Guide. For tables using partitioned replication. Users can access the data in a source table when the activation lock is released. Activation commands Use sp_ctrl commands to activate. When SharePlex locks a table. 3. and type of columns. Create an object cache SharePlex builds an object cache to map the Oracle object IDs of the tables and sequences to their names. causing the removal of the old processes and queues after the data they contain is posted. Activate a configuration file Use the activate config command to activate a configuration file.6. For more information about these commands. SharePlex continues with the activation of the other tables. Should one or more table fail to activate. additional information is stored. For tables. unlock SharePlex locks the tables that are listed in the configuration file so that it can obtain the information it needs in a read-consistent state.6 (8. just long enough to activate a table.1. 4. and this ID keeps track of each one. the object cache includes standard metadata needed to support replication: the name. This marker directs sp_cop to generate a new set of replication processes and queues. Add a configuration change marker SharePlex places a configuration-change marker in the data stream. SharePlex locks the following:  l All tables added to replication (new and reactivated configurations)  l All tables removed from replication (reactivated configurations)  l All tables where routes changed (reactivated configurations) 5. As many tables can be locked concurrently as there are locking threads available. If another configuration is active for the same datasource. size. NOT-NULL constraints.

The purposes of these commands are different. and removes the associated SharePlex processes and queues.  l abort config is a forceful deactivation. It stops all replication activity for the configured datasource on the source and target systems. Deactivating or aborting a configuration stops replication. it is important to have all of your preparations done ahead of time. You can activate a configuration if you performed the minimal requirements outlined in this topic. whether or not data in the queues has been posted. Deactivate a configuration file Use the deactivate config or abort config command to deactivate a configuration.5) Administrator Guide 229 . SharePlex 8. the date and time the configuration was activated.6.  l deactivate config gracefully terminates replication for an active configuration. the command displays their status in the order in which they started. For more information about SharePlex user groups and authorization levels. the datasource.6 (8. Additional users should be assigned to monitor SharePlex and perform basic operational procedures. Therefore. This command displays the status of a configuration (active or inactive). It stops all Capture activity for the configuration. View configuration statistics Use the show config command in sp_ctrl to view statistics for active configurations. see Assign SharePlex users to security groups. If users continue making changes to the configured objects. the source and target data can go out of synchronization. uninterrupted. posts all data currently in the queues. leaving nothing in question. Requirements for activating a configuration Activation of a configuration is an event that requires a series of actions to be taken in a timely manner.View activation status Use the show activate command in sp_ctrl to view the status of all activation activity on a source system. but both deactivate a configuration file. If there are two or more concurrent activations. Required authorization level Only a SharePlex Administrator can activate a configuration. and the number of objects that are configured.

and DML from that table partition will not be replicated. Set up Oracle database objects for replication Set up an Oracle database to support SharePlex Set up Oracle redo logging to support SharePlex Set up SharePlex to support Oracle data Set up TDE Support SharePlex 8. Make certain your SharePlex configuration and setup Create configuration files are complete and any optional features are included Configure partitioned replication in the configuration or setup. depending on the activation procedure you are using. supported changes can be made to source objects while a configuration is active. but you will need to reactivate the configuration to update that table in the SharePlex object cache. Execute commands in sp_ctrl Understand the commands you will use during SharePlex Reference Guide activation.6. create those partitions before you activate a configuration to begin replication processing.  l If a table will be partitioned. Review the procedure before performing the steps.Required setup  l Before you activate a configuration. Partitioning a table while it is actively replicating causes SharePlex to lose the identifying information it has compiled. If you are configuring SharePlex to replicate supported DDL. Configure named queues Configure SharePlex security features Transform data Set up error handling Prepare the database to support replication.5) Administrator Guide 230 . Understand how to issue SharePlex commands. See the documentation for the following commands:  l activate config  l show activate  l reconcile  l status  l qstatus Additional commands and SharePlex utilities may be used. unless they satisfy a wildcard definition in the configuration file and you are replicating DDL. You can add a partition to a table already in replication. make certain that the objects that you want to replicate exist in the source instance.  l Make certain all of the following setup procedures were performed.6 (8. Requirement Documentation to Read Understand how to start and stop the sp_cop Run SharePlex program.

 l Report if a table specification will be skipped and the reason why. The verify config command does not verify how long the activation will take.  l Report if a host name specified in a route is unreachable. perform a test activation by using the verify config command. Database documentation Prevent DDL operations. Frequently Asked Questions about activation What happens during activation? During activation.  l List the qualifying objects included under wildcard specifications. Test the configuration before activation Before you activate a configuration in production. For more information. This command will test the configuration to find and report the following conditions:  l Verify the syntax of the entries in the configuration file.  l Report an error if the source object is not a table or sequence. depending on the size. including TRUNCATE. misspellings or duplicate entries in the configuration file.6 (8.) For more information. during Database documentation activation. number and structure of the configured objects. the entire activation will fail. DML changes are the only permissible changes during activation. Requirement Documentation to Read Plan and configure SharePlex to support your Create configuration files replication strategy Configure a replication strategy Open and mount the source and target databases. SharePlex gets the information it needs to identify and understand the objects that are configured for replication and build routing maps.  l Report if there are duplicate specifications for a single object. nor will it verify the target objects or database connection (as represented by the database identifier listed in the routing map. see the verify config command in the SharePlex Reference Guide. How long does activation take? The length of time that activation takes varies. If there are syntax errors.5) Administrator Guide 231 . SharePlex 8. see What is activation?.6. Where permitted.

Once activation is finished. Ideally. You can use the abort config command to terminate an activation. but keep in mind that if the DDL is not the kind supported by SharePlex and configured for replication. See How to activate multiple configuration files. ConfigB and ConfigC for instance ora10. Can I interrupt an activation to make changes? Yes and no. Only DML changes are permitted on objects that are being activated. you should have a tested configuration file ready to be activated and be prepared to issue commands to the database and to SharePlex. Then the lock is released. Each source table is briefly locked so SharePlex can build its internal object information. if a business application has NOWAIT locking. Activation is meant to be an uninterrupted procedure that initiates replication while maintaining the same series of transactional events as those appearing in the redo log. SharePlex 8.6 (8. but you may then need to clean out the queues and resynchronize the source and target data again. DDL can be performed. How to activate multiple configuration files You can activate one configuration per datasource (Oracle instance) on a system. For example. You can override this value for a particular activation by using the threads option when you issue the activate config command. Can I increase the number of activation threads? Yes. This is highly recommended. See Requirements for activating a configuration. Can I test a configuration before I activate it? Yes. The number of threads is controlled globally by the SP_OCF_THREAD_COUNT parameter. You can create as many configurations for the same Oracle source data (meaning in the same Oracle instance) but only one can be active at the same time. However. the SharePlex lock may cause the application to fail if it attempts to obtain a lock on an object that is being activated. Activating another configuration for the same datasource automatically deactivates the first one.6. Can DDL be performed during activation? No.5) Administrator Guide 232 . This happens very quickly and may not even be noticeable by users. if there are ConfigA. you can activate only one of them at a time. which must be set before you issue the activate config command. Can I activate configurations for different datasources at the same time? Yes. Use the verify config command. but the database must be mounted and open.Do users have to stop access to the data? No. Can I activate multiple configurations for the same datasource? No. the DDL may cause the source and target objects to become out of synchronization. Can I activate against a quiet database? Yes.

then open another session of sp_ctrl to activate the second one. A backup from one source will override the data that was applied by a backup from a (many different source.However.OraA and ConfigB replicates data from o. you can override this value for a particular activation by using the threads option when you issue the activate config command. Preliminary considerations Read these points before you proceed. The number of activation threads is controlled by the SP_OCF_THREAD_COUNT parameter. To activate multiple configuration files The activation process retains control of the sp_ctrl interface until the activation is finished. you can activate both of those configurations at the same time. Activate the first configuration.6. which is a global setting for the instance of SharePlex. you can use different configurations in different sessions of sp_ ctrl.5) Administrator Guide 233 . you must: SharePlex 8. This procedure involves using the reconcile command to ensure that transactions which occurred after the point of backup are applied to the target. and then use another copy method to apply the objects from the other source one target) instances. the use of a hot backup from all source systems is not replication possible. When activating more than one configuration concurrently. You can use a hot backup of one of the source instances to establish a target sources to instance. Activate replication with an Oracle hot backup on an active database Use this procedure to use an Oracle hot backup to establish a target Oracle instance and activate replication without quieting the source database.6 (8. Supported databases Oracle source and Oracle target Supported replication strategies All replication strategies are supported with the following limitations: Limitation Description applies to: Consolidated To establish consolidated replication. Possible methods include:  l Export/import (see Activate replication with cold copy/transfer methods)  l Transportable tablespaces (see Activate replication with Oracle transportable tablespaces) Peer-to. Open as many sessions of sp_ctrl as you have configurations to activate. if ConfigA replicates data from o. while eliminating redundant replicated transactions that are already captured by the backup. Because an activation can take a significant amount of time. Replication for those configurations can operate concurrently. To establish peer-to-peer replication.OraB.

On the source and target systems. stop the Post process. Requirements  l [Unix and Linux systems] Verify that the ORACLE_SID and ORACLE_HOME in the oratab file are correct for the instance you will be establishing with the hot backup. run the Oracle hot backup. go to the bin sub-directory of the SharePlex product directory. Activate replication with an Oracle hot backup on an active database Activation with hot backup: cascading replication Activation with hot backup: all strategies except cascading Use this procedure for all replication strategies except cascading replication where SharePlex will be posting to a database on the intermediary system. Windows To use a hot backup between Windows systems. This allows replicated data to accumulate in the post queue until the database has been recovered and reconciled.6. Limitation Description applies to: peer  1.  l Make certain a SharePlex database account exists in the source database (only). and start sp_cop and sp_ctrl. and then follow this procedure. The database can start empty. SharePlex 8. Only after this procedure has been performed on all of the secondary systems may users may resume activity on them. This account usually is created when SharePlex first is installed.  2.  l Before you start. On both systems.  2. The SID must be the SID used in the routing map in the configuration file that you will be activating. and the Registry entries must exist before starting the database recovery process. sp_ctrl> stop post  4. On the source system. On the target system.6 (8. the target system must have an instance systems already created containing an identical ORACLE_SID and directory structure created with the Oracle creation tools. depending on your replication strategy. verify that the SharePlex processes are running. Quiet all of the systems except the trusted source system for the duration of this procedure. review this procedure and see the SharePlex Reference Guide for more information about the commands that are used. because the hot backup will populate it.  l Read the requirements in Requirements for activating a configuration before you start this procedure.  1. Procedures There are two procedures for activation with a hot backup. See the SharePlex Installation Guide for more information. Oracle runs as a service on Windows. sp_ctrl> status  3.5) Administrator Guide 234 . Move all users to the trusted source system.

sp_ctrl> qstatus  13.6. [Optional] If you are using named post queues and are unsure of the queue names.sql script to truncate the SharePlex internal tables. and cancel the recovery after Oracle has applied the logs matching the SCN from the previous step.oraA-o. issue the reconcile command as follows.  11. Would you like to create a new SharePlex user [y]. sp_ctrl> reconcile queue queuename for datasource-datadest seq sequence_number Example: reconcile queue SysA for o. When activation is complete.oraA scn 0123456789 NOTE: The command retains control of sp_ctrl until the reconcile process is finished.  10. sp_ctrl> activate config filename  6. sp_ctrl> reconcile queue queuename for datasource-datadest scn scn_number Example: reconcile queue SysA for o. pick an SCN to recover to on the target database.oraA seq 1234  l If recovering to a SCN. issue the qstatus command. recover the database from the hot backup using the UNTIL CHANGE scn option in the RECOVER clause. recover the database from the hot backup using the UNTIL CANCEL option in the RECOVER clause.  14. run the cleanup.  l To recover the database to a Oracle System Change Number (SCN).oraA-o. sp_ctrl> show activate NOTE: The command retains control of sp_ctrl until activation is finished. make a note of the highest archive-log sequence number. depending on the recovery option you chose.  12. run Oracle Setup (ora_setup) on the database. When prompted for the SharePlex database user.  8.  9.  l If recovering to a sequence number. On the target system. On the target system. activate the configuration on the source system. Instructions for running this script are in the SharePlex Reference Guide. switch log files on the source system. On the target system. and cancel the recovery after Oracle has fully applied the log from the previous step. If you are using named post queues. substitute the SCN that you noted previously.  5.  7. When the backup is finished.6 (8. monitor activation status. On the target system. do one of the following:  l If recovering to a sequence number.5) Administrator Guide 235 . On the target system. SharePlex 8. issue the command for each one. On the source system. enter n to choose the existing user and password (these were copied in the backup). open the database with the RESETLOGS option. n NOTE: SharePlex can remain running during the setup process.  l If recovering to a SCN. Do one of the following:  l To recover the database to a sequence number. substitute the sequence number of the log that you noted previously. svrmgr1> alter system switch logfile.

 6. On the target system. delete the unneeded columns and rows from those tables.5) Administrator Guide 236 . [High availability and peer-to-peer only] On the target (secondary) system.sql utility script so that the triggers ignore the SharePlex user. The two instances are now in synchronization. svrmgr1> alter system switch logfile.  8. This allows replicated data to accumulate in the post queue until the databases are recovered. sp_ctrl> show activate NOTE: The command retains control of sp_ctrl until activation is finished. Activation with hot backup: cascading replication Use this procedure for cascading replication where SharePlex will be posting to a database on the intermediary system. On all systems. sp_ctrl> start post  21. Make a note of the highest archive-log sequence number. verify that the SharePlex processes are running. sp_ctrl> stop export  19. drop the tablespaces that were not copied over during the hot backup. run the Oracle hot backup to the intermediary and target systems.  16.  4. You will apply the backup to the intermediary system first (represented as “sysB”). sp_ctrl> stop post  5. [High availability only] On the target (secondary) system. SharePlex 8. disable check constraints and scheduled jobs that perform DML. switch log files on the source system. disable triggers on the tables. On the intermediary and target systems. and SharePlex will continue replicating to maintain synchronization. start the Post process.  17. On the target system. activate the configuration on the source system. stop Export. On the source system.  9. stop the Post process.6 (8. activate the configuration so that SharePlex is ready in the event of failover.  1. sp_ctrl> activate config filename  7. [Optional] If this was only a partial backup. [Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables. and start sp_ cop and sp_ctrl  2. sp_ctrl> activate config filename  20.6. go to the bin sub-directory of the SharePlex product directory. When the backup is finished.  18. or run the sp_add_trigger. On the target system. sp_ctrl> status  3. and then to the target system (represented as “sysC”). When activation is complete. On the source system. On all systems. view activation status.  15.

On the intermediary system. and cancel the recovery after Oracle has fully applied the log from the previous step. Would you like to create a new SharePlex user [y]. disable check constraints and scheduled jobs that perform DML. When prompted for the SharePlex database user.  20. sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1  19.  11. recover the database from the hot backup using the UNTIL CANCEL option in the RECOVER clause. On the intermediary system. SharePlex 8. On the target system.sql utility script so that the triggers ignore the SharePlex user. issue the qstatus command.oraA-o. Instructions for running this script are in the SharePlex Reference Guide. This directs SharePlex to capture posted changes on that system and replicate them to the target system. or run the sp_add_trigger. open the database with the RESETLOGS option. On the intermediary system.  13. disable triggers on the tables.6. Would you like to create a new SharePlex user [y]. or run the sp_add_trigger. On the intermediary system. n NOTE: SharePlex can remain running during the setup process.  24. sp_ctrl> qstatus  14. On the intermediary system. n NOTE: SharePlex can remain running during the setup process. On the target system. open the database with the RESETLOGS option. 10. run Oracle Setup (ora_setup) on the database. Instructions for running this script are in the SharePlex Reference Guide. On the target system. substitute the sequence number of the log that you noted previously. enter n to choose the existing user and password (these were copied in the backup).  23.  25.  22. run the cleanup.sql utility script so that the triggers ignore the SharePlex user.  21. On the intermediary system. enter n to choose the existing user and password (these were copied in the backup). delete the unneeded columns and rows from those tables. [Optional] If you are using named post queues and are unsure of the queue names.  12.  16. set the SP_OCT_REPLICATE_POSTER parameter to 1. disable check constraints and scheduled jobs that perform DML. IMPORTANT! Do not start any Post processes yet.sql script to truncate the SharePlex internal tables. On the target system. run the cleanup. recover the database from the hot backup using the UNTIL CANCEL option in the RECOVER clause.  17.6 (8. run Oracle Setup (ora_setup) on the database. When prompted for the SharePlex database user. On the intermediary system.sql script to truncate all of the SharePlex internal tables. issue the reconcile command for each post queue. On the target system.5) Administrator Guide 237 .oraA seq 1234  15. For seq sequence_ number. On the intermediary system.  18. [Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables. On the target system. and cancel the recovery after Oracle has fully applied the log that you reconciled to in the previous steps taken on the intermediary system. sp_ctrl> reconcile queue queuename for datasource-datadest seq sequence_number Example: reconcile queue SysA for o. disable triggers on the tables.

drop the tablespaces that were not copied over during the hot backup. Preliminary considerations Read these points before you proceed.  26.  27. activate the configuration file. monitor activation status.  29. sp_ctrl> show activate NOTE: The command retains control of sp_ctrl until activation is finished. and SharePlex will continue replicating to maintain synchronization. Certain limitations apply: Limitation Description applies to: Consolidated To establish consolidated replication. This procedure is not appropriate for a high-availability strategy because it requires the source database to be quieted while the backup is taken and the configuration file is being activated. This procedure can be used for all replication configurations. On the intermediary and target systems. Activate replication with an Oracle hot backup on a quiet database Use this procedure to use an Oracle hot backup to establish a target Oracle instance and activate replication if user activity can be stopped while the procedure is performed. delete the unneeded columns and rows from those tables. [Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables. the use of a hot backup from all source systems is not replication possible.6 (8. start the Post process. On the intermediary system. and then use another copy method to apply the objects from the other source one target) instances. sp_ctrl> start post  30. Supported databases Oracle source and Oracle target Supported replication strategies All but high-availability.6. sp_ctrl> activate config filename  28. Possible methods include:  l Export/import (see Activate replication with cold copy/transfer methods) SharePlex 8. A backup from one source will override the data that was applied by a backup from a (many different source. On the intermediary system. You can use a hot backup of one of the source instances to establish a target sources to instance. All instances are now in synchronization.5) Administrator Guide 238 . [Optional] If this was only a partial backup.

On all systems. For more information about cascading replication. and the Registry entries must exist before starting the database recovery process.  l Read the requirements in Requirements for activating a configuration before you start this procedure.  6. Limitation Description applies to:  l Transportable tablespaces (see Activate replication with Oracle transportable tablespaces) Windows To use a hot backup between Windows systems.5) Administrator Guide 239 . Oracle runs as a service on Windows.  4. Procedure NOTE: If you are not using cascading replication. sp_ctrl> activate config filename  9. switch the redo logs svrmgr1> alter system switch logfile. view activation status. the target system must have an instance systems already created containing an identical ORACLE_SID and directory structure created with the Oracle creation tools. On all systems. start sp_cop and sp_ctrl from the bin sub-directory of the SharePlex product directory.  l Make certain a SharePlex database account exists in the source database (only). On the source system.6 (8. On the source system. stop Post. because the hot backup will populate it. sp_ctrl> status  7. see Configure replication through an intermediary system. stop user access to the source database by shutting it down and opening it in restricted mode. On the source system. verify that sp_cop and sp_ctrl are running.  1. On the intermediary and target systems. Stopping Post allows replicated data to accumulate in the post queue until the databases have been recovered.  3. ignore all references to an intermediary system. review this procedure and see the SharePlex Reference Guide for more information about the commands that are used.  2. sp_ctrl> stop post  8. complete the Oracle hot backup. Requirements  l [Unix and Linux systems] Verify that the ORACLE_SID and ORACLE_HOME in the oratab file are correct for the instance you will be establishing with the hot backup. The database can start empty. SharePlex 8.6.  5. On the source system. activate the configuration file.  l Before you start. On the source system. The SID must be the SID used in the routing map in the configuration file that you will be activating. Keep a record of the sequence number of the current log. This account usually is created during SharePlex installation. See the SharePlex Installation Guide for more information.  l Users must stop accessing the production database while the hot backup and configuration activation take place.

sp_ctrl> show activate NOTE: The command retains control of sp_ctrl until activation is finished. and SharePlex will continue replicating to maintain synchronization. [Intermediary system only] On the intermediary system. sp_ctrl> activate config filename  21. Instructions for running this script are in the SharePlex Reference Guide. This directs SharePlex to capture posted changes on that system and replicate them to the target system.  19. disable triggers on the tables. All instances are now in synchronization. run Oracle Setup (ora_setup) for the target instance.  18.  13. When the activation is finished.  22. On the intermediary system. set the SP_OPO_REPLICATE_POSTER parameter to 1. open the database. Make sure a full recovery is performed. On the intermediary system. monitor activation status.  11.6 (8. On the intermediary and target systems.sql utility script so that the triggers ignore the SharePlex user. activate the configuration file.  17. allow users to resume access to the source database. List the archive logs on the intermediary and target systems. start the Post process on the intermediary and target systems. SharePlex 8. sp_ctrl> show activate NOTE: The command retains control of sp_ctrl until activation is finished. drop the tablespaces that were not copied over during the hot backup. When activation is finished. Delete any logs made after the one for which you made a record. or run the sp_add_trigger. On the intermediary and target systems.n NOTE:SharePlex can remain running during the setup.5) Administrator Guide 240 . recover the database to the log number that you recorded. disable check constraints and scheduled jobs that perform DML. On the intermediary and target systems.  10. On the intermediary and target systems.  14.6. [Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables. sp_ctrl> start post  23.  16. [Optional] If this was only a partial backup.  12. run the cleanup. delete the unneeded columns and rows from those tables on the intermediary and target systems. enter n to choose the existing user and password (these were copied in the backup). On the intermediary and target systems. sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1  20. When prompted for the SharePlex database user.  15. Would you like to create a new SharePlex user [y]. On the intermediary and target systems.sql script to truncate the SharePlex internal tables.

including cascading replication. and you can move multiple tablespaces at one time. Preliminary considerations Read these points before you proceed. NOTE: This document does not provide instructions for how to use transportable tablespaces. Requirements  l Read the requirements in Requirements for activating a configuration before you start this procedure.  l The secondary systems in a peer-to-peer replication configuration.5) Administrator Guide 241 .Activate replication with Oracle transportable tablespaces Use this procedure to use the Oracle transportable tablespaces feature to establish a target Oracle instance and activate replication. This procedure may not appropriate for a high-availability strategy if the source database cannot be quieted even briefly. This account usually is created when SharePlex is first installed.  l Make certain a SharePlex database account exists in the source database (only). an intermediary system in a cascading configuration.  l All source systems of a consolidated replication configuration. See the SharePlex Installation Guide for more information. It enables you to synchronize and resynchronize numerous objects quickly and with minimal downtime. the "intermediary" system only needs to be part of this procedure if SharePlex will be posting to. In this procedure. In this procedure. Naming conventions used In this procedure.  l Before you start.6. the "source" system is one of the following:  l The source system of a single-direction replication configuration. and capturing from. This method also moves indexes so that there is no need to rebuild them in the target database. Supported databases Oracle source and Oracle target Supported replication strategies All replication strategies.  l The trusted source system in a peer-to-peer replication configuration. including cascading and consolidated replication. SharePlex 8. This procedure should be performed by someone who has a solid understanding of database copy methods.6 (8. review this procedure and see the SharePlex Reference Guide for more information about the commands that are used. the "target" system is one of the following:  l The target system of a single-direction replication configuration. It allows you to export just the metadata (data dictionary) and then copy the data files.

set the source tablespaces that you want to copy to READ ONLY. sp_ctrl> activate config filename SharePlex 8. svrmgr1> alter tablespace name read only.6.  13. start sp_cop and sp_ctrl from the bin sub-directory of the SharePlex product directory. set the tablespace(s) to read/write mode. On the intermediary and target systems.  2.  4. When the export is finished. On the source system.  8.  17. Copy the files from the new location on the source system to the intermediary and target systems.  12. This minimizes the impact on the source database of copying the files to the target system. On the intermediary and target systems.  10. [Intermediary system only] Set the SP_OPO_REPLICATE_POSTER parameter to 1. the SharePlex commands in the procedure apply to all sp_cop instances that apply to the replication strategy you are using (for example. If any of the copied datafiles and tablespaces exist in the intermediary or target database.  7. On the source system. sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1  18. copy the datafiles to another location on the source system.In this procedure. verify that sp_cop and sp_ctrl are running. [Intermediary system only] Activate the configuration file. export the metadata to an export file. This directs SharePlex to capture posted changes on that system and replicate them to the target system. activate the configuration file.  16. On the intermediary and target systems. use the Oracle import utility to import the metadata and the tablespace definitions. stop Post.  14. disable triggers on the tables. On the intermediary and target systems.  9. sp_ctrl> status  5. delete the unneeded columns and rows from those tables on the intermediary and target systems. [Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables. open the Oracle instances.sql utility script so that the triggers ignore the SharePlex user. On the source system.6 (8. sp_ctrl> stop post  6. On the source system. On the intermediary and target systems. Set the source tablespaces back to read/write mode. Procedure  1. disable check constraints and scheduled jobs that perform DML. or run the sp_add_trigger.5) Administrator Guide 242 . all sp_cop processes on a target in consolidated replication). On the source system.  15. Stopping Post allows replicated data to accumulate in the post queue until the databases have been recovered. svrmgr1> alter Tablespace name read write.  11. sp_ctrl> activate config filename  3. On the intermediary and target systems. drop them so that the copied files can be applied.

6. stop the Export process. Start Post on the intermediary and target systems. sp_ctrl> start post  22. This procedure should be performed by someone who has a solid understanding of database copy methods. sp_ctrl> stop export  20. Preliminary considerations Read these points before you proceed.  19. SharePlex begins executing the SQL statements that have been collecting in the post queue.  l The target instance must exist. SharePlex 8. Activate replication with cold copy/transfer methods Use this procedure to synchronize the source and target data with the following utilities:  l Import/Export/Data Pump  l Store/Restore from tape  l FTP NOTE: This document does not provide instructions for how to perform the chosen copy method. [High availability and peer-to-peer replication] Activate the configuration on the target system(s).5) Administrator Guide 243 .  l Read the requirements in Requirements for activating a configuration before you start this procedure. This procedure is not appropriate for a high-availability strategy because it requires the source database to be quieted while the configuration file is being activated.  l Users must stop accessing the production database while the copy and configuration activation take place.6 (8. Requirements  l [Unix and Linux systems] Verify that the ORACLE_SID and ORACLE_HOME in the oratab file are correct for the instance you will be establishing with the hot backup. [Peer-to-peer replication] Allow users to access the databases on all systems. sp_ctrl> activate config filename  21. keeping the source and target data in sync. Supported databases Oracle source and Oracle target Supported replication strategies All but high-availability. The SID must be the SID used in the routing map in the configuration file that you will be activating. [High availability] On the target system.

5) Administrator Guide 244 . On the intermediary and target systems. stop user access to the objects that are in the replication configuration.  l The secondary systems in a peer-to-peer replication configuration. stop Post. Procedure  1.  l If deploying peer-to-peer replication. sp_ctrl> stop post  7. and Read processes are running. you can either stop access to all of the source systems at once and make the copies at the same time. the "target" system is one of the following:  l The target system of a single-direction replication configuration.  l If deploying consolidated replication. On the source system. all sp_cop processes on a target in consolidated replication). On the source system.  l Make certain SharePlex database accounts exist in the source and target databases. stop access to all databases in the peer group.  l The trusted source system in a peer-to-peer replication configuration. Start and mount the intermediary and target databases. This account usually is created during installation.  4. review this procedure and see the SharePlex Reference Guide for more information about the commands that are used. including cascading replication.6 (8.  3.  2. sp_ctrl> activate config filename  5. but do not allow users access. Stopping Post allows any data that gets replicated before the target data is established to collect in the post queue. Naming conventions used In this procedure. On the source system. and capturing from. including cascading and consolidated replication. See the SharePlex Installation Guide for more information. On the source system. verify that the sp_cop. the "source" system is one of the following:  l The source system of a single-direction replication configuration. the "intermediary" system only needs to be part of this procedure if SharePlex will be posting to. an intermediary system in a cascading configuration. In this procedure. Capture. allow users to resume access to the source database. the SharePlex commands in the procedure apply to all sp_cop instances that apply to the replication strategy you are using (for example. In this procedure. On the intermediary and target systems.  6.  8. On the source system. start sp_cop and sp_ctrl. sp_ctrl> status  9.  l Before you start. Copy the files from the source system to the intermediary and target systems. activate the configuration file (all files if using consolidated replication). SharePlex 8. or you can synchronize each source system one at a time using these instructions.6. including the trusted source. start sp_cop and sp_ctrl.  l All source systems of a consolidated replication configuration. In this procedure.

apply the copy to the database.  17. This directs SharePlex to capture posted changes on that system and replicate them to the target system.  13. disable triggers on the tables. disable check constraints and scheduled jobs that perform DML. 10. allow users to resume access to the database. Start Post on:  l The intermediary system  l The trusted source and all other targets in a peer group  l All other targets NOTE: SharePlex will start executing SQL statements that accumulated in the post queue.5) Administrator Guide 245 .  11. SharePlex 8. On the intermediary and target systems. [Intermediary system only] Activate the configuration file. or run the sp_add_trigger.6 (8. sp_ctrl> activate config filename  16. [Peer-to-peer] On the target systems in the peer group. [Intermediary system only] Set the SP_OPO_REPLICATE_POSTER parameter to 1.  14. [Peer-to-peer] Activate the configuration file on the target systems. [Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables. delete the unneeded columns and rows from those tables on the intermediary and target systems.sql utility script so that the triggers ignore the SharePlex user. On the intermediary and target systems. sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1  15.  18.6. On the intermediary and target systems.  12.

17 Monitor SharePlex This chapter contains an overview of the tools that SharePlex provides to detect errors and monitor the replication processes.  l The sp_cop process is the root process. In normal circumstances. you can use the ps -ef | grep sp_ command to view the SharePlex processes that are running.5) Administrator Guide 246 . Contents View and terminate SharePlex processes View events and errors Monitor with sp_ctrl commands Run monitor scripts on Unix Run a monitor script on Windows Monitor replication with SNMP View and terminate SharePlex processes These instructions show you how to forcefully terminate SharePlex processes in cases where replication must be shut down immediately.6 (8. Like any mission-critical software.6. follow the shutdown instructions in Run SharePlex on Unix and Linux and Run SharePlex on Windows View and terminate processes on Unix and Linux On Unix and Linux systems. especially those that could result in loss of data synchronization. SharePlex should be monitored regularly for situations or events that could interfere with processing.  l The following child processes are spawned by sp_cop on a source system:  o Command and Control process (sp_cnc)  o Capture (sp_ocap)  o Read (sp_ordr)  o Export (sp_xport)  l The following child processes are spawned by sp_cop on a target system: SharePlex 8.

SharePlex 8. as you would other Windows programs.exe process spawns child Sp_Copsrv.exe process for each one.  1.exe. However. rather than the Windows operating system. On the target system:  l One parent Sp_Copsrv.  l From the Windows Task Manager. there are following processes on a Windows system: On the source system:  l One parent Sp_Copsrv. The operating system controls the parent Sp_Copsrv. Import (sp_mport)  3..exe process.).  l If there are any additional SharePlex processes running. The parent Sp_Copsrv.6 (8.exe process.exe process.  l One Sp_Ocap (Capture) process plus one child Sp_Copsrv.. This makes it easier to identify related processes when multiple session of sp_cop are running.  l One Sp_Xport (Export) process plus one child Sp_Copsrv.6. Export.  l One Sp_Mport (Import) process plus one child Sp_Copsrv. there is an additional Sp_ Copsrv.exe service. To terminate a SharePlex process on Unix and Linux $ killPID Or.exe process. Post. representing the SharePlex sp_cop process. SharePlex is managed by the NuTCRACKER operating environment. Post (sp_opst_mt if the database is Oracle or sp_xpst if the database is Open Target) Each child process has the same -u identifier as its parent sp_cop process. Command and Control process (sp_cnc)  2. Import. such as sp_ctrl.exe process.  l One Sp_Ordr (Read) process plus one child Sp_Copsrv.exe process.exe processes — one for each replication process (Capture. SharePlex appears as Sp_Copsrv. $ kill -9PID View and terminate SharePlex processes on Windows On Windows systems. In the Windows Task Manager. View SharePlex processes on Windows You can view the SharePlex processes on Windows systems in the following ways:  l From the Command Prompt console using the tlist program provided with the SharePlex software.  l One Sp_Opst_Mt (Oracle Post) or Sp_Xpst (Open Target Post) process plus one child Sp_ Copsrv.5) Administrator Guide 247 . sp_ctrl.exe process. For a standard uni-directional configuration replicating through default queues to one target system. and so forth. Read. you can view and terminate SharePlex processes in the normal manner.

bat from the bin sub-directory of the SharePlex product directory. errors. Event Log SharePlex reports operational errors. NOTE: This tool terminates all SharePlex processes without displaying them. Select Start Task Manager or Task Manager. To identify which replication process is associated with a child Sp_Copsrv.exe process.  6. To terminate a process with Task Manager  1.  5. such as sp_ctrl.bat: Terminate all SharePlex processes at once with a batch file. The Event Log can help you replay the sequence of events that led up to a problem. If there are no active replication configurations.bat Run KillSharePlex. look for the one that is using the largest amount of memory.  2. To identify the parent Sp_Copsrv.6 (8. To terminate all processes with KillSharePlex. View events and errors SharePlex reports errors and other abnormal conditions in the following ways.exe process.exe will be running.exe processes consume less memory than the parent process. depending on your Windows version.  3. User-issued commands are recorded for every SharePlex command SharePlex 8. (Optional) Sort the processes by name. Select the Processes tab. look in the SharePlex Event Log for the message stating when the replication process started. and events. and just the parent Sp_Copsrv. This log provides a perpetual step-by-step record of replication activities. This entry provides the PID for that process and the PID of the associated Sp_copsvr. Select the process that you want to kill. There are no user prompts or confirmation messages. there is an additional Sp_ Copsrv. The child Sp_Copsrv.  4.  l If there are any additional SharePlex processes running.exe process for each one. notices and warning conditions to the Event Log. the SharePlex processes do not start when you start the service.5) Administrator Guide 248 .6. Terminate SharePlex processes on Windows You can terminate SharePlex processes on Windows systems as follows:  l Windows Task Manager: Terminate one SharePlex process at a time  l KillSharePlex.exe process in the Windows Task Manager. Examples of replication events include:  l Start or stop of sp_cop or a replication process  l Execution of a command in sp_ctrl. Click End Process. Press Control | Alt | Delete.

sql file in the log sub-directory of the SharePlex variable-data directory (where ID is the identifier of the SharePlex target. See Monitor events with sp_eventmon. as in the following example: Notice 08-07-02 16:13:24. but also to its process log file. that is issued. You can use this log to determine the extent of the out-of-sync condition. The Status Database may refer you to the Event Log for a more detailed explanation of a warning.log). Error Log When the Post process detects that source and target tables are out of synchronization. The process logs are primarily for use in debugging. Process logs When a SharePlex process cannot process a record. SharePlex provides a script for unattended monitoring of this log. and you can use the SQL statements to repair target tables if the condition is not too severe. Status Database The Status Database contains a summary of the conditions reported in the Event Log. the short name of the process (such as ocap. if it is associated with a SharePlex process.5) Administrator Guide 249 . opo. it logs the first 100 SQL statements and data for the out-of-sync transactions to an error file on the target system. To view the Event Log Use the show log command in sp_ctrl or open the file named event_log in the log sub-directory of the SharePlex variable-data directory. including events that did not generate an error message or warning at the sp_ctrl user interface. the process not only logs the record to the Event Log. To view the Status Database Use the show statusdb command in sp_ctrl or open the file in the data sub-directory of the SharePlex variable- data directory. after first correcting the cause of the problem. for example a target database). Examples: SharePlex 8.6 (8.  l A description of the event and any related messages (error or non-error). the file number.641582 23696 1 User command: rjones activate config 1route (from mycomp14)  l Oracle errors  l Failure of a network connection or SharePlex process  l Start or stop of a utility or script  l Login or logout of a user Each entry in the Event Log includes:  l The date and time of the event. and the file extension (. notice or event.  l The event’s process ID number. ord. NOTE: A user-issued command appears in the Event Log as a notice. This information alerts you to potential problems and helps you resolve existing ones. The name of a process log consists of the datasource identifier (such as the ORACLE_SID). rcl).6. To view the Error Log Open the ID_errlog.

Up to three logs can exist at any time. including the current one. When all three logs are full (50 MB). see the compare commands in the SharePlex Reference Guide. level Supported targets Description append status 3 Oracle Displays status and results of the append using and append commands. Compare/repair log The compare and repair commands log errors. For more information about these logs. copy status 3 Oracle Displays status and results of the copy using and copy commands. List of information commands Command Auth.6 (8.log Read: ora10_ord01.5) Administrator Guide 250 .log in the log sub-directory of the SharePlex variable data directory.log The aging of old log files is performed in a circular pattern.log Post: ora10_opo03.  l View process statistics that are helpful for tuning and problem solving.  l Detect tables or operations that are slowing down the replication process. errors and other notifications. To view a process log Open the file in the log sub-directory of the SharePlex variable-data directory. SharePlex 8. Monitor with sp_ctrl commands The information commands in sp_ctrl help you monitor different aspects of replication.6. the process starts overwriting them. beginning with the oldest one.  l View the Event Log to view warnings.  l Verify that replication processes are running. compare status 3 Oracle Displays the status and results of the compare using and compare commands.log Reconcile: ora10_rcl01. Issue them frequently to:  l Monitor for out-of-sync tables.  l View the number of replicated messages in the queues. The numbering begins with 01 and ends with 03.Capture: ora10_ocap02. messages and warnings to a log. To view the activation log Open the file named SID_oconf##. it generates a log. Activation log When you activate a configuration.

copy and repair commands. status 3 All Displays an overview of the state of SharePlex replication. show config 3 All Displays properties of the active configuration. report 3 Oracle Displays append. compare. repair status 2 Oracle Disaplys the status and results of the repair and repair using commands. level Supported targets Description lstatus 3 All Displays detailed information about the state of SharePlex replication. show capture 3 All Displays brief or detailed statistics for the Capture process for use in tuning and problem solving. compare. show import 3 All Displays the number of messages received from the source system(s). export and post queues. SharePlex 8. job status 3 Oracle Displays current status and history for append. qstatus 3 All Displays the state of the capture. copy and/or repair history for a table. show log 3 All Displays the Even Log. show read 3 All Displays brief or detailed statistics for the Read process for use in tuning and problem solving. show sync 3 All Displays information about out-of-sync conditions. show sql 3 All Displays the current or last SQL statement processed by the Post process. show activate 3 All Displays the status of all configuration activation activity on a source system. show export 3 All Displays the number of messages sent to the target system(s). which contains records of important replication events. or a process log. Command Log. See the SharePlex Reference Guide for details about these commads. Trace Log. orainfo 3 Oracle Displays the Oracle database information. Command Auth. show 3 All Displays the source and destination of the data being processed by each replication process on a system. Verify Log. show statusdb 3 All Displays the Status Database. and displays the status of each process.6 (8.5) Administrator Guide 251 . show post 3 All Displays brief or detailed statistics for the Post process for use in tuning and problem solving.6.

SharePlex provides the following scripts:  l sp_eventmon monitors the SharePlex Event Log and reports errors that you specify in a special file. They can be run independently or through scheduled jobs. Before you install the patch or upgrade.6 (8. because that makes it difficult to maintain patches to sp_ctrl.  l The scripts must be customized to reflect your environment. Do not rename the existing scripts to replace the updated scripts.  l Verify the ORACLE_HOME (the path to the ORACLE_HOME directory) for each Oracle instance being monitored. where name can be an identifier of your choice.app-modules directory of the SharePlex installation directory.  l sp_qstatmon monitors the status of the SharePlex queues and sends a warning if the backlog exceeds a threshold (limit) that you define.  l sp_ps monitors the SharePlex processes and notifies you if one or more are stopped so that you can correct the problem before the logs wrap or the queues exceed available disk space. start sp_cop with the -uname name option.  l sp_logmon monitors how well Capture is keeping pace with the changes entering the redo logs. rename your existing scripts so that your customizing is retained. or you could lose important improvements or fixes.  l To use the monitoring scripts. such as the type of e-mail or the paging available. All but sp_ps are in the . update the new scripts with your customizing. Requirements for using the monitoring scripts  l These scripts must be run in the ksh shell. Before you use the scripts. This enables you to take corrective action before the queues exceed available disk space and replication is adversely affected. Suggestions are:  l the SharePlex port number  l the ORACLE_SID of the instance for which replication is being monitored  l the SharePlex Administrator’s name  l SharePlex must be running prior to executing a monitoring script.5) Administrator Guide 252 . The sp_ps script is in the util directory of the installation directory.  l All monitoring scripts must remain in the directory where they were installed.Run monitor scripts on Unix The SharePlex monitoring scripts notify you of events and conditions that can adversely affect replication on Unix or Linux systems.6. sp_logmon alerts you before the logs wrap so that you can take corrective action. Do not copy the binary itself. These scripts provide a monitoring mechanism without the need for frequent status checks through sp_ctrl. If Capture loses pace by a specified number of logs. SharePlex 8.  l The monitoring scripts make use of sp_ctrl commands. IMPORTANT!  l These scripts run on Unix or Linux systems only.  l The monitoring scripts are overwritten with new scripts during patches and upgrades of SharePlex. make a link in the util sub-directory to the sp_ctrl binary in the bin sub-directory of the SharePlex product directory. After applying the patches.

NOTE: The script must be run in the ksh shell. Monitor capture with sp_logmon The sp_logmon monitoring script helps prevent situations where you must resynchronize your data because the redo logs wrapped before Capture was finished reading them. This gives you time to correct the cause of the delay and restore the archive logs. write and execute permissions to the directory where the scripts reside.  l The monitoring utilities use the mailx program to send e-mail notifications.  l Read. Add any number of address strings after the MailUserName= variable. if necessary. Prepare to run sp_logmon Before running the script.  1.  l The permission on the iwgrep utility must be 755. Open the script in the app-modules directory of the SharePlex product directory. It monitors the redo log group to which Oracle currently is writing and determines which log SharePlex is reading.  l Paging requires that your service provider supports receiving e-mails on your paging device.5) Administrator Guide 253 . as shown in the following example: MailUserName=scott@company.com IMPORTANT! If the person modifying the script is someone other than a SharePlex user. Separate multiple entries with a comma.log file and in an e-mail message. he or she needs to have these Oracle privileges:  l CONNECT privileges  l SELECT privileges for the V$LOG table  l SELECT privileges for the SharePlex internal tables SharePlex 8. define the e-mail address(es) in the script before running it.12345678910@pageservice.  l Korn (ksh) shell access and ps permission from the Unix or Linux command line. The kill command alone does not kill all of the processes.com.  l Users of the monitoring utilities must have the following rights:  l Local access to sp_ctrl and permission to run the script on the system on which the sp_cop to be monitored is running. perform the following tasks. sp_logmon generates a warning in the logmon. Before using a script. Use the full e-mail and/or pager address. if that option is enabled. make sure mailx is configured to send e-mail on all systems where the monitoring scripts will be deployed.6 (8. Satisfy requirements See the requirements in Requirements for using the monitoring scripts for usage requirements.  l To kill any of the processes generated by these scripts. Define email addresses To use the e-mail notification feature. If Capture loses pace by a specified number of logs.  2. use the kill -9 command.6.

This value triggers the warning generated by sp_logmon. & Runs the script in the background. sp_logmon only logs errors to the log file. SharePlex 8. You can monitor different SharePlex instances by running sp_logmon for each one. Table 17: Optional arguments Argument Description /dev/null Redirects the notification output to the /dev/null device on the local system so that the monitoring process continues to run in the background and generate output. Without this parameter. it prints a notification to the error.6. Each scan starts where the previous one stopped to keep the impact on the system minimal and prevent duplicate warnings. This ensures continuous monitoring. if that option is enabled. The sp_logmon component runs the script. omit this argument.5) Administrator Guide 254 . you actually make a soft link that runs a utility which first sets up the correct environment before running the script itself. Syntax nohup sp_logmon -p port -t interval -l integer [-m ] [/dev/null] & Table 16: Required arguments Argument Description nohup sp_logmon Directs the script to continue running in the background if the user logs out. -l integer Sets the maximum permissible number of redo logs between where Oracle is writing and where Capture is reading. When you run it from the util directory. -t interval Sets the time interval between scans in seconds.splex log file and an e-mail message.   Monitor events with sp_eventmon The sp_eventmon monitoring script monitors the SharePlex Event Log (event_log) at set intervals for entries relating to key replication events.Run sp_logmon Run the script from the util sub-directory of the SharePlex product directory. The sp_eventmon script takes the following actions after each scan of the Event Log:  l When sp_eventmon detects an error that you defined. -m Enables the e-mail/paging option. not from app-modules. To have the output appear on screen. You can define the scan interval and the error messages you want the script to detect. The value can be any positive integer. using different values for this argument. Valid values are positive integers from 1 to the number of redo logs in the group. -p port Sets the port number for the instance of sp_cop that you are monitoring.6 (8.

  The script relies on the iwgrep program.mrk (where username is derived from the string that you enter with the -s argument when you run sp_eventmon).6. Separate multiple entries with a comma. Prepare to run sp_eventmon Before running the script.6 (8. and the time and date of the error.  2. Use the full e-mail and/or pager address.mrk file prevents duplicate warning messages from being sent to the log and to your e- mail or pager. This variable must point to the directory in which the monitoring scripts and iwgrep reside. define the e-mail address(es) in the script before running it.com Run sp_eventmon NOTES: SharePlex 8.com. Open the script in the app-modules directory of the SharePlex product directory. the script starts scanning the Event Log from the beginning every time it starts. perform the following tasks. or it will not function. as shown in the following example: MailUserName=scott@company. You can add custom error strings to the error_list file by editing it in any ASCII text editor.   NOTE: The username. located in the util sub-directory of the SharePlex product directory.  l It logs each error.5) Administrator Guide 255 . If the path is not correct:  1. View that file for more information about the supported errors.  2. Without this file. Add any number of address strings after the MailUserName= variable. the error_list file (described later). Define error messages The sp_eventmon script scans for events listed in the error_list file.12345678910@pageservice. These three components must be kept in the same directory as the script. Satisfy requirements See the requirements in Requirements for using the monitoring scripts for usage requirements. Set IW_HOME The IW_HOME variable in the script must be set to the correct value on each machine. Warnings that were previously generated are sent again. NOTE: The script must be run in the ksh shell. the error Event Log line number of the error. the sp_cop instance name (typically the port number). and a marker file named username. Open the file and place each error string on a separate line. Set the path as shown in the following example: IW_HOME=/export/home/splex/monscripts Define e-mail addresses To use the e-mail notification feature. Open the script in the app-modules directory of the SharePlex product directory.  1.

If the log grows too large. When you run it from the util directory. & Runs the script in the background. Table 19: Optional Components Component Description -p path Sets the path to the SharePlex variable-data directory.5) Administrator Guide 256 . The value can be any positive integer. /dev/null Redirects the notification output to the /dev/null device on the local system so that the monitoring process continues to run in the background and generate output. Without this parameter. -s 'sp_copname' Sets the name of sp_cop that was used when sp_cop was started with the -u option. You can use this parameter more than once to monitor multiple sp_cop instances on a system. When you issue the truncate log command. sp_eventmon will not start. issue the truncate log command and then delete the sp_cop_name. remove the username.mrk file. To run sp_eventmon Run the script from the util sub-directory of the SharePlex product directory.mrk file will have a different username. sp_eventmon assumes the default path. The name of sp_cop must be enclosed within single quote marks. where sp_cop_name is the value used in the -s argument when the script was run. Each username.6. the iwgrep program cannot grep from it properly. The sp_eventmon component runs the script. Without this variable. See the SharePlex Reference Guide for more information about the truncate log command.mrk file.6 (8. The next time you run sp_ eventmon it will create a new file.  l Use the truncate log command in sp_ctrl to truncate the Event Log frequently when you are running the sp_eventmon script.  l When there is an existing Event Log with errors in it and the script is running. not from app-modules. Syntax nohup sp_eventmon -s 'sp_copname' -t interval -p path [-n name ] [-m] /dev/null & Table 18: Required arguments Component Description nohup sp_eventmon Directs the script to continue running in the background if the user logs out. -t interval Sets the time interval between scans in seconds.  l If you are running multiple instances of sp_eventmon. This ensures continuous monitoring. This file is in the util sub-directory of the SharePlex product directory. you actually make a soft link that runs a utility which first sets up the correct environment before running the script itself. each instance must be run under the name of a different operating system user. To have SharePlex 8.

Open the script in the util directory of the SharePlex product directory.  2. follow these steps. as shown in the following example: MailUserName=scott@company. In the script. and it supports uni- directional and bi-directional (peer-to-peer) configurations. Use any positive integer. -n name Sets the name of the Event Log if it is something other than the default name “event_log. Set the scan interval The scan interval specifies how long the sp_ps program waits between checks. Component Description the output appear on screen. Without this option. SharePlex 8. NOTE: The script must be run in the ksh shell. MAILOPTION=TRUE enables e-mail notifications and MAILOPTION=FALSE disables them. It scans the processes at regular intervals and reports abnormal conditions to one or more log files. Satisfy requirements See Requirements for using the monitoring scripts for usage requirements. define the e-mail address(es) in the script before running it. but confirm that it was not changed.  2. for example: interval=1500 Define email addresses To use the e-mail notification feature.  1.com. The default is 2. Prepare to run sp_ps Before running the script.6.12345678910@pageservice. Use the full e-mail and/or pager address. associated with a specified sp_cop instance. omit this argument. perform the following tasks.5) Administrator Guide 257 . To specify a different scan interval. including child processes.  1. Separate multiple entries with a comma.000 seconds. Monitor processes with sp_ps The sp_ps monitoring utility monitors all SharePlex processes. Add any number of address strings after the MailUserName= variable. Open the sp_ps file in the app-modules directory of the SharePlex product directory.6 (8. It can monitor multiple installations of SharePlex on one or more systems. sp_eventmon only logs errors to the log file. Set the interval= parameter to the required scan interval.” -m Enables the e-mail/paging option.com NOTE: The e-mail/paging option is enabled by default for sp_ps.

Run sp_ps Run the script from the util sub-directory of the SharePlex product directory. Prepare to run sp_qstatmon Before running the script. SharePlex 8. 'sp_cop -u name' Use this parameter if you are running more than one sp_cop process. TARGET — Use for uni-directional replication to monitor the Import and Post processes on the target system.6. Read.log file for the capture queue or the poststat. To have the output appear on screen.Without the - uname option. After each analysis of the queues. Read and Export processes on the source system. > /dev/null Redirects the notification output to the /dev/null device on the local system so that the monitoring process can continue to run in the background and generate output. NOTE: If replicating between source and target tables on the same system. omit this argument & (Ampersand) Runs the script in the background. indicating that there is a potential data. This argument must reflect exactly the same name that was used when sp_cop was started with the -u option. the sp_qstatmon script prints a notice in the capstat. The sp_ps component runs the script. Import and Post processes on each system.log file for the post queue. It directs the script to monitor the Capture. Monitor queues with sp_qstatmon The sp_qstatmon script monitors the status of the capture and post queues for message backlogs. as well as an e-mail message if that option is enabled. CONFIGURATION Specifies the type of configuration of the SharePlex instance being monitored. sp_ps assumes you want to monitor the sp_cop that uses the default SharePlex port of 2100. system or network problem. This ensures continuous monitoring. Syntax nohup sp_ps ['sp_cop -u name'] CONFIGURATION [> /dev/null] [ &]   Table 20: Required arguments Argument Description nohup sp_ps Directs the script to continue running in the background if the user logs out. perform the following tasks. This value must be entered in CAPITAL letters. Use it to specify each one of those processes that you want to monitor. MULTI-SOURCE — Use for peer-to-peer replication.6 (8. This gives you time to correct the problem before the queues exceed their allocated space on the filesystem. there are no Export or Import processes. Export.5) Administrator Guide 258 . It must be enclosed within single quote marks. Valid values: SOURCE — Use for uni-directional replication to monitor the Capture. You can configure the script to alert you if the number of messages in a queue exceeds a defined threshold (limit).

you must first must define the e-mail address(es) in the script. & Runs the script in the background. not from app-modules. Assign permission to create temporary files The script creates some temporary files in the util sub-directory of the SharePlex product directory. Syntax nohup sp_qstatmon -v path -t n -p port_number [-c integer ] [-d integer ] [-m] > /dev/null & Table 21: Required arguments Argument Description nohup sp_qstatmon Directs the script to continue running in the background if the user logs out. Unless email notification is enabled. Use the full e-mail and/or pager address. You can specify as many addresses as you want. -p port Sets the port number for the instance of sp_cop that you are monitoring. Save and close the file. -v path Sets the path to the SharePlex variable data directory for the instance of sp_cop that you want to monitor. -t n Sets the time interval between scans in seconds. When you run it from the util directory.app-modules directory in the SharePlex installation directory. Open the sp_qstatmon script in any ASCII text editor. using different values for this argument. Run sp_qstatmon Run the script from the util sub-directory of the SharePlex product directory. The script is in the . Add the address strings after the MailUserName= variable. Without this variable.com. as shown in the following example.com  3. scott@company. 12345678910@pageservice.  2.  1. Notification messages are sent to all addresses coded in the script. Assign write permission to that directory to the sp_qstatmon module. The sp_qstatmon component runs the script. This ensures continuous monitoring. You can monitor different SharePlex instances by running sp_qstatmon for each one.6.6 (8. sp_qstatmon only logs errors to the log file.Satisfy requirements See the requirements in Requirements for using the monitoring scripts for usage requirements.5) Administrator Guide 259 . This value can be any positive integer. Define email addresses To execute sp_qstatmon with e-mail notification. Separate multiple entries with a comma. sp_qstatmon fails and prints an error message requesting a valid path. you actually make a soft link that runs a utility which first sets up the correct environment before running the script itself. SharePlex 8. NOTE: The script must be run in the ksh shell.

sp_qstatmon defaults to 100 messages.  3. -c integer Sets the number of messages in the capture queue at which the script issues a warning message.  l Specific messages in the Event Log (described later in this topic) To configure and run Sp_Nt_Mon  1. omit this argument. Send Email 1 (enabled) Enables or disables email alerts. This value can be any positive integer. Property Default Value Description Time Interval 60 seconds Sets a time interval. -d integer Sets the number of messages in the post queue at which the script issues a warning message. sp_qstatmon only logs errors to the log file. Post. This script provides a monitoring mechanism without the need for frequent status checks through sp_ctrl. Sp_Nt_Mon runs in the background to monitor SharePlex and notify you of events and conditions that can adversely affect replication. between monitoring polls. Refer to the following table to modify the properties in the sp_nt_mon. Select the port number of the instance of SharePlex that you want to monitor. alert 0 = disabled 1 = enabled SharePlex 8.txt file. To make comments in this file. in seconds. Export. then click Configure Monitor.  l Latency between redo logs being processed by Oracle and by SharePlex.  l The volume of the capture and post queues.  4. start each comment line with the # symbol. Run the SpClient utility from the SharePlex programs group. -m Enables the e-mail/paging option. This value can be any positive integer. Import. Email is the only reporting option.Table 22: Optional arguments Argument Description /dev/null Redirects the notification output to the /dev/null device on the local system so that the monitoring process continues to run in the background and generate output.6. To have the output appear on screen.  2.6 (8. Without this parameter.5) Administrator Guide 260 . Read. Sp_Nt_Mon reads input from this file. and Sp_Copsrv.exe processes. Run a monitor script on Windows SharePlex provides the Sp_Nt_Mon script for monitoring processing Windows systems. On the SpClient toolbar. Without this parameter. click the SpMonitor button. Without this parameter. The Sp_Nt_Mon script detects and reports the following conditions by email:  l The status of the Capture. IMPORTANT! Do not rename this script. sp_qstatmon defaults to 100 messages.

Name Email Address none Specifies one or more email addresses that will receive monitor notifications.Property Default Value Description SMTP Server none Specifies the name of the SMTP server for the e-mail account.com Cop 0 (do not Specifies processes to monitor. set the properties as Read follows: Export Cop: 0 Import Capture: 1 Post Read: 0 Export: 1 Import: 0 Post: 0 Capture 0 (do not Sets the maximum number of messages that a queue can contain Threshold monitor) before an alert message is triggered. Set a value that is well below the amount of disk space that is allocated to this queue.com Other.Name@YourCompany.5) Administrator Guide 261 .6. Monitor the 0 (do not Enables or disables the monitoring of supported Event Log Event Log monitor) messages. for example: Email Address: Your. to monitor Capture and Export. Separate each email address with a space.Name@YourCompany. 0 = disabled 1 = enabled The following messages are monitored: SharePlex was shutdown System call error Queue partition is full Host is down Internal error Out of sync Poster failure Parameter was changed Activate config SharePlex 8.6 (8. This gives you enough time to add disk space or resolve any problems that are causing a backlog. Post Threshold Set a positive numeric value for each queue that you want to monitor. For Capture example. A value of 1 enables monitoring monitor) and must be set for each process that you want to monitor.

Property Default Value Description

Deactivate config
Bad config file
sp_cop was shutdown
Child process failed
Error
ORA-error number errors

Monitor Redo 0 (do not Enables or disables the monitoring of Capture latency, which is
Logs monitor) the number of redo logs that Oracle has processed ahead of
SharePlex in the redo stream.
0 = disabled
1 = enabled

Redo Threshold 2 logs Sets a value for the maximum permissible number of logs for
Oracle to be ahead of SharePlex in the redo stream. When the
value is reached, an alert is triggered. Use when Monitor Redo
Logs is enabled.

 5. Click Start to run the script. The script starts and the word Start becomes Stop. The script runs
continuously to monitor SharePlex until you click Stop.

Monitor replication with SNMP
SharePlex provides agent support for Simple Network Management Protocol (SNMP) on all Unix, Linux, and
Windows platforms supported by SharePlex replication.
NOTE: SharePlex provides only agent support for SNMP. It only sends SNMP traps. SharePlex does not
provide an SNMP signal daemon (SNMP manager) to intercept the traps. Use the SharePlex SNMP feature
only if you have a Network Management Station (NMS) to manage SNMP signals. The SharePlex SNMP
agent is named snmptrap and is installed with SharePlex in the bin sub-directory of the SharePlex
product directory. Do not run this program.

Enable SNMP
To enable SNMP monitoring of SharePlex replication, set the SP_SLG_SNMP_ACTIVE parameter to 1. By default,
the parameter is set to 0 (disabled).

Configure the SNMP agent
The following parameters configure the SNMP agent to communicate with the NMS. Each parameter must have
a value if the SP_SLG_SNMP_ACTIVE parameter is enabled.

SharePlex 8.6 (8.6.5) Administrator Guide 262

Parameter Value

SP_SLG_SNMP_HOST The name of the system (host) to which the traps will be sent
SP_SLG_SNMP_COMMUNITY The community security string
SP_SLG_SNMP_MJR_ERRNUM The major error number to be used by the traps
SP_SLG_SNMP_MNR_ERRNUM The minor error number to be used by the traps

Custom MIB parameters
The following parameters specify required information for a custom MIB.

Parameter Value

SP_SLG_SNMP_ENTERPRISE_ The enterprise object identifier to send with the trap. The default is
OID 1.3.6.1.4.1.3.1.1 .
SP_SLG_SNMP_TRAP_OID A custom object identifier to bind to the trap. The default is 1.3.6.1.2.1.1.1.0.
SP_SLG_SNMP_TRAP_ The name of the trap program. The default is iwsnmptrap.
PROGRAM

Configure the SNMP traps
The following parameters configure the SNMP agent to send traps for specific replication events. The message
or error text for the event is included in the trap and is the same error that appears in the Event Log.
To enable an SNMP trap for an event, set the corresponding parameter to a value of 1. By default all traps are
disabled (parameter value of 0).

Parameter SharePlex Event

SP_SLG_SNMP_INT_ERROR SharePlex logic errors and errors that cause processes to exit
SP_SLG_SNMP_SYS_ERROR System-related errors encountered by SharePlex
SP_SLG_SNMP_ERROR Other SharePlex errors
SP_SLG_SNMP_OUT_OF_SYNC Replication is out of synchronization
SP_SLG_SNMP_STARTUP SharePlex starts up
SP_SLG_SNMP_SHUTDOWN SharePlex shuts down

SP_SLG_SNMP_LAUNCH A SharePlex process starts
SP_SLG_SNMP_EXIT A SharePlex process stops

SharePlex 8.6 (8.6.5) Administrator Guide 263

18
Prevent and solve replication problems

This section contains solutions to many of the common questions and problems that can arise during replication,
and it also suggests preventive measures for avoiding problems.

Contents
Find the solution in the SharePlex Knowledge Base
Solve Oracle setup problems
Solve configuration file problems
Solve activation problems
Solve replication problems
Solve DDL replication problems
Solving queue problems
Solve Synchronization Problems
Solve compare command errors
Solve other replication problems
How to resynchronize source and target tables
How to restore the archive logs
How to release semaphores after process failure
How to resolve disk space shortage
How to find the ORACLE_SID and ORACLE_HOME

Find the solution in the SharePlex
Knowledge Base
If the issue you are experiencing is not listed in this documentation, search the SharePlex Knowledge Base at:
https://support.software.dell.com/shareplex/kb
This site provides filtering options and links to other resources that can help you use and troubleshoot
SharePlex.

SharePlex 8.6 (8.6.5) Administrator Guide 264

Solve Oracle setup problems
This section helps you diagnose problems that are associated with the database account and connection
information that was created for SharePlex when SharePlex was installed on the system.
If the issue you are experiencing is not listed in this documentation, search the SharePlex Knowledge Base at:
https://support.software.dell.com/shareplex/kb
This site provides filtering options and links to other resources that can help you use and troubleshoot
SharePlex.

Problem Description Solution

Incorrect If SharePlex cannot interact with Oracle, it  1. See How to find the ORACLE_SID and
ORACLE_SID might be using the wrong ORACLE_SID ORACLE_HOME to determine the
and/or ORACLE_ and/or ORACLE_HOME. Oracle values.
HOME
 2. Rerun the Oracle Setup (ora_setup)
program. See the SharePlex
Installation Guide for more
information.

Insufficient If Oracle Setup fails, the person who runs it See the SharePlex Installation Guide for
database may not have the correct privileges the required privileges.
privileges
Asterisk as the Sometimes, the oratab file has an * Ensure that a valid ORACLE_SID is in the
ORACLE_SID (asterisk) symbol instead of a value for the oratab file, and then try running the setup
entry ORACLE_SID. program again.

Solve configuration file problems
This section reviews problems and solutions associated with the management of configuration files. See also
Solve activation problems.
If the issue you are experiencing is not listed in this documentation, search the SharePlex Knowledge Base at:
https://support.software.dell.com/shareplex/kb
This site provides filtering options and links to other resources that can help you use and troubleshoot
SharePlex.

A configuration was accidentally deleted
You might be able to recover an accidentally deleted configuration if that configuration was previously active
and you did not run ora_cleansp since it was activated.
Solution: View the Event Log to determine the activation ID for that configuration file, then look in the save
sub-directory of the SharePlex variable-data directory for a .conf.actid file, where actid is the activation ID you
got from the Event Log.

SharePlex 8.6 (8.6.5) Administrator Guide 265

Solve configuration file errors
Error message Description Solution

The parameter for The name you gave this Use a different name. To see a list of
‘create config’ must configuration already exists for configurations on a system, use the list
be a new file name. another configuration file. config command.
or... Destination
file exists - file
must not exist prior
to operation.
Couldn’t fork editor. SharePlex failed to open the Make sure the editor still exists on the
or… Editor execution default text editor. system. The default editors are vi on
failed. Unix and Linux and WordPad on
Windows. To change the default text
editor, see Set a default editor for sp_
ctrl .
Destination file The name you specified when Use a different name. To see a list of
exists - file must copying the configuration file configurations on a system, use the list
not exist prior to already exists in this SharePlex config command.
operation. instance.
Problems in reading The edit config command could not Confirm the name of the file you are
or writing file used open the specified file. trying to edit, including the case, and
in edit -- command check to see if the file is corrupted.
aborted.
Edit config file is SharePlex does not allow editing of  1. Copy the configuration using the
not allowed for an an active configuration. copy config command.
active config file.
 2. Edit the copy using the edit
config command.
 3. Activate the new configuration
file.
Destination file The new name you are giving this Use a different name. To see a list of
exists - file must configuration already exists for configurations on a system, use the list
not exist prior to another file. config command.
operation.
Invalid file name You could have misspelled the Verify the name and spelling, including
passed to command. configuration name or used the the case, then enter it again. To see a
or… File does not wrong case. list of configurations on a system, use
exist. the list config command.
File access denied - You are not authorized to issue the View your authorization level with the
check file command. authlevel command in sp_ctrl , then
permissions. view the reference documentation for
the command to determine its minimum
authorization level. The SharePlex
Administrator assigns authorization
levels.
     

SharePlex 8.6 (8.6.5) Administrator Guide 266

Solve activation problems
This section reviews problems and solutions that may be associated with the activation of a configuration file.
If the issue you are experiencing is not listed in this documentation, search the SharePlex Knowledge Base at:
https://support.software.dell.com/shareplex/kb
This site provides filtering options and links to other resources that can help you use and troubleshoot
SharePlex.
NOTE: Many configuration problems can be prevented by using the verify config command in sp_ctrl before
you activate a configuration or reactivate one containing new or changed objects. The verify config command
reviews the configuration to help ensure that basic requirements for activation and replication have been
satisfied. See the SharePlex Reference Guide for more information.

SharePlex cannot locate the configuration file
If SharePlex cannot locate the configuration file that you want to activate, verify its location. Configuration
files must reside in the config sub-directory of the SharePlex variable-data directory for activation to
succeed. The create config command in sp_ctrl automatically puts configuration files in that directory. It is
possible someone moved it.
Problems also occur if the configuration file was created without using the create config command. This can
happen if the file was created directly through the operating system or if the config.sql or build_config.sql
script was used to create it. If the working directory at the time was not the config sub-directory, or if the file
was saved to a different directory, the activation will not find it.
Solution: Move the configuration file to the config sub-directory of the SharePlex variable-data directory.

Some objects failed to activate
If SharePlex cannot activate one or more tables, it will continue to activate the other ones and display the
names of the ones that failed in the ID_oconf##.log file or in the show activate command display.
The following are reasons why individual objects fail to activate.

Problem Description Solution

SharePlex If activation cannot lock the tables in the Assign the SharePlex database user the
cannot configuration file, activation of that table will privilege to lock tables.
lock tables fail.

Invalid You may be trying to replicate objects that are To understand the objects and operations that
objects not supported by SharePlex. SharePlex supports, see the Release Notes
that accompany this release.

Invalid SharePlex could not get routing information. Verify the names of the targets, and fix any
target syntax errors in the routing map. See Routing
systems specifications in a configuration file. Then
activate the affected objects again

Syntax Misspelled names, table names specified Run the verify config command to view the
errors and errors. For help with configuration syntax, see

SharePlex 8.6 (8.6.5) Administrator Guide 267

Problem Description Solution

misspelled without an owner name, and other improper Create configuration files.
words syntax in the configuration specification can
cause activation of an object to fail.

Activation failed completely
There are several things can cause the entire activation of a configuration to fail. Common error messages for
configuration activation problems are:
Bad configuration file
The Oracle sid SID specified in the config file is invalid.

The following are causes and solutions for activation failures.

Problem Description Solution

Incorrect The wrong ORACLE_SID is specified on the Edit the configuration file to specify the
ORACLE_SID Datasource:o.SID line. correct ORACLE_SID. See How to find the
ORACLE_SID and ORACLE_HOME if needed.

Oracle If SharePlex is having trouble connecting to Update the connection information. See
password Oracle and you know the account exists, find out Change the SharePlex database account.
problems if someone changed the password.

Insufficient If Oracle Error 20 (ORA-00020 maximum number Increase the PROCESSES parameter in
PROCESSES of processes (string) exceeded) is the Oracle or decrease the number of
setting cause of an activation failure, it is because activation threads that you are using. The
number of threads is controlled by the
Oracle ran out of resources on the source system
threads option of the activate config
to allow one or more threads to log on. command.

ORA-00942: SharePlex cannot access the Data Dictionary. Make certain that the O7_DICTIONARY_
table or ACCESSIBILITY parameter in the init.ora
view does file is set to TRUE. (This is the default.) The
database must be restarted if the
not exist.
parameter is changed.
Deactivation In rare cases, if you activate a configuration too Before you activate a new configuration
followed too soon after a deactivation, the activation fails. after deactivating one, wait until you see
closely by the following message in the Event Log:
activation Notice: sp_ordr (for o.ora10
queue o.ora10) Deactivated.

Activation takes too long
If the source tables are being accessed by users during activation, SharePlex might have to wait to obtain the
locks it needs.
Solution: Use the show activate command to view the activation status of each table. If SharePlex is waiting for
a lock on a table, the command output displays a message alerting you. See the SharePlex Reference Guide for
more information about the show activate command.

SharePlex 8.6 (8.6.5) Administrator Guide 268

Common activation errors The following are common error messages that you might encounter when activating a configuration. Sp_conf exit. line n. If configuration file.6 (8. it may not be in the config sub-directory of the variable-data directory.TABLE the configuration file. This happens because the reconcile command is dependent on data continuing to arrive from the source system. for example targetsys@o. written correctly.6.SID configuration file. the file you want to activate is not listed. file.objectname. OWNER. ACTIVATE CONFIG error Cause Solution messages No datasource keyword at The datasource specification is Specify as: the beginning of the wrong or incomplete. line n. There is a syntax error on the Fix the incorrect syntax. syntax error in line n. See Create specified line of the configuration configuration files for help. seem to stall.  l SharePlex cannot get   Oracle environment information. Datasource:o. SharePlex 8.5) Administrator Guide 269 . source object name The owner name may be missing Specify object names as (T_HFL_1) not of form from one or more objects listed in ownername.ora10) routing map. the command process can. query the  l A database account does database for tables that start with not exist for SharePlex. File does not exist.targetSID. If there is no replicated activity on the source system after the point of the hot backup or copy. in some circumstances.The reconcile command is slow to complete If you issue the reconcile command when source database activity is low. or To determine whether there is a one of the following is the cause. then issue the activate config command again. the reconcile process waits until source activity resumes. neither a table or a does not replicate. This is normal. See Routing specifications in a configuration file for help. The Oracle sid SID Either the datasource See How to find the ORACLE_SID and specified in the config specification in the configuration ORACLE_HOME file is invalid. file was entered incorrectly. bad routing spec There is a syntax error in the Make sure the routing map is (o. SharePlex cannot find the Issue the list config command. Objectname may not be The object is probably one of the Remove the object from the replicated because it's types of objects that SharePlex configuration file. SHAREPLEX_. SharePlex account. Find the file and move it to that directory. sequence.

Excessive chaining reduces Post performance on the target system because block fragmentation in the database decreases the speed at which Post can apply SQL statements.   chaining performance of the source database because Oracle must read multiple blocks for a single row. SharePlex Installation Guide . To see a list of configurations. Replication is too slow Many factors can cause replication to be slow with higher latency than expected. active Login parameters not A SharePlex account and internal Run the database setup program. SharePlex 8. when sp_conf is already process of being activated. WARNING. are locked. Solve replication problems This section reviews common problems that you could encounter while data is being replicated.. If the issue you are experiencing is not listed in this documentation. analyze them if another process has them locked.com/shareplex/kb This site provides filtering options and links to other resources that can help you use and troubleshoot SharePlex.. tables do not exist in the source For more information. activate.5) Administrator Guide 270 . Deactivate/flush a You are attempting to deactivate No action is necessary if this is the nonactive datasource a configuration that is not active. If the locks are from source transaction activity.software. see the database.dell. for possible solutions. use the list config command. ACTIVATE CONFIG error Cause Solution messages Attempt to run sp_conf The configuration is already in the None required. set. configuration that you wanted to deactivate. Check activation log. Currently involved in Objects in the configuration file SharePlex cannot lock the tables to transaction. search the SharePlex Knowledge Base at: https://support. not all objects One or more tables failed to See Some objects failed to activate activated successfully.6. try activating at a time when the database is less busy. The following are common causes and solutions.6 (8. Problem Description Solution   Excessive Excessive chaining reduces the Reorganize chained tables.

view the process-priority priority settings on the system to determine if SharePlex can be assigned more resources. Problem Description Solution   Ineffective Capture reads archive logs if the redo logs See Set up Oracle redo logging to support   redo log wrap before Capture is finished with SharePlex for more information. the SharePlex priority should match   has low hot backups or other Oracle-intensive Oracle's priority. the list param modified command to view parameters that have non-default settings.5) Administrator Guide 271 . and ask the network administrator to check the network for causes of slowdowns. but this can slow down replication and consume disk space. This slows use a hints file. Use the show sql or show post command to find out which table Post is processing. processes are running.   being logged tables in replication. Keys are not If PK/UK logging is not enabled for the Enable PK/UK logging. In most cases.6. the redo logs should be configured so that SharePlex can avoid using the archive logs.operation taking too long message when it takes more than five seconds to apply a SQL statement to the target instance. and then check for the following. Problem Description Solution Full table scans If a target table does not have a key.6 (8. process operations. when To determine if any parameter settings are   settings changed from their default settings. Parameter Some SharePlex parameters. SharePlex If Capture. configuration them. SharePlex generates the sp_opst_mt . Review the documentation for those parameters in the SharePlex Reference Guide to determine whether a particular setting is affecting replication speed. Read. Do one of the following: Post must perform a full table scan  l Add an index or key if possible. issue inhibit replication performance. SharePlex must query the database to get the key values for update and delete operations. See Use Oracle SharePlex 8.   tables and that cause replication overhead and FND tables performance degradation. Temporary Temp tables receive numerous changes Remove temporary tables from replication. Often it only takes one table to cause a bottleneck. Network Network factors can cause data to transfer Make certain that all Export and Import   problems to a target system too slowly. can responsible for reduced performance.         Post is too slow There are a number of things that cause the Post process to slow down. or not at all. or both slow down during Ideally. and to find the correct row.

See Define a unique key. There should can rebuild an index without the need to reactivate the configuration file. INDEX hints. but they slow down the in replication. see Bitmap indexes. Bitmap indexes on Bitmap indexes are beneficial for Avoid using bitmap indexes on target tables target tables queries. Whenever that buffer writer process See the database documentation. you can bottlenecks all dirty Oracle blocks to disk. more information. Disk I/O bottleneck Disk I/O bottlenecks on the target Disk I/O is the nature of the database system are a common cause of slow environment. try read/release after it receives each changing the value of the Post SP_OPO_ COMMIT. Post can spend a bottleneck by placing the redo logs on high percentage of its time waiting faster hard drives or on a solid-state drive. for Oracle to commit data. Small transaction size Normally. depending on its size and whether or not it is a unique index. in effect. This is defined by the system setting MAX_IO_SIZE/DB_ BLOCK_SIZE. it locks portions of shared memory and. See SharePlex 8. only be two to four buffer gets on an index. blocks the processes that are either modifying or reading data blocks — including the Post process. Oracle write-rate By default. High number of buffer Review any table with SQL If there are more buffer gets than four. The effect is worse when there is a Capture process reading from the same log device in peer-to-peer replication. or only use them on tables DML operations applied by Post. which means it purges that READRELEASE_INTERVAL parameter. the gets statements that cause a high index probably needs to be rebuilt.  l If you cannot add a key. wakes up to write. You can increase the DB_BLOCK_BUFFERS parameter as well. create a key definition.5) Administrator Guide 272 . Post performs an internal If most of your transactions are small.6.6 (8. For that do not have frequent DML activity. You number of buffer gets. but you can reduce the Post performance. consider increasing the number of writers.Problem Description Solution the Post process.  l Set the Oracle DB_FILE_ MULTIBLOCK_READ_COUNT parameter to the maximum number of blocks that can be read in one I/O request. one buffer writer writes If this is a constant problem.

or the entire table process to finish. Difference in Capture SharePlex reads and processes See Tune the Post process. Full archive log If Post appears stalled and will not Move some of the old archive logs to directory another device. This could block Post if Post repairs during non-peak hours. If replicated sequences not cached. they add unnecessarily are part of a key. this can cause excessive I/O on the target system and hinder the Post process. To avoid issues with locks caused sync rows. Compare process locks The repair command locks all rows If you do not want Post to wait for a repair that need repair. descriptors setting on the target The ulimit can be set either as a system system needs to be increased: hard limit or a session-based soft limit. Low ulimit An error similar to the following Solution: Set the ulimit as close to the means that the system file optimal value of 1024 as possible. and Post speed records from the redo logs faster than it can post those operations to the target database with standard SQL statements. consider running the process. smaller transactions. replicate the tables that to the replication volume. but the value remains fixed at the to ora10b) correct level to support SharePlex. or delete them to make SharePlex 8.360226 8693 12345 Poster error: /var/quest/  l Set a hard limit: (Recommended) A vardir/log/event_log: Too root user and system restart are many open files (posting required to change the hard limit. as Error 07-24-08 follows: 12:11:40. and then it reverts back to a default value that may be lower than the hard limit and too low for SharePlex. and remove the sequences from the replication configuration.Problem Description Solution data from the queue as part of the the SharePlex Reference Guide for more checkpoint recovery process. You should see significant performance improvement. queue prodsys.6.5) Administrator Guide 273 . Consult your System Administrator for assistance. contain those keys. from ora102.6 (8. process. tries to apply data to the table being repaired. Sequences not cached If the sequences in replication are Cache sequences. throughout the repair by repair processes.  l Set a soft limit: A soft limit setting stays in effect only for the duration of the sp_cop session for which it was set. For information about this parameter. you can kill the compare if there are more than 1000 out-of.

When the redo logs other than the normal Oracle location. error in the Event Log is sp_opst_ mt . Capture Capture last processed or point SharePlex to available stops and returns a “Log wrap their location with the SP_OCT_ARCH_LOC detected” error. It waits a certain amount parameter. it could be that the archived log directory on the target system is full. If so. Capture looks for the archives in sure this parameter is set to the full path name location Oracle’s archive-log list. continuing needs. archive logs Capture stops if it cannot locate the If you are storing the archive logs in a location in archive logs it needs. find out why and make certain that it is not stopped for too long.6. and it suspends processing. then Oracle cannot create new logs. issue the status command in sp_ctrl to verify whether or not it was stopped intentionally by an authorized SharePlex user. variable. Problem Description Solution shut down normally. make unexpected wrap. then it tries to read the log again.6 (8. To determine the log that Capture of time and then starts again. SharePlex 8. To determine the log that Capture needs. See also How to restore the archive logs . No access to Capture stops when it cannot read or find Find out if someone changed permissions such the redo the logs. The following are other reasons why Capture could stop unexpectedly. Compressed Capture cannot read compressed archive Uncompress the current log that Capture needs archive logs logs. or if there are directory space restrictions in that directory.5) Administrator Guide 274 . permissions on the state sub-directory in data the variable-data directory. Problem Description Solution archive logs When Capture detects a log wrap and the Restore the archive logs from the one that not archive logs are not available. If it was. use the show capture command with the this process until the logs are restored. Capture looks in the location specified by the SP_OCT_ARCH_LOC parameter. Post stalls because it is waiting for Oracle. that SharePlex does not have permission to read logs the redo logs. No access to Capture stops if it is unable to write to the Verify the permissions and space for the variable- the SharePlex logs because of restrictive data directory.operation taking too long. detail option. use the show capture command with the detail option. and all those after it so that Capture can process them. and if the logs are of the directory containing the archive logs. Capture stopped If Capture is stopped. but the only room for new ones. not there.

SharePlex 8. issue the status command in sp_ctrl to find out why. See How to and might have caused an out-of-sync condition. Non. Problem Description Solution Correctable Post stops for Oracle errors that can be Use the information in the SID_errlog. cannot be corrected. want Post to continue processing. corrupted archive logs.5) Administrator Guide 275 . No more If you see the following error. To find out which user is responsible. Posting resumes from the point synchronization. The errors and the faulty SQL where it stopped. value using the following SQL statement: Warning: sp_opst_mt (for select value from V$PARAMETER o. Problem Description Solution Corrupted Capture stops due to the error “a Restore the current log that Capture needs and archive logs portion of redo logs could not be all those after it so that Capture can process parsed. to 1.6 (8. You might have transaction. Some Oracle errors. To determine the log that Capture needs.sql file.oracle queue oracle) where name = 'open_cursors' . Locks on If a target table is locked. Post has View the current database OPEN_CURSORS open cursors exceeded the available open cursors.. information. For more cause Post to stop. the Post process To find out if the table is locked. • A stopped due to error status means a replication or Oracle error caused Post to stop. The following are some potential causes for Post to stop unexpectedly. or job is accessing the table performed on the table. application. then start Post without risk of the data going out of again. resynchronize source and target tables. • A stopped by user status means that a SharePlex user stopped the Post process. statement are logged to the SID_errlog. so that you can fix the problem file to correct the problem. and continues processing. use the show capture command with the detail option. it could mean that a repair command has locked the table. This error occurs because of them. See also How to restore the archive logs . In that case. view the user issued commands in the Event Log. • An idle status means there is no data in the post queue to post. check the target tables cannot apply a SQL statement and generates an V$LOCK system statistics table.sql Oracle errors corrected. This message could mean that a to resynchronize the data if DML was user. Or. list the Oracle errors SharePlex reports the error to the Event Log.”..oracle-o. and resolve error message: Currently involved in a the situation accordingly. Post stopped If Post stops. which directs SharePlex to ignore Sometimes.6. errors in the in the oramsglist file and then writes the error and SQL statement to the SID_ set the SP_OPO_CONT_ON_ERR parameter errlog. errors that cannot be corrected those errors and continue posting.sql file in the log sub-directory of the variable-data directory on the target system. see Continue to post when there is a DML error. such as out-of-sync If the errors cannot be corrected but you correctable conditions.

SharePlex error requires more semaphores than are available. Set the following semaphores: semaphores through the MKS Toolkit. and To start Post and finish replication. Post If Post returns an error message of "shs_  1. See the parameter much CPU documentation in the SharePlex Reference time Guide. Post requires a certain number of open cursors to the target database. You can increase the number of  4.qa920-o. semaphore semaphore" on a Windows system. This usually occurs when named queues or  3. Queue name Post stops if a queue name is too long. then start it again. Linux. From Category. use the SP_ source another reason that you do not want the OPO_DISABLE_OBJECT_NUM parameter.qa920 queue q5) 15007 . see Adjust open Exiting cursors. sp_cop is SharePlex may be performing its overhead Increase the idle time of sp_cop with the SP_ using too activities too frequently. To determine an adequate OPEN_CURSORS No more available cursors! value for SharePlex. Configuration When you are using named export queues. Post could down SharePlex. Make certain the name assigned to named is too long queues in the configuration file are no longer than 15 characters. Corrupted If a source table is corrupted or there is To disable posting for a table. when there stop with the following error instead of posting are named the remaining data from the queues: export queues sp_opst_mt (for o.Can't open poster queue que_NOEXIST: Queue does not exist. which table replicated data to be posted to the target disables posting of both DML and DDL SharePlex 8.Problem Description Solution Post has opened number cursors. In the Windows Control Panel.5) Administrator Guide 276 .  2. Max Number of Semaphore IDs: 10 Max Number of Semaphores: 512 Max Number of Semaphore Undo entries: 90 Other problems and solutions Problem Description Solution SharePlex Sometimes machine names cannot be resolved Add the IP addresses and names of all servers cannot between Unix or Linux and Windows systems. select Semaphores.6 (8. COP_IDLETIME parameter. open generates a SEMERR: an error occurred with the Configure PTC MKS Toolkit. Select Runtime Settings.6. (Unix. and Windows) in the replication resolve a network to the /etc/hosts file on all Unix and machine Linux machines. shut deactivation you deactivate the configuration. horizontally partitioned replication are being used. and add the same information name to the hosts file on all Windows machines.

5) Administrator Guide 277 . sp_cop error messages Cause Solution sp_cop cannot setup. queues were still running processes start with sp_. check whether any SharePlex replicates data for tables with generates tables have the same names as their owners. after a specific Support before a log wrap occurs. When you are ready to configuration or affecting posting for other begin posting to the target table again. Conflict If you encounter compile problems with your This issue does not affect replication.6 (8. Problem Description Solution database. it stops. A identical owner and table names. SharePlex segment n in use. call Dell redo log. See Oracle TAR 2577886. and returns this message. Capture cannot process a record. Capture error messages     Capture time limit (300 sec) Capture is not processing See Capture stopped for possible exceeded. number of seconds. SP_OPO_DISABLE_OBJECT_NUM is table without removing it from the active disabled by default. When all when you last shut down sp_ have been killed. see the parameter documentation in the SharePlex Reference Guide. logs the record. If. Please check to see if any Shareplex processes are running (ps -ef | grep sp_). If you cannot determine the indicate a problem with the cause of the problem. For more information.6. directory. Common replication errors The following table explains many of the common error messages that you might experience during replication. memory Processes that access the Kill those processes. compile known issue in PL/SQL prevents the SharePlex errors conflict resolution logic from compiling the PL/SQL for tables whose names are the same as their owners. Error: sp_cop can't setup There are already one or To run multiple sessions of shared memory statistics more SharePlex sp_cop SharePlex. OPO_DISABLE_OBJECT_NUM to 0. If there are some processes running then kill them and restart sp_cop. start. you can prevent posting for that operations. See Run multiple previous memory segment 303. you need to use capability . resolution conflict resolution routines. instances of SharePlex. sp_cop should cop. Oracle has stated that the issue will not be fixed. records. Log wrap detected The redo logs wrapped and If archive logs are available. set SP_ objects.exiting Error: processes pointing to the separate variable-data directories sp_cop(shs) Cannot delete same variable-data for each one. which could causes. Capture cannot locate the SharePlex 8.996 for more information.

seconds to apply a SQL statement to the target instance. do not compress them until SharePlex is finished processing them. uncompress and restore them to the archive log directory. corrupt the queues. Note that this error also occurs when the archived log is corrupted.5) Administrator Guide 278 .6 (8. sequence. Post cannot log into the Verify that the database is running. TRUE (the default). processes. This is an unavoidable SharePlex 8. then in the location specified by the SP_OCT_ ARCH_LOC parameter. which it ACCESSIBILITY Oracle tuning must be able to do in order parameter and make sure it is set to to replicate. This can cause SharePlex to return errors. Oracle-related error messages     Can’t access OBJ$Table SharePlex cannot access the Check the O7_DICTIONARY_ Data Dictionary. If you use compression for the archive logs. For help resolving this problem. The change entered Oracle rolled back the offending execute SQL on table: QA. or correct row to update in the users that may have deleted the target database. You can compress any logs that were generated before the current one. contact Dell Support. SharePlex looks for the archive logs first in the Oracle archive log list. before SharePlex.T_ operation. issue the show capture command with the [detail ] option in sp_ctrl on the source system.. Post error messages     sp_opst_mt . Forward and backward operation Messages may be out of Find out if Oracle was shut down counts do not match. The tables are o.ora9 queue violated on the source still in synchronization because bluesky) 15033 . Database not available. and in rare cases. This parameter should always be set to the correct archived log directory. row on the target..Failed to system.6.operation taking It is taking more than five See Post is too slow. and determine whether someone changed the password of the SharePlex database account. The proper procedure is to shut down SharePlex and then shut down Oracle.sp_cop error messages Cause Solution archive logs. target database. Error: sp_opst_mt (for A unique constraint was Ignore this message. too long. To determine the current log for SharePlex. Rowid not found SharePlex cannot locate the Check for triggers.blues920-o. See also Solve Synchronization Problems.

but Oracle error because of the way Oracle constraint (. If this file gets moved or deleted. and more cursors are still intended configuration. 15051 – missing column in the The hints file is not See Use Oracle INDEX hints for more hint file (either table of configured correctly. For more information about SQL Cache. Will disable the the SQL Cache feature in Tune SQL Caching. see size. SharePlex returns this error message.SID file whether you blank hints file in the data sub- use it or not.oracle-o. Warning: sp_opst_mt (for Post detected that it will No action is required unless the o. SQL Cache capability. Notice: sp_opst_mt (for o. The SQL Cache feature is No action is required if this is your disabled. opened so far is number.oracle queue exceed its maximum number value gets to 1 and there are still oracle) Running out of of cursors and is trying to not enough cursors. also entered the redo log. Tune SQL Caching. Will attempt to decrease SQL Cache size.5) Administrator Guide 279 . information about using index hints.oracle-o. For more cursors. Name it hints. The rollback handles the violation. For more oracle) Too many concurrent needed. Number of cursors decrease the SQL Cache information about SQL Cache. see transactions. SharePlex detects the constraint violation on the target. SQL Cache error messages     Warning: sp_opst_mt (for The SQL Cache size is set to No action is required if this is your o..SID. this file is the data sub- directory of the SharePlex variable-data directory. SharePlex disables information about SQL Cache.) violated.oracle queue 1. The location of directory of the variable-data directory. or.oracle-o.6 (8.sp_cop error messages Cause Solution DEST_1: ORA-00001: unique the redo log. this case. intended configuration. see Tune SQL Caching.oracle queue oracle) Shrinking SQL Cache size to number per session. index name) 15052 – syntax error for tablename 15053 – syntax error for SharePlex 8.. SQL Cache disabled. create a hints. rolled it back.6. Hints file error messages     15050 – hint file not found SharePlex looks for the To prevent this message.

you can ignore this significant amount of error. file is valid. stop the Post process and file itself does not demand a start it again. configuration. but the value remains fixed at the correct level to support SharePlex. and then it reverts back to a default value that may be lower than the hard limit SharePlex 8. see the Post parameters documentation in the SharePlex Reference Guide .5) Administrator Guide 280 . parameter. If you are not using the hints file.6 (8. src host/ sid=db01:N2PB setting is not 1024. 17000 – error opening hint SharePlex cannot open the Check the file for corruption.6. For set by the SP_OPO_HINTS_ more information about this LIMIT parameter. /var/quest/vardir/log/ event_ The ulimit can be set either as a log: Too many open files system hard limit or a session-based soft limit. 15055 – more than n valid The hints file permits only as Either remove some of the table- entries were entered into the many table-index index combinations or increase the hints file combinations as the value value of SP_OPO_HINTS_LIMIT. Consult your System Administrator for assistance. id not found in object cache source table that is not in make certain that the owner name the active configuration.sp_cop error messages Cause Solution indexname 15054 – source table’s object_ The hints file includes a If this table is in the configuration.  l Set a soft limit: A soft limit setting stays in effect only for the duration of the sp_ cop session for which it was set. make certain there is sufficient read permission for the Post process. the hints sufficient. All and table name are spelled in the tables in the hints file must hints file the same way as they are be listed in the active in the configuration. Environment-related error messages     sp_opst_mt: pid=num date/time The system file descriptors Set the ulimit to 1024. 15056 – error allocation This indicates a system-level If you believe the system memory is memory for hints memory problem. as follows:  l Set a hard limit: (Recommended) A root user and system restart are required to change the hard limit. memory. See Use Oracle INDEX hints for more information about using index hints. If the file hints file.

Using hard coded default reference. Parameter paramname does not SharePlex cannot find a Always check for an updated param- exist in the paramdefaults parameter that it needs to defaults file when you manually file. You have an update SharePlex.sp_cop error messages Cause Solution and too low for SharePlex. See capture log value into the Oracle of dates and times if they are not for detail.6 (8. make corrections to the name in the file. longer available. If this system is not part of a cluster. Other error messages     Snapshot too old The read-consistent view Increase the size of the rollback required by SharePlex is no segment. 06/29/00 08:05 System call SharePlex ran out of space See How to resolve disk space error: sp_ocap(que) (for for the queues on the disk.QA11) [pid = 8692] -exit(1) gethostbyname name failed . value.6. If this system is part of a cluster. shortage . see the SharePlex Installation Guide. See database’s validity check. on entered an invalid date enable SharePlex to fix the format obj object_id.QA11 queue o.QA11 queue o. and may not have installed the latest param-default file.QA11) 10705 . correctly in the hosts file (/etc/hosts on Unix and Linux or hosts on Windows). database that bypassed the caught by the database checks. SharePlex 8. the virtual IP address must be mapped to a host alias in the hosts file. o.writecommit failed que_BUFWRTERR: Error writing buffer to file 06/29/00 08:05 Process exited sp_ocap (for o. Invalid DATE format detected A user or application Set the SP_OCT_DEF_ parameters to in record with rowid=rowid.QA11 queue o. defaults file than the version of SharePlex that you are running. Please make sure that your param-defaults file is older version of the param- the correct version. For instructions on configuring SharePlex in a cluster. The local hosts file is not The host name is not specified exiting configured properly.5) Administrator Guide 281 . Someone might have updated the SharePlex binaries using a downloaded patch. the SP_OCT_DEF parameters documentation in the SharePlex Reference Guide .QA11) No space left on device devname 06/29/00 08:05 Internal error: sp_ocap (for o.

Parameter Description Default SP_OCT_ Replicates the TRUNCATE TABLE command and the ALTER TABLE command to ADD or On REPLICATE_ DROP columns when: DDL  l the affected object exists in the source and target at the time of activation and  l its name is listed in the configuration file (explicitly or through wildcard). Off AUTOADD_ SEQ SharePlex 8. schema (bob) could not be set. sp_cop error messages Cause Solution shs_SHMERR: an error occurred You ran the qview utility Shut down SharePlex and re-run with shared memory. search the SharePlex Knowledge Base at: https://support. see Set up DDL Replication. without shutting down qview. Solve DDL replication problems This section reviews many common problems and solutions encountered when replication of DDL is active. On AUTOADD_ ENABLE Set SP_ Auto-add to replication any materialized views that are created after activation. For more information about SharePlex DDL support. FAILED DDL Replication for "create user bob.6 (8. Off OCT_ AUTOADD_ MV SP_OCT_ Auto-add to replication any sequences that are created after activation.5) Administrator Guide 282 .6.dell." Solution: Make certain the following parameters are set to appropriately. DDL is not replicating Only some DDL is enabled by default. SharePlex (sp_cop). SP_OCT_ Auto-add to replication any tables and indexes that are created after activation. This parameter should be set to 1 (on). When enabled.com/shareplex/kb This site provides filtering options and links to other resources that can help you use and troubleshoot SharePlex. If the issue you are experiencing is not listed in this documentation. The SP_OPO_STOP_ON_DDL_ERR parameter is defaulted to direct the Post process to stop if there is an error applying the DDL. Other DDL support must be explicitly enabled with parameter settings. messages such as the following notify you that DDL was skipped. See Control DDL replication for more information about how to use these parameters to configure DDL replication. Skipping generic 9i DDL operation. to enable you to correct the problem to keep the databases synchronized.software.

Solving queue problems This topic helps you solve replication problems that may be related to the SharePlex queues. The objects must exist in the source and target prior to configuration activation. set the COMMIT.000 characters.com/shareplex/kb This site provides filtering options and links to other resources that can help you use and troubleshoot SharePlex. Solution: None required. COMMIT point for your application to 500 to generate smaller SharePlex 8. view the Event log with the show log command to find out what happened. Replicated DDL is not completely displayed in the Event Log SharePlex prints replicated DDL to the Event Log. while the value in the Number of messages field not yet been a COMMIT. then resolve the problem so that processing can continue and the queue backlog can be reduced. SharePlex is running out of disk space Data accumulating in the queues can cause SharePlex to run out of disk space. The following are some possible causes and solutions.5) Administrator Guide 283 . but it truncates statements longer than 2. Only the first 2.dell.software.000 characters are recorded in the log. If a process stopped because of an error. but does maintain data ALL_DDL changes to them. the data.6. Post is waiting for a COMMIT before releasing for rollbacks and data recovery. To allow is increasing. If possible. Parameter Description Default SP_OCT_ Replicate DDL for tables and indexes that are not listed in the configuration file. If the issue you are experiencing is not listed in this documentation. search the SharePlex Knowledge Base at: https://support. Problem Description Solution Stopped When replication processes stop. If a process was stopped by a user. Large The Post queue may become View the post queue with the qstatus command.6 (8. find out why and then replication data accumulates in the queues. SharePlex retains data in the Use the show post detail command to verify that Post is post queue until it receives the processing transactions normally. Off REPLICATE_ SharePlex replicates metadata changes for those objects. If the value operations large when storing large in the Backlog (messages) field remains constant or is transactions for which there has shrinking. start it as soon as possible so that SharePlex can process the processes accumulated data.

user) [pid = 8183] . If the accumulation of messages in the Post queue is threatening to cause disk space issues.6 (8. increase in activity on the source system can source cause data to accumulate in the transaction Post queue and approach the activity maximum amount of allocated disk space.writeuser+ X. the latency between the source and target data archive consumes disk space while the may be too large to be acceptable to the target users.user queue o.exit(1) SharePlex 8.user) Exit sp_ ordr to retry rim-write.user queue o.user queue o.user queue o. consider creating a configuration that uses named post queues which isolate tables that are known for long transactions. Info 08-06-12 13:20:17. it might be more practical to run ora_cleansp to clean up the replication environment and queues. you can stop Import until Post can clear out some of the operations from other transactions.089485 2384 1 Process exited sp_ordr (for o. For more information about how to configure the redo logs for replication. See How to resolve disk space shortage Capture is If Capture is processing archive If the location of Capture in the logs is far behind that of the processing logs. see Set up Oracle redo logging to support SharePlex.0x0a02d364+PR+o.user+sp_ ordr+o.user) 11004 - sp_ordr failure writing to queue(s) Notice 08-06-12 13:20:17. Also. logs archived records are being Rather than add more disk space to the variable-data processed.089485 2384 1 sp_ordr (for o.48.089485 2384 1 sp_ordr (for o. 1 08-06-12 13:20:17.user) Error opening output queue rv=9 que_open(-.089485 2384 1 sp_ordr(rim) (for o. Unplanned An unplanned increase in See How to resolve disk space shortage. There is a “failure to write and open queue” error If there is a sequence of messages in the Event Log similar to the following. resynchronize the data.6. directory. stop and start sp_cop. the SharePlex Support team can help you tune the performance of Capture and adjust the redo configuration.user) Notice 08-06-12 13:20:17.5) Administrator Guide 284 . Problem Description Solution SQL statements for SharePlex to process.user queue o.user) data route to a02d364. If SharePlex continues to run out of disk space because Capture is processing the archive logs. the capture queue database. and reactivate the configuration. See Configure named post queues for more information.089485 2384 1 sp_ordr (for o.7e failed err=100 Error 08-06-12 13:20:17.

You can eliminate obsolete files that have been read-released by using the trim command in the SharePlex qview utility.dell. because they rely on the queues to operate. and there will be errors reading from and writing to them. A sub-queue can have one or more files associated with it.6. If you try these solutions and are still having problems. that is not unusual. The post queue seems too large If the size of the post queue seems too large relative to the number of messages it contains. When SharePlex determines that source and target data are different. For important information about synchronization in replication.The queues are corrupted If the system that hosts SharePlex fails. Solution: The size for the post queue in a status display is the actual disk space used by all of the queue files.software. Thecommand preserves files containing data not yet posted and committed to the target database. not SharePlex. SharePlex does not verify synchronization if transformation is being used because:  l Transformation changes the target data. the Post process logs a message in the Status Database and also to the Event Log. The SharePlex post queue actually consists of a number of sub-queues. the file remains on the system even after the data has been posted and read-released. Solve Synchronization Problems This section reviews the causes and solutions for common synchronization problems. See the SharePlex Reference Guide for more information about the qview utility. one or more SharePlex queues can become corrupted. If the issue you are experiencing is not listed in this documentation. See the Post parameter documentation in the SharePlex Reference Guide. When an out-of-sync condition occurs. contact Dell Support.6 (8. each approximately corresponding to a user session on the source system. it generates error conditions but continues to post other data from the post queue. How SharePlex reports out-of-sync conditions For all objects except those involved in transformation. change the SP_OPO_OUT_OF_SYNC_SUSPEND (Oracle) or SP_OPX_OUT_OF_ SYNC_SUSPEND (Open Target) parameter. so before and after images cannot be compared. Solution: Contact SharePlex Support to resolve queue corruption issues.com/shareplex/kb This site provides filtering options and links to other resources that can help you use and troubleshoot SharePlex.5) Administrator Guide 285 . If the entire 8 MB of size is not used. To view these files in sp_ctrl: SharePlex 8. To direct Post to stop processing altogether when it detects an out-of-sync condition. SharePlex verifies that the source and target data in a given operation are synchronized before posting the replicated data to the target. search the SharePlex Knowledge Base at: https://support. In that case.  l The transformation routine posts the data. each with a default size of 8 MB. see Understand the concept of synchronization. the purge config and abort config commands cannot be used.

Compare the query results. that indicates that the data is out of synchronization.5) Administrator Guide 286 .sql file. but there is no record in the database_ID_errlog. the rows are synchronized."TG_TEST3" out of sync for queue irvspxu14 since 17-Jun- 08 15:52:03 When data goes out of synchronization.sql file in the data sub-directory of the SharePlex variable-data directory."TG_TEST2" out of sync for queue irvspxu14 since 17-Jun- 08 15:47:58 1 Table "SCOTT". Regardless of whether or not a transaction is rolled back. Detect false out-of-sync conditions Sometimes an out-of-sync message can be false. SharePlex still compares the pre-images of the source and target rows.  3.-------------------- 3 Table "SCOTT". to give you a record of the statement that should have been applied as a tool for problem solving and for manually applying the statement if appropriate. To verify that data is out-of-sync  1. and the data is not out-of-sync. They could be associated with a ROLLBACK."TG_TEST1" out of sync for queue irvspxu14 since 16-Jun- 08 17:06:33 3 Table "SCOTT". Rolled back statements are canceled operations.6 (8. Get the rowid of the affected row from the database_ID_errlog. using the row data that you got from the source query in the WHERE clause. You can compare the source and target data by using the compare command. or you can perform the following comparison manually. If they are different. IMPORTANT: If you see an out-of-sync message in the Status Database and in the Event Log. If they are different.sql file in the variable-data directory on the target system. the rows are out of synchronization. Run a SELECT query on the target table.  l Event Log: Use the show log command. run a SELECT query on the source table to get the row data for this rowid.sql file for the transaction. do not ignore those messages. SharePlex logs the failed SQL statements to the database_ID_errlog. and therefore not logged on the target. The following is an example of how SharePlex reports an out-of-sync condition. SharePlex 8. If they are the same.6. sp_ctrl (irvspxu14:8567)> show sync Out Of Sync Status Database irvspxu14 Count Details ----.  2.  4. Use these commands frequently to monitor for out-of-sync errors. Only when a transaction is committed on the source but fails on the target does SharePlex log it to the database_ID_errlog. To compare with the compare command See the compare commands in the SharePlex Reference Guide. Using the rowid in the WHERE clause.  l Status Database: Use the show statusdb or show sync command.

changes. run it on all systems. SharePlex documentation in the SharePlex Reference Guide.  3. You can compare the times for those events to determine what happened. SharePlex perceives an you if and when ora_cleansp was run on each out-of-sync condition. the results of those changes the target will cause hidden out-of-sync conditions You can use the compare and repair commands to until Post attempts to apply a compare tables for out-of-sync rows and then repair replicated change to the affected rows. Because ora_cleansp removes replication queues and processes and deactivates the configuration. Inadequate Conflict resolution procedures are Revise and test the conflict resolution procedures. It also tells you if and when the configuration was activated. DDL changes Some DDL-related causes of out-of-sync For a list of supported DDL. Alter the target table to undo the DDL on the target. systems associated with an active all systems by viewing the Event Log. The log tells ora_cleansp configuration. but the also by SharePlex: configuration was not  1. directly to target. For more information. SharePlex detects out- of-sync conditions and returns an error message.  l Non-replicated DDL changes are To undo duplicate DDL changes made manually and made to source objects. refer to the SharePlex conditions are: Release Notes. sp_ctrl(sysB)> start post   DML changes If applications or users make Prevent all DML access to the target tables that are made DML changes to the tables on the in replication. In most cases. required in a peer to peer (active. If ora_cleansp was not completed on all replication systems for this configuration. SharePlex uses tables. system.Common out-of-sync conditions and solutions The following are common ways in which data goes out of synchronization.5) Administrator Guide 287 .6 (8. Out of sync Description Solution condition Incorrect If ora_cleansp was run on some. returns an out-of-sync error. and SharePlex will not return an error. conflict the conflict resolution procedures to SharePlex 8. those rows. or non. Start Post and let SharePlex post the replicated DDL (which is still in the post queue).6. see the command When the change is applied. you must perform initial synchronization again. but there are some situations where an out-of-sync condition is hidden. sp_ctrl(sysB)> stop post  l DDL that SharePlex replicates also gets performed manually  2. then see How to resynchronize source and target existing active) configuration. can be re-analyzed. but not Determine whether or not ora_cleansp was run on running of all. Stop the Post process (it might already be reactivated so that the objects stopped).

it eliminates the possibility that the capture queue could exceed free disk space while processing the archive logs. query the database. It might take less time than Capture would take to process the missing records from the archive logs.6.sql script.  l Disable the triggers if they are not needed. there are no can process the data it needs. copy the appropriate logs back to the archived-log directory on the source system.)  l If SharePlex is many logs behind Oracle. See the utilities documentation in the SharePlex Reference Guide for more information about the trigger scripts. Also take into consideration how much latency the users of the target data can tolerate. the data. See How to resynchronize source (Normally. the target objects. logging is not enabled or if the archive Enable archived logging. To determine if How to resynchronize source and target tables. In addition.6 (8.  l If archive logs are available.  l Run the sp_add_trigger. you can either of owner=’owner’ and table_ the following: name=’name’. To disable the effects of triggers SQL> select * from user_ To disable the effects of triggers on target objects triggers where table_ after the data is resynchronized.5) Administrator Guide 288 . See Correct the problem first consider resynchronizing the data instead of restoring the logs. the data archive logs for SharePlex to read.Out of sync Description Solution condition resolution determine which operation to post routines when the same data change is received from different systems. archive logs and continue replicating. Triggers on Triggers must be disabled on target If triggers have fired on the target system. Data lost can go out of synchronization if archived after the log wrap cannot be recovered. Capture would access the and target tables. SharePlex 8. or use the SP_OCT_ARCH_LOC parameter to point SharePlex to their location. You can base your decision on the size of the redo logs and the number of tables being replicated. which directs triggers to ignore the SharePlex Oracle user. Log wrap If the redo logs wrap before Capture  l If archiving is not enabled. and resynchronize logs needed by Capture were removed. triggers are enabled on the target system. See effects to the target. both of which determine how much information Capture must process. The triggers fire on the source objects changed by the triggers are out of objects system and SharePlex replicates their synchronization and must be resynchronized.

This can happen when you update values using an x +n formula. the UPDATE or DELETE to the wrong row uniqueness of rows on the target system cannot be without the error being detected. resulting in data changes and/or that cause out-of-sync conditions. If the LONG columns the key.5) Administrator Guide 289 . If the See Set up Oracle database objects for replication for additional information. Changes to If tables use sequences as keys. resynchronize and re-activate those in the target rows are the only columns objects so that SharePlex can update its object that contain unique values. ensured. SharePlex returns a unique-key constraint violation and out-of-sync error. CHECK constraints are not necessary on the target because they are satisfied on the source. FOREIGN KEY and ON DELETE CASCADE constraints are also satisfied on the source. and SharePlex replicates the child operations to the correct tables on the target. may running on not be visible to replication or may not source be supported. LONG If a table has no primary or unique key. multiple cache. SharePlex 8. DBMS_ The effects of these procedures. SharePlex could apply (such as when packaged applications are in use). manipulated procedures and dropped outside replication.Out of sync Description Solution condition Unnecessary The only constraints that are necessary See Set up Oracle database objects for replication constraints on target tables in a one-way replication configuration are primary and unique key constraints.6. rows could meet the criteria for the If adding a primary or unique key is not possible simulated key. you can avoid on all of the columns except the LONG this kind of out-of-sync condition.6 (8. and a Create the sequences so that the updates cannot keys key value changes. You can leave ON DELETE CASCADE constraints enabled if you configure SharePlex to ignore them. After you create and LOB columns. SCHEDULER as objects being created. causing the table to go out of synchronization without an error message. If you can create a key from columns that ensure columns SharePlex builds a simulated key based uniqueness on the target table(s). It is possible that one of the x +n values will equal an existing value. where n is an incremental increase. this may cause result in a duplication of keys on the target system. duplicity on the target system. new value already exists as a key in another row on the target system. such Exclude source and target objects from the jobs.

you can filter it out of the SharePlex database SharePlex database user may not have configuration by means of partitioned replication. but Post was not started again. the cause double posting on the target. horizontally  l A column condition value is partitioned updated and the new value no replication longer satisfies the row selection criteria.  l The target Oracle instance was unavailable and too much data accumulated in the Post queue. and routing map are identical. SharePlex user the correct access rights. configuration Perform a resynchronization and reactivation by file. entries in target. Any changes to that data will not be If you want the data to be replicated. the target. Duplicate Duplicate entries. where the source. This can happen if:  l The network or target system was unavailable and too much data accumulated in the export queue. space transactions continue when SharePlex does not have enough room to accommodate them in the queues. following the directions in How to resynchronize source and target tables Lack of disk Data goes out of synchronization if user See How to resolve disk space shortage . SharePlex 8.  l The flush command was issued. Copy the configuration file to a new file. causing data to accumulate in the capture queue.Out of sync Description Solution condition target system Virtual If replicating data that is configured as If you do not need that data replicated to the private a virtual private database. the access rights to capture the data.  l A SharePlex process was stopped.5) Administrator Guide 290 . assign the reflected on the target. but not restarted. Find and remove any duplicates in the new file. Changes to Out-of-sync conditions can result from See Configure horizontally partitioned replication column the use of horizontally partitioned for more information about how to create column conditions in replication in the following cases: conditions so that partition shift does not occur.6.6 (8.  l The redo logs wrapped and Capture lost pace with Oracle as it processed the archive logs.

To resynchronize the tables. Queue If the SharePlex queues are corrupted. Out of sync Description Solution condition  l A row that does not satisfy the column condition is updated to satisfy the condition.  4. the rowid. then reactivate reactivating configuration. Stop the Post process to prevent further errors.software. corruption such as if there is a system failure. See the data in them can be lost. Determine why it happened before you resynchronize the data. View the Status Database and the Event Log to determine the cause of the problem. do the following before you resynchronize the data:  1. See How to resolve disk space shortage for steps. To avoid queue corruption during system failure. but the configuration was the configuration so that SharePlex can update its after a not reactivated. unique key supplemental logging be set. Otherwise. Resolve the problem.6. and if there is enough disk space available on the source system. the you can use the parameter SP_QUE_SYNC. to resynchronize source and target tables. or that a enabled SharePlex fetches key values based on supplemental log group on unique columns be the rowid. Solve compare command errors If you are having trouble with the compare or repair command. This requires Queue parameters documentation in the SharePlex Reference Guide .com/shareplex/kb SharePlex 8. the problem can repeat itself and result in more data going out of synchronization. see How configuration table are not being replicated.. If the issue you are experiencing is not listed in this documentation. Correct the problem first If data is out-of-synchronization. search the SharePlex Knowledge Base at: https://support. you can stop Import until Post can clear out some of the operations from other transactions. Not If a table was added to the Resynchronize the affected tables.6 (8. refer to the following for assistance. a resynchronization..  3. If the accumulation of messages in the Post queue is threatening to cause disk space issues. change. operations on that object cache. Resynchronize data See How to resynchronize source and target tables to resynchronize data.dell.MOVE.  2. Any operation that changes defined for every table in replication. can cause the wrong key values to be used for subsequent DML operations. such as ALTER TABLE.5) Administrator Guide 291 . PK/UK Certain replication problems can be SharePlex recommends that both primary key and logging not prevented by logging key values.

without being restricted by process time. compare and repair processes.  l By viewing the Event Log — The Event Log records the startup of each sp_declt client process and its SharePlex 8. create a likely to occur when a repair option is used. and there are multiple compares running. new configuration containing only the ones because a repair accesses the queue much longer that you want to compare. and use it for the than a comparison without a repair. process associated sp_declt client processes usually die. fails to If a process does not die. process on its own — or if the sp_desvr server process has fails to not communicated with the client — the sp_desvr die server process usually exits after a certain amount of time. and writing to the SharePlex queues was exceeded. the See Kill compare processes .6. look at the Session IDs of the sp_declt processes and find the one that matches the PID of the sp_desvr process that died. comparison. you can kill it. not detect and repair out-of-sync conditions caused by unsynchronized DDL operations or tables that are not structurally identical. The compare and repair commands do values in the rows. An error is most To limit the tables being compared. It probably will error prepare_to_fetch. After you correct the DDL problem. That is the sp_declt process to kill. show that the tables do not have an equal 904 number of columns or the datatypes are A comparison failed because the source and different. A client When a sp_desvr server process dies. including the replication processes and the limitations. you can determine which one to kill in one of the following ways:  l By viewing the sp_declt log file — In the file. "Too Can not add DataEquator queue reader There is no workaround or way to adjust the many que_TOOMANYUSERS: User table is full. (Do not activate that configuration.       Kill compare processes To kill a client process If you need to kill a sp_declt client process. Problem Description Solution Oracle Error 904 calling oexec in de_select_ Do a DESCRIBE on both tables. which is controlled by the SP_ DEQ_TIMEOUT parameter.5) Administrator Guide 292 . use the compare using command. limit. The sp_declt Session ID is the same as the PID of the associated sp_desvr process.) All of the tables are compared with one compare using process.This site provides filtering options and links to other resources that can help you use and troubleshoot SharePlex.6 (8. die A server When you kill a sp_declt client process or it dies See Kill compare processes . nor is there a way to determine how users” many compare processes can run error The maximum number of processes reading from concurrently without exceeding the limit. target tables being compared are structurally you can run a repair to resynchronize the different. No more than 20 processes can read TIP: To compare multiple tables at the same from and write to the post queue at the same time.

search the SharePlex Knowledge Base at: https://support. A subsequent entry in the log records the compare log file to which the process is writing.87056 queue all) [pid = 2450] 05/04/01 17:01 Notice: sp_declt(deq) (for o. PID. and that is the process to kill./o734v32a_declt- 1228-01.log You can search the log file names for the server process that died. 05/04/01 17:01 Process launched: sp_declt (for o. The process writes to compare log . SharePlex does not run on a Windows system SharePlex uses the MKS Toolkit® (also known as NuTCRACKER) operating environment from Parametric Technology Corporation (PTC) to run on Windows systems.dell.. The 1228 is the PID of the server process.o734v32a.87056 queue all) [pid = 2450] 05/04/01 17:01 Notice: sp_declt(deq) (for o. For example.o734v32a-o. Solution: SharePlex 8.com/shareplex/kb This site provides filtering options and links to other resources that can help you use and troubleshoot SharePlex.o734v32a-87056 queue all) Opened DataEquator session log file /u10/julia30014/var7/ log/o734v32a_declt-1228- 01. in the following sample entry. Solve other replication problems This section reviews solutions to other replication problems. To kill a server process If you need to kill a sp_desvr server process when a sp_declt client process dies.6 (8.o734v32a-o. The process writes to log .. The Event Log records the startup of each client process and its PID. the sp_declt process PID is 2450. in the following sample entry.log. there will be errors when you try to run SharePlex. For example. the logs also record the startup of the associated sp_cop process.software. A subsequent entry in the log records the compare log file to which the process is writing. The 1228 is the PID of the server process. If the issue you are experiencing is not listed in this documentation. or if the NuTCRACKER files have been removed or relocated.log. and look for the client process associated with that log file to determine the correct PID to kill. If the NuTCRACKER service is stopped or disabled.o734v32a-87056 queue all) Opened DataEquator session log file /u10/julia30014/var7/ log/o734v32a_declt- 1228-01. the logs also record the startup of the associated sp_cop process.log On Windows systems.o734v32a-o. the sp_declt process PID is 2450.6. On Windows systems.o734v32a. Within the compare log file’s name in that entry is the PID of the server process. 05/04/01 17:01 Process launched: sp_declt (for o./o734v32a_declt-1228-01. Within the compare log file’s name in that entry is the PID of the server process. look in the Event Log to find out which log the sp_declt client process was writing to.5) Administrator Guide 293 .o734v32a-o.

port or [on host] commands in sp_ctrl.0000000 Or. where x is the version of the NuTCRACKER software. A “Can’t unlink file” error occurs on Windows systems A nuisance error similar to the ones below sometimes occur on Windows systems. Close the Registry Editor. look at the following in the Windows Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Data Focus\Runtime  l The InstallDir string in the right pane of the Runtime node shows the correct location for the files.. Make certain to reinstall SharePlex in the same location. SharePlex 8.  l If you do not see the NuTCRACKER service.  6. start the NuTCRACKER service by using the Services panel of the Administrative Tools Control Panel.SERVlog_ sp_ordr.  3.  7. Check to see if the NuTCRACKER service is running. The files eventually unlink.exe(osp) (for o. Search for the MKS Toolkit folder and restore the files to the location specified in the InstallDir entry.. If the process is not running.SERV+C+0.SERV) Text file busy 17003 . check to see if the NuTCRACKER files were relocated.Can't unlink file R:\Splex2100/state/o. re-install SharePlex.  4. The process name is nutsrvx.SERV queue o. and make certain to install the NuTCRACKER component when prompted. Text file busy Unlinking file: 'r:\splex2102/rim/o. System call error: sp_ordr. do the following:  1. Stop the SharePlex and NuTCRACKER services.6.  2.  5. Restart the system. If you cannot locate the files or cannot restore them to the correct location.5) Administrator Guide 294 . Restart the system to make the new NuTCRACKER environment effective. but SharePlex still returns errors.  2.30 Common connection errors The following are solutions to common errors when starting sp_ctrl. Run regedit to open the Registry Editor. Delete the Data Focus and Mortice Kern Systems registry folders under HKEY_LOCAL_ MACHINE\SOFTWARE\.  1. To determine the correct installed location. Reinstall SharePlex.  l If the NuTCRACKER service started. or with forming a connection with the host. then click the Processes tab.  3. Run the Windows Task Manager.6 (8. if running.

5) Administrator Guide 295 . the statusdb file. If the downtime could cause the SharePlex queues to exceed their disk space. unauthorized connection A connection from a remote See the error message for the attempt from host hostname. Use the list param command to database. add its name to the auth_hosts file.6 (8. configuration file . wrong data type for the determine the valid data type. The Status Database has been Shut down SharePlex and remove damaged. which resides in the data subdirectory of the SharePlex variable-data directory. User is not authorized as a You do not have user permissions SharePlex users must be listed in SharePlex user -. take measures to avoid having to resynchronize the data. SharePlex will create another one when you start sp_ cop again. spoper.Explanation of connection error messages Error Cause Solution Host unknown: cannot form Appears when either the host Verify that the system to which connection command or [on host] option is you want to connect is running and issued. SharePlex 8. and you entered the wrong view the SharePlex parameters name or the parameter is for your version and to verify the deprecated for your SharePlex spelling. spview. See How to resolve disk space shortage . To allow that net name is not listed in the auth_ system to connect to the sp_cop hosts file. Parameter does not exist in You tried to set a parameter. version. Common command errors Error Cause Solution Deactivate/flush a nonactive You are attempting to flush a None required.6. datasource configuration that is not active. Find out how long the network administrator expects it to last. the /etc/group file (Unix and /etc/group Linux) or in the Users list (Windows) under one of the SharePlex user groups: SharePlex Admin.look in param . that you are using the correct system name. machine was denied because its name of the system. Bad routing specification The syntax in the routing map is See Routing specifications in a incorrect. Parameter type checking You might have entered the Use the list param command to failed . Status db file is corrupt.check to execute the operation. Network unreachable The network is down. on the local system.

or. parameter. You can:  o Resynchronize by copying the source tables  o Resynchronize with Oracle transportable tablespace  o Resynchronize with an Oracle hot backup on an active database SharePlex 8. See Manually patch out-of- sync tables  l If the number of out-of-sync tables is large. you can use the SQL statement(s) in the SID_ errlog. level.5) Administrator Guide 296 .6. Permission denied for command You are not a member of the Issue the authlevel command to . post. or… Unknown keyword used in command. export.6 (8.. Unknown service specified. input.sql file to patch the tables manually after you correct the problem. the [on host] option with the command that you want to issue (if available). Command was called with an The command contains invalid Issue the help command to view invalid argument.check your authorization user group that can issue this view your authorization level. command. If the number of out-of-sync rows is small. Service may be only one of: post. it might take less time to re-synchronize the databases than it will to use the compare and repair commands to repair them.  l If only a few tables are out of synchronization. you can run the repair command to resynchronize them.. you can use the compare command in sp_ctrl to see how many rows are out-of-sync in each one.. Valid service (process) names are Issue the command again with capture.  l As an alternative to the compare and repair commands. read. read. or. Default host is not defined: SharePlex cannot to determine Either establish a default host use the ‘host’ command or [on which system you want the with the host command or use host] option. Error Cause Solution defaults file. all. the correct name. No such module. export.. See Overview of Compare and Repair for more information. valid input for the command. import. How to resynchronize source and target tables The following instructions help you decide how to resynchronize out-of-sync tables. capture. import. command to affect. and they are not large.

 5. it ignores the error and continues to apply the next operations in the post queue.Host (irvlabua) Sid (al920u64) -. Allow user access to the source table. On the target system.6. Reactivate the configuration if you had to make any changes to it. sp_ctrl> show sync  4. Stop user access to the affected source table.sql. However. the operations should succeed assuming the structure of the target table did not change. You only need to resynchronize the tables that are out of synchronization.NOT FOUND delete from “SP_5”. issue the show sync command to identify the tables that are out of synchronization. sp_ctrl> activate config filename  5. In SQL*Plus.  2. On the target system.redolog timestamp 641050290 (12/11/15 13:31:30) -. (SID is the ORACLE_SID for the target instance. review this procedure and see the SharePlex Reference Guide for more information about the commands that are used.  4. apply the SQL statement(s) to the target table. The entries in the file are similar to the following example: -.  2. Resynchronize by copying the source tables This procedure restores synchronization to out-of-sync target tables by applying a copy of the source tables. run sp_ctrl. Because this procedure bypasses the comparison made by Post.) You can apply those SQL statements to a target table through SQL*Plus.original rowid AAE0m8AAWAAAAFEAAA -.6 (8. make sure sp_cop is running. On the source system.session 2.  3.sql file in the data sub-directory of the variable-data directory on the target system. SharePlex stores the SID_errlog. so users can continue accessing all other tables. On the source system.[1] Tue Dec 11 13:31:32 2007 -.sql file. 1 error -- -- -. run sp_ctrl.”QA_LOB_DISABLE_INROW” t where rownum = 1 and “KEY”='01'. Post logs source SQL statements that cause out-of-sync errors to an error file called SID_errlog. open the SID_errlog. On the source and target systems.  1.  3.redolog seq#/offset 26622/26980368 -.Manually patch out-of-sync tables If the number of synchronization errors is small. To apply the SQL manually  1.5) Administrator Guide 297 . IMPORTANT! Before you start. SharePlex 8. stop activity for the out-of-sync tables. [IF NECESSARY] On the target system. you can try to repair out-of-sync tables manually. When the Post process detects an out-of-sync condition.-.

follow the instructions in the Oracle documentation for generating a tablespace set. IMPORTANT! Before you start. On the source system. On the target system.  5. copy the datafiles to a secondary location on the source system. It assumes familiarity with using the transportable tablespace feature. NOTE: This command has additional options for use with named queues or multiple targets. On the source system.  8. On the source system. reactivate the configuration file if you had to make any changes.  6.5) Administrator Guide 298 . On the source system. See the SharePlex Reference Guide for more information about this command. Export the metadata to an export file according to the Oracle documentation. When the export is finished. NOTE: This command has additional options for use with named queues or multiple targets.  13. sp_ctrl> flush datasource  7.  12.  3. restore the tables.  6. set the source tablespace to READ ONLY. allow users back onto the source tables. and plugging the set into the database. determine the status ID of each message by viewing the Status Database. referential integrity constraints and check constraints according to the requirements of your replication strategy. review this procedure and see the SharePlex Reference Guide for more information about the commands that are used.6 (8. start the Post process. On the target system. On the source system. On the source system. On the source system. copy the tables. issue the flush command. sp_ctrl> flush datasource  4. SharePlex 8. sp_ctrl> status  11.6. On the source system. sp_ctrl> start post Resynchronize with Oracle transportable tablespace The transportable tablespace feature enables you to resynchronize numerous out-of-sync tables quickly and with minimal downtime. On the target system. sp_ctrl> clear status statusID  15. moving the tablespace set to the target database. To use the transportable tablespace feature. sp_ctrl> show statusdb detail  14.  10. The following instructions contain steps only for using this feature to resynchronize data. On the target system. disable or modify triggers. issue the status command until it shows that Post stopped. This minimizes the impact on the source database of copying the files to the target system.  1. set the source tablespace(s) to READ WRITE mode. See the SharePlex Reference Guide for more information. On the target system. sp_ctrl> activate config filename  9. SQL> ALTER TABLESPACE name READ ONLY. On the target system. run sp_ctrl. SQL> ALTER TABLESPACE name READ WRITE. clear each message with the following command.  2. issue the flush command in sp_ctrl.

 7. On the target system, drop the existing datafiles and tablespaces from the target database so that the
copied files can be applied.
 8. Copy the files from the secondary location on the source system to the target system.
 9. On the target system, use the Oracle import utility to import the metadata and the tablespace
definitions.
 10. On the target system, set the tablespace(s) to READ WRITE mode.
SQL> ALTER TABLESPACE name READ WRITE;
NOTE: SharePlex must be the only user permitted to have write access to the target tables, unless you
are using peer-to-peer replication.
 11. On the source system, reactivate the configuration file if you had to make any changes to it.
sp_ctrl> activate config filename
 12. On the target system, run sp_ctrl.
 13. On the target system, start the Post process.
sp_ctrl> start post

Resynchronize with an Oracle hot backup on an active database
When you use an Oracle hot backup and the reconcile command to resynchronize a target instance, users can
continue to access the production data while the backup is made and applied.

IMPORTANT:
 l To resynchronize centralized reporting, such as a data warehouse, you cannot use a hot backup from
all source systems. One backup would override the data from the previous one. You can use a hot
backup of one of the source instances to establish the target instance, and then use another method
such as export/import or transportable tablespaces to copy the tables from the other instances.
 l To resynchronize peer-to-peer replication, you must quiet all of the secondary source systems for the
duration of this procedure. Move all users to the primary system, and then follow the procedure. After
the procedure has been performed on all of the secondary systems, users can resume activity on them.
 l Before you start, review this procedure and see the SharePlex Reference Guide for more information
about the commands that are used.

To resynchronize with a hot backup
 1. On the source and target systems, run sp_ctrl.
 2. On the target system, stop the Post process. This allows the replicated data to accumulate in the post
queue until the target instance has been recovered and reconciled.
sp_ctrl> stop post
 3. On the source system, run the Oracle hot backup.
 4. On the source and target systems, verify that sp_cop, sp_ctrl and all SharePlex processes (Capture,
Read, Export, Import, Post) are running.
sp_ctrl> status
 5. Switch log files on the source system.

SharePlex 8.6 (8.6.5) Administrator Guide 299

 l To recover the database to a sequence number, make a note of the highest archive-log
sequence number.
 l To recover the database to an Oracle System Change Number (SCN), pick an SCN to recover to on
the target database.
 6. Recover the target database from the hot backup:
 l If recovering to a sequence number, recover the database from the hot backup using the UNTIL
CANCEL option in the RECOVER clause, and cancel the recovery after Oracle has fully applied the
log from the previous step.
 l If recovering to a SCN, recover the database from the hot backup using the UNTIL CHANGE SCN
option in the RECOVER clause, and cancel the recovery after Oracle has applied the logs
matching the SCN from the previous step.
 7. Open the database with the RESETLOGS option.
 8. On the target system, issue the reconcile command. If you are using named post queues, issue the
command for each one. Issue the qstatus command if you are unsure of the queue name.
 l If recovering to a sequence number, substitute the sequence number of the log that you
noted in step 5.
sp_ctrl> reconcile queue queuename for datasource-datadest seq sequence_number
Example: reconcile queue SysA for o.oraA-o.oraA seq 1234
 l If recovering to a SCN, substitute the SCN that you noted in step 5.
sp_ctrl> reconcile queue queuename for datasource-datadest scn scn_number
Example: reconcile queue SysA for o.oraA-o.oraA scn 0123456789
The reconcile process retains control of sp_ctrl until it is finished, and then the sp_ctrl prompt returns.
 9. On the target system, log onto SQL*Plus as the Oracle user for SharePlex, and run the cleanup.sql script
located in the bin sub-directory of the SharePlex product directory. This script truncates and updates
the SharePlex tables, which are owned by the SharePlex user. If you are running multiple instances of
sp_cop with multiple variable-data directories, there is a SharePlex Oracle user for each one. Make
sure you run this script as the SharePlex user that owns the tables you want to restore. The script
prompts you for the SharePlex user name and password.
SQL> @/productdir/bin/cleanup.sql
 10. On the target system, disable or modify the following according to your replication strategy:
 l triggers
 l foreign key constraints
 l cascading delete constraints (or configure SharePlex to ignore them)
 l check constraints
 l scheduled jobs that perform DML
 11. On the source system, reactivate the configuration file if you had to make any changes to it.
sp_ctrl> activate config filename
 12. On the target system, start the Post process. The two instances are now in synchronization, and
SharePlex will continue replicating.
sp_ctrl> start post

SharePlex 8.6 (8.6.5) Administrator Guide 300

How to restore the archive logs
If you decide to restore the archive logs to enable SharePlex to resume capture and replication, use the
following procedure to determine the required archive logs.

 1. Determine the sequence number that Capture needs to resume processing from. Capture stops when it
encounters a log wrap and prints a message to the Event Log (event_log) containing the redo log
sequence number it needs. You also can find out this number by querying the SHAREPLEX_ACTID table
and looking at the SEQNO column, as shown in the following example:
SQL> select * from splex.shareplex_actid;

ACTID SEQNO OFFSET AB_ QUE_SEQ_NO_1 QUE_SEQ_ COMMAND
FLAG NO_2

----- ------ -------- ------ ------------ --------- ------------
-- - -----

14 114 9757200 0 672101000 0

 2. Query the Oracle V$LOG_HISTORY table to find out when that sequence number was archived, then
copy the logs from that point forward to the source system.
SQL> select * from V$LOG_HISTORY;

RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#

----- ------ ------- -------- ------------- --------------
-

111 402941650 1 111 2729501 14-JUL-00 2729548

112 402941737 1 112 2729548 14-JUL-00 2729633

113 402941930 1 113 2729633 14-JUL-00 2781791

114 402942019 1 114 2781791 14-JUL-00 2836155

115 402942106 1 115 2836155 14-JUL-00 2890539

How to release semaphores after process
failure
If database corruption or other system problem forced you to shut down SharePlex, verify that SharePlex
released the semaphores and shared memory that it was using.

To verify and release semaphores
 1. Look for any SharePlex processes that did not shut down, and kill them.
$ ps -ef | grep sp_
$ kill -9 PID
 2. Change directories to the rim sub-directory of the SharePlex variable-data directory, then issue the od

SharePlex 8.6 (8.6.5) Administrator Guide 301

-x command for the shmaddr.loc and the shstinfo.ipc files.
# od -x shmaddr.loc
0000000 0000 00e1 ed40 0000 4400 9328 0080 0000
0000020 0002 0021
0000024

# od -x shstinfo.ipc
0000000 0000 00e0 ee90 0000 4100 9328 0010 0000
0000020 0002 0020
0000024

 3. Make a note of the following values:
 l The first 32-bit word of each of the files above reveals the hexadecimal equivalent of the ID of
the shared memory segment. Convert this value to decimal. For example, in the shmaddr.loc
file shown in step 2, the first word is 0000 00e1, which equates to a decimal value of 225. In the
shstinfo.ipc file, the first word is 0000 00e0, which equates to a decimal value of 224.
 l The third word of the shmaddr.loc and the shstinfo.ipc files reveals the hexadecimal equivalent
of the KEY of the shared memory segment and the semaphore. (Each set has the same key
value.) Do not convert this value to decimal. For example, in the shmaddr.loc file, the third
word is 4400 9328. In the shstinfo.ipc file, the third word is 4100 9328.
 l The fifth word of each file is the SEMAPHORE ID. Convert this value to decimal. The semaphore
IDs in the examples are hex 0002 0021 and 0020 0020, which in decimal are 131105 and 131104,
respectively.
 4. Issue the ipcs -smaa command to view all of the shared memory segments and semaphores. (Shared
memory segments are listed first and are denoted with an “m.” Semaphores are denoted with an “s.”)
The display looks similar to the following, but will be more extensive.

SharePlex 8.6 (8.6.5) Administrator Guide 302

 5. Verify that the shared memory IDs from the shmaddr.loc and shstinfo.ipc are in the list and that the
keys match.
 6. For each shared memory segment, verify that the value in the NATTCH column is 0. This ensures that
the SharePlex processes that you killed released their memory segments.
 7. For the semaphores, verify that the semaphore IDs and keys match the file values.
 8. As root, issue the ipcrm -m command for the ID values (224 and 225 in the examples) to remove the
memory segments.
# ipcrm -m 224
# ipcrm -m 225
 9. As root, issue the ipcrm -s command for the key values (131104 and 131105 in the examples) to remove
the semaphores.
# ipcrm -s 131104
# ipcrm -s 131105

How to resolve disk space shortage
This topic helps you resolve disk space issues that can occur when something interferes with replication. For
possible causes see Solve replication problems.

SharePlex 8.6 (8.6.5) Administrator Guide 303

How to conserve disk space on the target
SharePlex captures and processes data much faster than it posts it with SQL statements on the target system,
so the target is where most disk problems can occur, assuming the network is operational and data is being sent
from the source. If you think the post queue may exceed its disk space, there may be enough free space on the
source system to store the data temporarily until the Post queue clears out.

 1. Stop the Import process.
 2. Let the data accumulate on the source system until Post processes enough messages to clear
the post queue.
 3. Start Import.
 4. Continue to stop and start Import until the amount of data accumulating in the post queue levels out.

When you implement this method, monitor the replication services and disk usage on the source system. On
Unix and Linux systems, you can use the sp_ps script to monitor processes and the sp_qstatmon monitoring
script to monitor the queues. On Windows systems, you can use the Sp_Nt_Mon utility to monitor those
components. See Monitor SharePlex for more information.

How to restore disk space
If a queue disk runs out of disk space, you may see messages similar to this in the Event Log:
11/22/07 14:14 System call error: No space left on device bu_wt.write [sp_mport
(que)/1937472]
11/22/07 14:14 System call error: No space left on device bu_rls.bu_wt [sp_mport
(que)/1937472]
11/22/07 14:14 Error: que_BUFWRTERR: Error writing buffer to file que_writecommit
(irvspxuz+P+o.a920a64z-o.a102a64z) [sp_mport(rim)/1937472] 11/22/07 14:14 Error:
sp_mport: rim_writecommit failed 30 - exiting [sp_mport/ 1937472]
11/22/07 14:14 Process exited sp_mport (from irvspxuz.domain.com queue irvspxuz)
[pid = 1937472] - exit(1)

If a queue disk is almost out of free space, you might be able to add disk space without the need to
resynchronize the data.

To restore disk space
 1. Stop SharePlex on the affected system.
 2. Add more disk space.
 3. Start SharePlex.
 4. View the Event Log and look for the messages "queue recovery started" and "queue recovery
complete."
 l If both messages are there, SharePlex resumes processing where it stopped and the recovery
succeeded. If your applications generate high volumes of transactions, there may be numerous
backlogged messages in the queues. Depending on the nature of the transactions, how well the
target database and the Post process are tuned, and your tolerance for latency, it might be
more practical to resynchronize the data instead of waiting for replication to regain parity with
Oracle's processing.

SharePlex 8.6 (8.6.5) Administrator Guide 304

 l If one or more queues is corrupted, the Event Log records a message like this: Bad header
magic... or peekahead failure. Or, you will see the message queue recovery started,
but you will not see the queue recovery complete message that signifies successful queue
recovery. In this case, you must restore replication an initial state.

To restore replication to an initial state
 1. Run ora_cleansp to restore the variable-data directory and SharePlex tables. It must be run on all
systems in the affected replicationconfiguration. See the utilities documentation in the SharePlex
Reference Guide.
 2. Synchronize the data using your method of choice, then reactivate the configuration. See Activate
replication in an Oracle production environment.
 3. You can prevent this problem from occurring again by using the SharePlex monitoring utilities to
start unattended monitoring of key replication events, including queue volume alerts. See
Monitor SharePlex.

How to find the ORACLE_SID and
ORACLE_HOME
To connect to an Oracle database, SharePlex gets the ORACLE_SID from the input provided during the Oracle
Setup process that is performed during installation. By default, the setup program displays the SID that was
specified when the SharePlex installer was run. The person who runs Oracle Setup has the option to enter a
different ORACLE_SID from the default shown. Based on the value of the ORACLE_SID, SharePlex gets the
ORACLE_HOME from the Registry or oratab file. Both values are stored in the SharePlex environment.
SharePlex uses the Oracle libraries that are in the location specified with ORACLE_HOME.

To determine the ORACLE_SID and ORACLE_HOME being used by SharePlex
Issue the orainfo command in sp_ctrl.
sp_ctrl (mysysl11:2101)> orainfo
Oracle instance #1:
Oracle SID ora12
Oracle HOME /oracle/products/12
Oracle Version 12
Oracle instance #2:
Oracle SID ora12
Oracle HOME /oracle/products/12
Oracle Version 12

To determine the default ORACLE_SID and ORACLE_HOME on Windows
View the Oracle entry in the Registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE.

SharePlex 8.6 (8.6.5) Administrator Guide 305

qa12 is the ORACLE_SID and /qa/oracle/ora12/app/oracle/product/12.To determine the default ORACLE_SID and ORACLE_HOME on UNIX and Linux On most Unix and Linux systems the oratab file is under /etc/oratab. but sometimes there is an oratab file in the /etc directory as well.0 is the ORACLE_HOME.6 (8. it is under /var/opt/oracle.5) Administrator Guide 306 .6.0 In the example. The entry in the file looks like the following example: qa12:/qa/oracle/ora12/app/oracle/product/12. SharePlex 8. On Oracle Solaris systems.

Examples of these are DML applied on the target or an incomplete backup restore. SharePlex 8. The SharePlex Compare and Repair feature enables you to detect hidden out-of-sync conditions and then repair them. NOTE: To understand how hidden out-of-sync conditions can occur. 19 Repair out-of-sync Data This chapter contains an overview of the SharePlex Compare and Repair feature.  l repair using: Takes input from a file to repair some or all of the tables in the active replication configuration. These conditions can go undetected until Post applies an operation that affects the out-of-sync row. but there can be hidden out-of-sync conditions.6 (8. The command spawns a server process on the source system and then sends a message through the SharePlex queues to spawn a client process on the target system. SharePlex provides the following commands for comparing and repairing out-of-sync data:  l compare: Compares an individual source table to its target table or compares a wildcarded set of tables in the same schema.6. Overview of the server and client processes The compare and repair commands are always issued on the source system.  l compare using: Takes input from a file to compare some or all of the tables in the active replication configuration. Contents Overview of Compare and Repair Before you use Compare and Repair How to use the repair and compare commands Overview of Compare and Repair In addition to regularly monitoring the health and performance of replication. it is good practice to compare the source and target data on a regular schedule to ensure that all of the data is still synchronized.5) Administrator Guide 307 . Post detects out-of-sync conditions for the rows that it is processing. SharePlex provides this feature as built-in support to help you maintain data that is synchronized between the source and target systems.  l repair: Repairs an individual target table or a wildcarded set of tables in the same schema. see Understand the concept of synchronization.

 l The tables that you want to compare or repair must be part of an active configuration file. SharePlex obtains a brief exclusive lock on the source table to get read consistency for its row selection. At the default of two threads. review these guidelines. Read.5) Administrator Guide 308 . it will probably need to be sorted in the TEMP tablespace. SharePlex repairs the rows. If any check sums do not match. a batch of rows is read and a check sum is performed. The size depends on the setting of the SP_DEQ_THREADS parameter or the threads option within the command syntax. SharePlex obtains an exclusive lock on the target table and retains the lock for the duration of the comparison of that table. the processes determine which rows are out-of- synchronization and then they create the SQL statements to repair them. SharePlex does not execute these SQL statements. Post) must be running when you run a comparison or repair command. Import.The server and client processes then begin communication with each other. How locks are managed During a comparison. The two processes compare the source and target tables and then write the results to a log file. the rows are read and sorted in identical fashion on both source and target. Export. If a repair command is issued.6 (8. another batch of rows is processed the same way. the size of the tablespace should be larger than the sum of the sizes of the two largest tables. If only a compare command is issued. Make certain that all transactions are committed before you run a comparison or repair.  l If a table is large. However. Before running the compare or repair commands. Before you use Compare and Repair Before running the compare or repair commands. the command works identically to the compare commands except that it executes the SQL statements to repair the out-of-sync rows. Each thread processes a table. They also write the SQL that is needed to repair any out-of-sync rows to a SQL file in the same location as the log files. SharePlex 8. the TEMP tablespace may need to be made larger. If the check sums match. Next.6.  l Uncommitted transactions on a source table prevent the compare and repair processes from obtaining the brief locks they need to obtain read consistency. This prevents the table from being modified while SharePlex is processing it. both of which controls the number of processing threads used by SharePlex on the target. the processes may be multithreaded on the target. Depending on the syntax options included in the command. On the target system. If a repair command is issued. After locking the tables. If you set the number of threads higher. then increase the size of the tablespace to accommodate a proportionate number of the largest tables.  l All of the SharePlex processes (Capture.

Tables with LOBs take much longer to compare or repair than tables without them. If LOBs are not modified once inserted. Larger batch sizes increase processing speed but require more memory.5) Administrator Guide 309 . to identify the out-of-sync rows. SharePlex 8. You can run the repair or repair using command without doing a preliminary comparison. issue the repair or repair using command. The following are commonly modified compare and repair parameters. consider running the compare or repair when the system is less busy. This command shows any rows that are out-of-sync and the possible cause. and then it repairs those rows. Based on transaction volume and the length of time it takes to compare the largest table. replication will go out of synchronization again. Do not increase the values unless necessary. even if you repair the rows this time. THRESHOLD SP_DEQ_ This parameter determines whether or not LOBs are included in the compare/repair SKIP_LOB processing. How to use the repair and compare commands The recommended procedure for maintaining synchronized data through the comparison and repair commands is to run the compare or compare using command first. SP_DEQ_ This parameter controls how the repair commands work on Oracle partitioned tables. For details about these parameters. The parallelism PARRALLISM option of the command overrides this setting. If this happens.6. BUFFER_ SIZE SP_DEQ_ This parameter sets a threshold that controls whether SharePlex uses row-level or table-level ROW_LOCK_ locking when a where option is used. the underlying cause of the out-of-sync condition must be corrected to prevent future out-of-sync conditions. SP_DEQ_ This parameter sets a queue backlog threshold. Unless the cause of the out-of-sync condition is corrected. If the backlog meets or exceeds this value. any compare or repair command that is issued on the source will exit and return an error. then view the results with the repair status command. After the problem is fixed. TABLE_ UPDATE SP_DEQ_ This parameter controls the size of the buffer that holds fetched LONG and LOB data and can READ_ be adjusted based on available system memory. Parameter Description SP_DEQ_ This parameter is used on the source side to control fetch batch size. increase the size of the UNDO tablespace and increase the undo_retention database parameter to avoid an ORA-1555 Snapshot too old error.  l The UNDO tablespace may also need to be increased. SP_DEQ_ This parameter manages the select statement Degree of Parallelism hint. PART_ depending on whether row movement is possible. The command performs a comparison first.6 (8. The batch size controls MALLOC the number of rows that SharePlex selects at once for comparison. However. you can speed up processing by setting this parameter to 0 so that only non-LOB columns are included in the processing. High backlogs delay the establishment of a TIMEOUT connection between the source and target compare/repair processes. see their documentation in the SharePlex Reference Guide.

but for a large table needing extensive repairs.See Solve Synchronization Problems in the SharePlex Administration Guide for causes and solutions for out-of- sync conditions. This increases the latency of the target data and causes operations to accumulate in the post queue. Before you initiate a repair.  l Replication latency can slow down the compare and repair processing. An alternative is to use the key option.  l If you must repair a table immediately. If possible. but cannot tolerate locks or replication latency.  l If the repair can wait. To view the status or results of a comparison. To view the status or results of a repair. Delays caused by a data backlog will delay the spawn message and cause the process on the source to lose its read consistency.  l Locks on a target table can reduce posting performance if Post must wait for the repair to finish before it can apply changes to that table and move on to other tables. correct the cause of the problem immediately and then do the repair during non- peak hours. For a small table. you can use the where option to limit the repair to certain rows.5) Administrator Guide 310 . use the compare status command in sp_ctrl. If the objects that Post needs to change are different from those being repaired. consider the following:  l Although the users of the tables are not usually affected by the brief locks that are applied when tables are compared. see the command documentation in the SharePlex Reference Guide. and how long you are willing to tolerate users being locked out. the two processes run simultaneously. perform comparisons and repairs during off-peak hours. When to run a repair The best time to repair a target table depends on its size. use the repair status command in sp_ctrl.6 (8.6. the extent of out-of-sync rows. How to run the compare and repair commands To get additional information and syntax for the compare and repair commands. the wait can be significant. this might not be disruptive. SharePlex 8. the cause of the problem. which results in errors. they are locked out of the target table for the duration of the repair process. The message sent from the source to spawn the command processes on the target is sent through the queues along with regular replicated data. but this option may cause the repair to miss some out-of-sync rows.

replicated data remaining in the SharePlex queues on that system will be unrecoverable as a result of buffering and the likelihood that the queues are corrupted. Supported databases Oracle database on Unix or Linux Requirements  l SharePlex must be configured correctly to support high availability. you will activate a configuration file and then use the reconcile command to synchronize the results of the backup with ongoing replicated user changes after the copied instance is recovered.5) Administrator Guide 311 . you can move users and replication back to that system with minimal downtime using a hot backup of the secondary instance. Contents Recover replication if the primary system fails Recover replication if the secondary Oracle instance fails Move replication during planned failover and failback Recover replication if the primary system fails In an unplanned failure of the primary (source) machine.6 (8. To support these procedures. 20 Procedures to Maintain Oracle High Availability This chapter contains instructions for recovering replication along with the database and applications during a failover in a high-availability environment. In a high-availability environment. When the primary system is restored. See Run SharePlex.  l You must know how to run SharePlex. See Configure replication to maintain high availability.  l You must have a backup of the SharePlex replication environment. SharePlex must be properly configured to support high availability. you can move replication to the secondary (target) machine along with the database users to maintain data availability. SharePlex 8. For this procedure. See Configure replication to maintain high availability.6.

Export will repeatedly try to connect to the primary system. start sp_ctrl. NOTE: If started. and delete queue commands. Export. Run the script that enables triggers and constraints on the secondary system when users begin using this system. On the primary system.  4. On the primary system. Go to Procedure 2: Move replication to the restored primary system. Procedure 2: Move replication to the restored primary system This procedure moves users back to the primary machine after it is recovered from an unplanned failure. Move users to the secondary system and let them resume working.6 (8. messages for these partial transactions will remain in the queue until cleared later in this procedure. Restore the replication environment on the primary system  1. Read. On the primary system.  6. See the SharePlex Reference Guide.  5. and keep issuing this command until the number of backlogged messages is 0. If the primary system failed before the commit for some transactions were received. This causes the Capture process to set the transaction number to “1” when replication SharePlex 8. Verify that Export is stopped on the secondary system. including starting the applications.  7. $ /productdir/bin/sp_cop -s &  3. Post) from starting. NOTE: Do not wait for the actual numberof messages to be 0.  4. Implement the failover procedure for relocating users to the secondary system. Use the qstatus command to view the post queue. Procedure 1: Move replication to the secondary system This procedure moves replication to the secondary system after an unplanned failure of the primary system. system files and Oracle files from the backups and archives. When you copied the archived SharePlex variable-data directory to the primary system.  2. Run the script that grants INSERT.  l You must understand the activate config. sp_ctrl> stop export  2. sp_ctrl> qstatus  3. but do not start Export. On the primary system. you copied the configuration that was active before the system failed. reconcile. wasting system resources.6.  1. start sp_cop using the -s option to prevent the SharePlex processes (Capture.5) Administrator Guide 312 . Import. Their transactions will now be accumulating in the export queue awaiting restoration of the source database. UPDATE and DELETE access to all users on the secondary system. deactivate the configuration file. recover the SharePlex directories. Follow each segment in the order presented.

On the secondary system.  2.oraA:C  3. Run sp_ctrl on the primary and secondary systems. On the secondary system.oraA-o.6.  l You are issuing the delete queue command on the secondary system because data remaining in the post queue cannot be posted. On the primary system. On the primary system. run an Oracle hot backup. SharePlex will rebuild the queues when you reactivate the configuration and the two systems are reconciled. On the primary system. This establishes communication between the primary and secondary systems. sp_ctrl> delete queue datasource:C Example: sp_ctrl> delete queue o. SharePlex 8. sp_ctrl> delete queue queuename:P for datasource-datadest Example: sp_ctrl> delete queue sysA:P for o.oraB NOTE:  l You are issuing the delete queue command on the primary system because you restored the old capture and export queues when you restored the archived SharePlex directories. delete the capture queue.: sp_ctrl> start export Synchronize the source and target data  1. sp_ctrl> status  2.  4. verify that all SharePlex processes are stopped.  2. delete the post queue. delete the export queue.  3. When the hot backup is finished. On the secondary system. sp_ctrl> stop post  3. Open the database with the RESETLOGS option. On the primary system. Start replication from secondary to primary system  1. from the primary system resumes. stop Post. sp_ctrl> deactivate config filename Purge the queues  1. recover the primary database from the backup by using the UNTIL CANCEL option in the RECOVER clause. start Export. and cancel the recovery after the log with the number you recorded has been fully applied. On the primary system. The primary system failed before Post received a COMMIT for remaining transactions.5) Administrator Guide 313 . switch log files on the secondary system and make a note of the highest archive-log sequence number.6 (8. sp_ctrl> delete queue queuename:X Example: sp_ctrl> delete queue sysA:X  4.

This truncates the SharePlex tables and updates the SHAREPLEX_ACTID table. issue the qstatus command first. start Post. disable check constraints and scheduled jobs that perform DML. Truncating the table restores transaction consistency between the two systems.” followed by a number.oraA-o. sp_ctrl> activate config filename  2. view the status of the SharePlex processes. sp_ctrl> qstatus sp_ctrl> reconcile queue queuename for datasource-datadest seq sequence_number Example: reconcile queue SysB for o. issue the command for each one. or run the sp_add_trigger.18 You are looking for a string that contains the string “objcache_sp_opst_mt. The path will be the state directory in the SharePlex variable-data directory. If you are using named post queues.sql utility script so that the triggers ignore the SharePlex user. sp_ctrl> start post Restore the object cache  1. On the primary system. On the primary system." sp_ctrl> show log filter=objcache  3. disable triggers on the tables. truncate the SHAREPLEX_TRANS table. and filter on the keyword "objcache. and therefore that information is obsolete. On the primary system.ov-objcache_sp_opst_mt. Activate replication on the primary system  1. each referring to a different object-cache file but ending with the same number. On the primary system.sql utility from the bin sub-directory of the SharePlex product directory. Look for a Post error message that refers to a file with a name similar to the following example: 0x0a0100c5+PP+sys4+sp_opst_mt+o. such as the number . issue the show log command with the filter option. issue the reconcile command using the sequence number of the log that you noted previously. which occurred because the object cache is missing. sp_ctrl> status NOTE: This command shows that Post stopped due to an error.  9. NOTE: This resets the sequences on the primary system to the top of the cache upon startup. On the primary system.18 in the example. for example: SharePlex 8.  5.  8. On the primary system.oraA seq 1234  6. there will be more than one error message. On the primary system. This table contains transaction information that the Post process was using before the primary system failed.5) Administrator Guide 314 .  7. On the secondary system.6. On the primary system. activate the configuration file. log onto SQL*Plus as the SharePlex Oracle user and run the cleanup.6 (8. If you do not know the queue names. If you are using named post queues. This is the object-cache file that the Post process needs.  2.quest-o. Make a note of the full pathname of the Post object-cache file(s) named in the error message.  4.

 7.  10.  7. start Post. On the secondary system.  5. Copy the Capture object-cache file to the primary system and rename it to the full pathname of the Post object-cache file that you noted previously.quest-objcache_sp_ocap. shut down SharePlex. such as . splex_vardir/state/0x0a0100c5+PP+sys4+sp_opst_mt+o. sp_ctrl> qstatus  3. On the secondary system. start the Oracle instance. On the secondary system. sp_ctrl> start post Switch users back to the primary system  1. sp_ctrl> start post  12.6 (8. and keep checking until the number of messages is 0. On the secondary system. use the one with the most recent number at the end of it — this number should match the number at the end of the Post object-cache file. On the secondary system. On the primary system. sp_ctrl> shutdown  6. On the secondary system. svrmgr1> shutdown  4. start Post. disable triggers on the tables. shut down the Oracle instance.  8. view the post queue and continue to issue the command until the number of messages is 0.  11.5) Administrator Guide 315 . On the primary system. svrmgr1> startup NOTE: This resets the sequence on the secondary system to the top of the cache to synchronize with the primary system. On the primary system.ov-objcache_sp_ opst_mt. This file will have a name similar to the one in the following example. On the primary system.  6. On the secondary system.18  5. sp_ctrl> stop post  8. view the number of messages in the post queue.  2.18 IMPORTANT! If there are more than one of these files. start SharePlex. or run the sp_add_trigger. stop user access to the database. On the secondary system. o. On the secondary system.  9. SharePlex 8. Move users back to the primary system. enable database objects that were disabled.quest-o.6.sql utility script so that the triggers ignore the SharePlex user. On the secondary system. disable check constraints and scheduled jobs that perform DML.18 in the example. stop Post. change directories to the state sub-directory of the SharePlex variable-data directory and locate the Capture object-cache file.

sp_ctrl> qstatus  13.  l You must know how to run SharePlex. Only the secondary configuration is affected. Supported databases Oracle database on Unix or Linux Requirements  l SharePlex must be configured correctly to support high availability.6. and delete queue commands. On the primary system. sp_ctrl> stop export NOTE: The secondary system is now in a failover-ready state again. the replication environment from that system to the primary system is corrupted. stop Export to prevent accidental changes made on that system from being replicated to the primary system. constraints. See Run SharePlex. See the SharePlex Reference Guide.5) Administrator Guide 316 .  l You must understand the activate config. Follow them in the order presented. SharePlex 8. This procedure cleans out the SharePlex queues and restores the target instance by means of a hot backup from the source system.  14. and scheduled jobs  l a stopped Export process Delete this text and replace it with your own content.  l This procedure assumes that the secondary system itself is operational so that you can interact with SharePlex on the system. switch users back to the primary system. and without the need to reactivate the configuration file on the primary system. Procedure This procedure is divided into logical segments. This procedure enables you to restore the replication configuration without affecting the database users on the primary system. You will use the reconcile command to synchronize the results of the backup with ongoing replicated user changes after the copied instance is recovered. Recover replication if the secondary Oracle instance fails In an unplanned failure of the secondary (target) Oracle instance. See Configure replication to maintain high availability. When the number of messages is 0.6 (8. with:  l no users  l an active configuration  l disabled or modified triggers. reconcile.

run the cleanup. sp_ctrl> delete queue queuename:P for datasource-datadest Example: sp_ctrl> delete queue sysB:P for o. On the primary system. sp_ctrl> delete queue datasource:C Example: sp_ctrl> delete queue o. open the secondary database with the RESETLOGS option. Cancel the recovery after Oracle has fully applied the log from the previous step.  5. On the secondary system.  3. On the secondary system.  4. and therefore the information is obsolete. On the secondary system. On the primary system. Synchronize the data  1.  7. In SQL*Plus. On the secondary system.sql script from the bin subdirectory of the SharePlex product directory. stop Post. SharePlex 8. sp_ctrl> stop post  2. On the primary system. svrmgr1> alter system switch logfile. On the primary system.6 (8.  7. sp_ctrl> deactivate config filename NOTE: The deactivation causes the error “Error in sp_cnc. deactivate the configuration file. switch log files. delete the export queue. delete the capture queue. recover the secondary database from the hot backup using the UNTIL CANCEL option in the RECOVER clause.oraB:C  8. Truncating the tables restores transaction consistency. This table contains transaction information that the Post process on that system was using before the secondary instance failed.Purge the queues  1. On the primary system. On the secondary system. This resets the sequence on the secondary system to the top of the cache upon startup  6. You may ignore it and continue with the procedure.  3. run sp_ctrl.  4. Make a note of the highest sequence number of the archive logs.  6.oraB NOTE: You are deleting the queues on the primary system because there could be messages remaining from uncommitted transactions sent from the secondary instance before it failed. truncate the SHAREPLEX_TRANS internal table in the SharePlex schema.  5.6.5) Administrator Guide 317 . On the secondary system. begin a hot backup of the primary Oracle instance. On the secondary system. On the secondary system.oraA-o. delete the post queue.  2.” in the Event Log. run sp_ctrl. sp_ctrl> delete queue queuename:X Example: sp_ctrl> delete queue sysB:X NOTE: You are deleting the queues on the secondary system because the capture and export queues on that system still retain a record of the transactions that have already been processed. run SQL*Plus as the SharePlex database user.

Move replication during planned failover and failback In a planned failover of database activity to a secondary Oracle instance. sp_ctrl> qstatus sp_ctrl> reconcile queue queuename for datasource-datadest seq sequence_number Example: reconcile queue SysA for o. sp_ctrl> status sp_ctrl> start process NOTE: The secondary system is now prepared for future failover.  10. On the secondary system. issue the qstatus command first. issue the reconcile command using the sequence number of the log that you noted previously. Use the status command to determine if any other SharePlex processes have a status of Stopped due to Error and start them.sql utility script so that the triggers ignore the SharePlex user. disable triggers on the tables. On the secondary system. stop Export. On the secondary system. While users continue their transactions on that system.oraA seq 1234  9. sp_ctrl> start post  3.oraA-o. On the secondary system. SharePlex captures their changes and stores them until the primary system is back online and activity is moved back to that system.  11.  8. after the sp_ctrl prompt returns. On the secondary system. Supported databases Oracle database on Unix or Linux SharePlex 8. disable check constraints and scheduled jobs that perform DML. If you do not know the queue names.6 (8. sp_ctrl> stop export Start replication on the secondary system  1.6. sp_ctrl> activate config filename  2. On the secondary system. This ensures that nothing accidentally gets replicated to the primary system when you activate the configuration on the secondary system. you can quickly move SharePlex to the secondary system. issue the command for each one. start Post. activate the configuration file.5) Administrator Guide 318 . If you are using named post queues. or run the sp_add_trigger.

Do not use the immediate option. On the primary system.  l You must know how to run SharePlex. verify that there are no messages in the capture and export queues. stop user access to the primary instance.Requirements  l SharePlex must be configured correctly to support high availability.  l You must understand the SharePlex flush command. This command stops Post on the secondary system and places a marker in the data stream to establish a synchronization point between the primary and secondary data. The Number of Messages and the Backlog (messages) fields must be 0. See the SharePlex Reference Guide.  7. On the secondary system. On the primary system. verify that Post stopped. On the primary system. On the primary system. Switch users to the secondary system  1.6 (8. On the primary system.6. sp_ctrl> status sp_ctrl> stop export SharePlex 8.  8. sp_ctrl> qstatus  6.  2. Procedure This procedure is divided into logical segments. Do not shut down the primary instance until prompted in the procedure.  3. On the secondary system. sp_ctrl> flush datasource where: datasource is the datasource specification of the primary Oracle instance. sp_ctrl> qstatus  5. See Configure replication to maintain high availability. The Number of Messages and the Backlog (messages) fields must be 0.  l There must be enough disk space where the queues reside on the secondary system to contain the data that accumulates while users are working on that system. shut down SharePlex.) sp_ctrl> status  4.5) Administrator Guide 319 . On the secondary system. See Run SharePlex. (Continue to issue this command until it shows that Post stopped. for example o. Follow them in the order presented. verify that Export is stopped. Stop Export if needed. shut down the Oracle instance with the abort option. verify that there are no messages in the post queue. flush the data in the queues to the secondary system.OraA. This prevents user changes from being replicated to the primary system until it is back online and SharePlex is ready to receive them. svrmgr1> shutdown abort NOTE: This resets the sequence on the primary system to the top of the cache when the database starts.

On the primary system. sp_ctrl> stop export  7. Do not use the SharePlex 8. start Export so that SharePlex sends the accumulated replicated data to the primary system.  12. stop user access to the Oracle instance. On the secondary system. Switch users back to the primary system  1.  2. stop Export. Move the users to the secondary system to resume working.  10.  5. On the secondary system. allow Post to process the message backlog that was sent from the primary system. open the Oracle instance. verify that there are no messages in the capture and export queues. shut down the Oracle instance with the abort option. On the secondary system.OraB.  9. On the secondary system. On the secondary system.  10.sql utility script so that the triggers ignore the SharePlex user. On the primary system. On the primary system. verify that Post stopped. sp_ctrl> shutdown  14. sp_ctrl> start export NOTE: SharePlex passes any sequence updates from the secondary system back to the primary system when Export starts.  9.5) Administrator Guide 320 .  6. (Continue to issue this command until it shows that Post stopped. The Number of Messages and the Backlog (messages) fields must be 0.  4. disable triggers on the tables. On the primary system. The sequence on this system should now be at the top of the cache. On the primary system.  3. verify that there are no messages in the post queue. On the secondary system. start SharePlex. disable check constraints and scheduled jobs that perform DML.) sp_ctrl> status  11. On the secondary system. flush the data in the queues to the primary system. sp_ctrl> flush datasource where: datasource is the datasource specification of the secondary Oracle instance. run the script that grants INSERT. shut down SharePlex. but do not start the Export process.  11. On the primary system. or run the sp_add_trigger. including starting the applications and starting jobs that were running on the primary system. sp_ctrl> qstatus  12.6 (8. On the primary system. On the secondary system. UPDATE and DELETE access to all users. for example o. The Number of Messages and the Backlog (messages) fields must be 0.  8. Run your failover procedure for relocating users to the secondary system. On the primary system.6. run the script that enables triggers and constraints on the secondary instance. sp_ctrl> qstatus  13.

disable check constraints and scheduled jobs that perform DML. disable triggers on the tables. immediate option. On the primary system. or run the sp_add_trigger. run the script that grants INSERT.6. sp_ctrl> start post Replication from the primary instance to the secondary instance is now active to keep the two databases synchronized and ready for future failover when needed. On the primary system. Now.  4. the primary system is at the start of a cache. This prevents replicated data from being sent to the secondary system until SharePlex is ready to receive it there. SharePlex 8.  2.  15. On the secondary system. Run your failover procedure for moving users back to the primary system. UPDATE and DELETE access to all users. On the secondary system. This prevents any accidental DML on that system from being replicated to the primary system.5) Administrator Guide 321 .6 (8. but do not start the Export process. On the primary system. svrmgr1> shutdown abort NOTE: This resets the sequence on the secondary system to the top of the cache when the database starts. sp_ctrl> stop export  5. start Post. On the secondary system. sp_ctrl> start export  6.  16. When the next value is selected on the primary system.  19.  18. including starting the applications and starting jobs that were running on the secondary system. svrmgr1> startup NOTE: The sequence on the secondary system is now at the top of the cache.  17. start the Oracle instance. Switch the users to the primary system to resume working. start export. and the secondary system is at the top of a cache. Resume replication to maintain the secondary instance  1. stop Export. On the secondary system. run the script that enables triggers and constraints on the primary system when users begin using this system.  3. a new cache is acquired and is replicated to the secondary system. On the secondary system. On the secondary system.sql utility script so that the triggers ignore the SharePlex user. start SharePlex.

and SharePlex only needs to analyze the new. SharePlex re-analyzes all of the objects. You must make a copy first.6. changed. If you deactivate the original configuration before you activate a new one.5) Administrator Guide 322 . By copying the file first. Unless you are adding numerous objects to a configuration or adding tables with extensive chaining. or performing system and software maintenance.6 (8. activation of an edited configuration is less time-consuming than the original activation if you do not deactivate the original configuration. SharePlex 8. on systems where SharePlex replication is active. and removed objects. you also can control when to activate the new configuration file. Contents Change an active configuration file Add or change table specifications in an active configuration Add Oracle sequences to an active replication configuration Remove objects from replication Make DDL changes in an active replication configuration Make Oracle changes that affect replication Change the SharePlex database account Change the name or IP address of a replication host Set the SharePlex port number Change an active configuration file Many procedures that change an element of the replication environment will also involve changing the SharePlex configuration file. By copying the file first. SharePlex does not permit anyone to edit an active configuration file. 21 Make changes to an active replication environment This chapter contains instructions for making datbase changes. The activation of the new configuration automatically deactivates the original configuration. you preserve the original file in case it is needed again or you encounter a problem with the new file.

5) Administrator Guide 323 . Any new objects that match the wildcard criteria are automatically added into replication. sp_ctrl> copy config filename to newname Where: filename is the name of the active file and newname is the name of the new one. SharePlex 8. remove it from the configuration file and either keep it in the SHAREPLEX_PARTITION table or remove it.6. Supported databases Oracle Procedure IMPORTANT! Do not deactivate the original configuration. make the required changes to the column partition in the table specification. sp_ctrl> edit config newname  4. Save the configuration file. Issue the edit config command to open the new configuration file in the default text editor. synchronize them according to the directions in Activate replication in an Oracle production environment. If the new source and target tables are populated.  1. See Configure horizontally partitioned replication for assistance.  3. In sp_ctrl.  2. This deactivates the original configuration.  l To change the horizontal partitioning of a table.  l To add a new target system to a partition scheme if that system is not already in a routing map somewhere else in the configuration file. issue the copy config command to make a copy of the active configuration file. See Configure vertically partitioned replication for assistance.oraD  5. add a routing map for it in the configuration. For example:  l To change the vertical partitioning of a table. sp_ctrl> activate config newname  7. and change the partition scheme in the entry for that table in the configuration file. it is not necessary to add the object to the configuration file. Add the entries for the new tables or change existing entries. change the column conditions as needed in the SHAREPLEX_PARTITION table.  6. Begin the line with an exception marker (!) and one or more spaces. Allow users to access the tables. Only add objects that must be explicitly stated by name.6 (8. for example: ! sysD@o. Activate the new configuration. If deleting a partition scheme.Add or change table specifications in an active configuration If you are using wildcards and an object that you are adding satisfies the wildcard specification.

sp_ctrl> edit config newname  4. sp_ctrl> copy config filename to newname Where: filename is the name of the active file and newname is the name of the new one. For more information. Use the following formula to determine the target START_WITH value: source_INCREMENT_BY_value = START_WITH_value  7. To ensure uniqueness on the target system. Save and close the file.5) Administrator Guide 324 .  6. Add the new sequences to the configuration file. issue the copy config command to make a copy of the active configuration file. Stop user activity to the objects on the source system. If the sequences are used to populate a column in a table.  5.  2. the start value of the target sequence must be larger than the start value of the source sequence. This deactivates the original configuration. see Control DDL replication Add sequences if auto-add is not enabled The following procedures apply if the auto-add feature for sequences is not enabled.6.  3. SharePlex 8. Enable auto-add of sequences Add a sequence if the sequence does not populate a column Add a sequence if the sequence populates a column Supported databases Oracle Enable auto-add of sequences You can configure SharePlex to add sequences to replication automatically if their names satisfy a wildcard in the configuration file. Add a sequence if the sequence does not populate a column  1.6 (8. Create the target sequence on the target system. Activate the new configuration.Add Oracle sequences to an active replication configuration The procedure to use to add a sequence to an active configuration file depends on whether or not you can stop user access to the objects that use the sequence. Issue the edit config command to open the new configuration file in the default text editor. In sp_ctrl. you may not be able to stop user access.

After Post stops. Add a sequence if the sequence populates a column  1. sp_ctrl> start post SharePlex 8. Issue the edit config command to open the new configuration file in the default text editor. Allow users to access the objects. Activate the new configuration. select max(column_name) = last known value  9.  5. the value would be 20. source_INCREMENT_BY_value x source_CACHE_value For example. add another multiple of (source_INCREMENT_BY_value x source_CACHE_value). issue the copy config command to make a copy of the active configuration file.  4. This command stops Post and places a marker in the data stream that establishes a synchronization point between source and target data. Determine the value of the following equation.  2. determine the next highest multiple of (source_INCREMENT_BY_value x source_CACHE_value).ORACLE_SID of the source instance — for example o.  10. In sp_ctrl. Save and close the file.  12. For example.5) Administrator Guide 325 .6. Example: INCREMENT_BY = 2 CACHE = 10 select max(column_name) = 24 Next highest multiple of (2 x 10) after 24 = 40. if the source sequence is incremented by 2 and the cache size is 10. sp_ctrl> activate config newname  6. Make a record of this value. Add the new sequences to the configuration file. Create the target sequence with the START WITH value that you calculated.  11.  13.  8. The result determines the START WITH value of the target sequence. On the target. in the previous equation the START WITH value would be: 40 + (2 x 10) = 60.6 (8.oraA. sp_ctrl> activate config newname  8. flush datasource where: datasource is o. To the value obtained in the previous step. flush the data from source system to the target system.  7. sp_ctrl> edit config newname  3. This deactivates the original configuration. issue the following Oracle command on the target system to find the last known value of the sequence. start Post. On the source system. Starting with the value that you recorded for the select max (column_name) command. sp_ctrl> copy config filename to newname Where: filename is the name of the active file and newname is the name of the new one.

issue the copy config command to make a copy of the active configuration file. When there are numerous rollbacks. sp_ctrl> activate config newname  6. so the activation is less time-consuming that the original activation. but only those objects are locked. This deactivates the original configuration. If the current value of the target sequence is less than the maximum value in the table. sp_ctrl> copy config filename to newname Where: filename is the name of the active file and newname is the name of the new one. see the SharePlex Reference Guide. Save and close the file. repeat the preceding procedure to re-establish the sequence relationships.  2.6 (8. IMPORTANT! Sequences continue to be incremented even when a transaction is rolled back.  5. In sp_ctrl. If the object that you want to remove from replication satisfies a wildcard. To prevent posting to a table. Allow users to access the removed objects. You may need to do this if. Issue the edit config command to open the new configuration file in the default text editor. You can prevent posting to a table without removing it from the configuration file. delete the entries for the objects that you want to remove from replication. In the new configuration file. there is data corruption and you do not want DML or DDL operations to be applied to that table. See Use Wildcards to specify multiple objects for more information.5) Administrator Guide 326 . use the not notation to exclude the object.6. SharePlex 8. for example. when Post applies the next valid operation. As a result. use the SP_OPO_DISABLE_OBJECT_NUM parameter. SharePlex will continue replicating the data. while keeping the target sequence at least one multiple of (source_INCREMENT_BY_value x source_CACHE_value) ahead of the source sequence. Activate the new configuration. Remove objects from replication Removing objects from an active replication configuration involves a similar procedure to adding objects. Supported databases All databases supported by SharePlex Procedure  1. If numerous rollbacks are issued for a source table that uses a replicated sequence. the sequence value on the target system could be less than the value in the replicated row. it causes the sequence values to increase without actually being used in columns in the table. sp_ctrl> edit config newname  3. The objects being removed are locked when the new configuration is activated.  4. For more information about this parameter. view the target table regularly to ensure that the current value of the target sequence remains greater than the maximum value in the table.

sp_ctrl> lstatus  4. On the source system. See the SharePlex Reference Guide. See Run SharePlex.oraA. assuming the applicable SharePlex parameters are set correctly. stop access to the source objects (on all systems if using peer-to-peer replication). Procedure  1. Supported DDL is replicated by SharePlex to the target. On the source system. see the SharePlex Release Notes. only the changed objects are analyzed. sp_ctrl> activate config filename  6. The DDL must be applied outside SharePlex on both the source and target systems. For a list of supported DDL operations and required parameters. flush the data from the source system to the target systems. This command stops the Post process and places a marker in the data stream that establishes a synchronization point between the source and target data.  5. On the source system. Supported databases Oracle database Requirements  l You must know how to run SharePlex. On the source system (trusted source in peer-to-peer).6 (8.  3. sp_ctrl> flush datasource where: datasource is the database specification of the source instance. for example o.  l You must understand the SharePlexflush command. reactivate the configuration file. Use this procedure to apply DDL that is not of a type that is supported by SharePlex. On the source system. allow user activity to resume.6. This procedure requires stopping access to the objects in the configuration file and a reactivation of the configuration file to update the internal tables. where it is applied by Post.5) Administrator Guide 327 .  2. SharePlex 8. DDL that is supported by SharePlex can be applied to the source database without reactivating the configuration file or stopping user access to objects.  l You must understand how to activate a configuration file with the activate config command.Make DDL changes in an active replication configuration This procedure applies to DDL changes that are not of a type that is supported by SharePlex. Their replicated changes will accumulate in the post queue. so the activation time will be shorter than the time required for a full activation. On the target system (all secondary systems in peer-to-peer) verify that the number of messages in the post queue is 0 on each system and that Post stopped. make the DDL changes. However.

sp_ctrl> copy config filename to newname  3. On the source system.  7. Make Oracle changes that affect replication This topic helps you make common changes to the Oracle environment while replication is active.  2. Shut down SharePlex. copy the active configuration file to a new name. Change the target ORACLE_SID  1. On the target systems. Change the ORACLE_SID to the new one in all of the routing maps that include this target database and target system. make the corresponding DDL changes.5) Administrator Guide 328 . Edit the oratab file to point to the new ORACLE_HOME. Start SharePlex. Move the ORACLE_HOME. but do not deactivate it.  5. This file is in the data subdirectory of the SharePlex product directory. sp_ctrl> edit config filename  4.  4. Supported databases Oracle on Linux and UNIX Move the location of ORACLE_HOME If you change the ORACLE_HOME.6. On the source system.  8.6 (8. SharePlex 8. sp_ctrl> shutdown  2. start Post. run sp_ctrl. On the source system. On the target system.yaml file to point to the new ORACLE_HOME. reactivate the configuration file. open the new configuration file. Edit the defaults.  3. sp_ctrl> activate config filename  9. [High availability and peer-to-peer replication only] On the secondary systems.  1. you need to relink SharePlex to the Oracle libraries. sp_ctrl> start post SharePlex resumes replication from the last stop point and the data remains synchronized.

verify that Post stopped. On the source system.  10. continue to issue the command until it shows that Post stopped.  6.oraA. On the source system.  1.6 (8. sp_ctrl> activate config filename NOTE: The activation will be brief because SharePlex does not need to analyze the tables. sp_ctrl> start post Change the SharePlex database account You can change the user name (schema or database). but do not activate it. flush the data in the queues to the target. allow users to access the objects involved in replication. stop user access to the objects involved in replication. This user account is the one that the SharePlex processes use to connect to the database when performing replication tasks.  12. On the target system. shut down the database and then rename the ORACLE_SID. The database account was established during the installation of SharePlex. sp_ctrl> status  11. sp_ctrl> flush datasource where: datasource is the database indicator of the source instance. or both in the SharePlex database account. This will deactivate the original configuration file. Save and close the configuration file. On the source system. export the environment variable that points to the variable-data directory for the SharePlex instance for which you are running Oracle Setup.  5.6. These procedures guide you through the process in the correct order to maintain an active replication configuration. On the source system. you must run this procedure for each one that you want to change. start Post.  8.5) Administrator Guide 329 .  9. Supported databases All SharePlex-supported databases Procedure This procedure changes the user account name and/or password of the SharePlex user account in a database. IMPORTANT! If using multiple variable-data directories.  7. If Post is not stopped. This stops the Post process and establishes a synchronization point between the source and target databases. On the target system. activate the new configuration file. (Unix and Linux only) If you are using multiple variable-data directories. for example o. On the target system. the password. ksh shell: SharePlex 8.

 8. issue the following command to change the account name and/or password in the SharePlex internal records. Verify that all SharePlex replication processes for this instance of SharePlex are stopped. if the database is non-Oracle.6. if you are changing the SharePlex account in the source database. sp_ctrl> status  5. sp_ctrl> stop service  4. Start the SharePlex processes.6 (8. stop Capture and Read.  l password is the new password.  l database is the name (not the DSN) of the database.  l username is the new account name.  7.database} set user=username To change the password: sp_ctrl> connection {o. export SP_SYS_VARDIR=/full_path_of_variable-data_directory csh shell: setenv SP_SYS_VARDIR /full_path_of_variable-data_directory  2. For example. Important! Do not delete the SharePlex objects!  6. if the database is Oracle. stop Post. If you are changing the account in the target database. copy all of the SharePlex database objects from the old account to the new one. If you changed the account name. sp_ctrl> start service Change the name or IP address of a replication host Description Use the provision utility to change a host name or IP address in the SharePlex configuration. Run sp_ctrl on the system where you are changing the password. SharePlex 8.SID | r.database} set password=password where:  l SID is the ORACLE_SID of the database. In sp_crtl. NOTE: Keep the old account and SharePlex objects as backup until you are certain replication resumes properly.  3.SID | r. Log in to the database as a DBA user and change the SharePlex account name and/or password to the new ones. Stop the SharePlex processes on the system where you are changing the account information.5) Administrator Guide 330 . To change the user account: sp_ctrl> connection {o.

It only affects SharePlex internal objects. Stop sp_cop. Use if the IP address cannot be obtained from the network. Run provision  1.2 only) Add the following parameter to the param-defaults file before you run provision: SP_CFP_DEBUG I live int() 0x00000000  l If running SharePlex on an AIX machine. -t hostname[:ipaddress]  l -t is required and represents "to. If sp_cop is running. provision propagates the changes to the SharePlex processes that are involved between that machine and the other machine in the same routing map.  2. NOTE: The provision utility does not change anything in the database.The SharePlex processes rely on the host names or IP addresses of the source and target machines to route data properly.1. provision will fail. The provision utility enables you to update host names or IP addresses within an active SharePlex instance."  l old_name is the old (current) host name.6. run provision from that machine. If you change the source machine.5) Administrator Guide 331 .2 only) If provision is being used because the host name of a machine changed."  l new_name is the new host name.0. if you change the target machine. NOTE: provision prevents sp_cop from being started while it is running. Supported databases All databases supported by SharePlex on all supported platforms Guidelines for using provision  l provision is only valid for SharePlex version 6.  l old_ipaddress is the old IP address. contact Dell Support to request a new license.  l (SharePlex 7. set EXTSHM before running provision.6 (8. SharePlex 8. export EXTSHM=ON  l Run provision on the machine for which the name or address changed. Using the command line of the operating system. run provision from that machine. run provision from the SharePlex variable-data directory with the following syntax: provision -f old_name[:old_ipaddress] -t new_name[:new_ipaddress] [-n] Argument Input -f hostname[:ipaddress]  l -f is required and represents "from.1 and above. Otherwise SharePlex will not start after the change. without reactivating a new configuration.0. Therefore.  l (SharePlex 7.

If the provision run fails or you do not agree with the changes that were made. There are no input arguments to this script.6. it might not update the "hostname" column in SHAREPLEX_ACTID table with the new host name details. IMPORTANT! The best practice is to run provision with -n first. you must update the SHAREPLEX_ACTID table manually to specify the new host name. Known issues The following may occur but do not affect the integrity of the replication environment:  l The provision utility does not change the active configuration file. When you start sp_cop. If you need to run the compare config command. Example: provision -f oldname -t newname -n  3. The default TCP and UDP port numbers for SharePlex are both set to 2100 at the time of installation. Run the undo_provision script from the util subdirectory of the SharePlex product directory.  l If an Export or Import error occurred when SharePlex connected to a machine before the name or address was changed. then run it without -n to make the changes.5) Administrator Guide 332 . you can undo them by running the undo_provision script. provision generates new routing information. Generates a report on the changes that provision will make. This is only required if the name change affected a source machine. View the event log to view every change that was made. If that column is not correctly updated.6 (8. -n Runs provision without actually making any changes. update the host name or IP address in the configuration file first. You can ignore this error. See Undo changes made by provision Undo changes made by provision The provision utility creates an undo_provision script that can be used to restore the host names and IP addresses to their previous state. but the Read process may still have the old routing in its cache. Set the SharePlex port number The SharePlex processes use TCP and UDP ports to communicate with each other on different systems. to make certain you agree with the potential changes. For some SharePlex 8.  l After provision is run for a source host. or if you decide to reactivate the configuration. Use if the IP address cannot be obtained from the network.  l If the new or changed machine is a source machine. the error status persists and cannot be cleared. Argument Input  l new_ipaddress is the new IP address. Read might generate a warning that the stored IP address does not match the one for the machine.This means that the configuration file no longer represents the current state of replication after provision is run.

See Run multiple instances of SharePlex. 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. Run sp_ctrl.  1. Set the SharePlex port on Unix and Linux systems To set the port number on Unix and Linux systems.  l When an non-default port is required./sp_ctrl  6. In sp_ctrl. review the following points:  l If your replication strategy requires multiple instances of sp_cop on a system. (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. Export the following environment variables.6 (8. the same number must be used for both the TCP and UDP ports. If there is an active configuration. NOTE:If you are using multiple variable-data directories. set param SP_COP_TPORT port SharePlex 8. 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. Change directories to the SharePlex product directory. sp_cop on one system cannot connect to the sp_cop on another system to send or receive messages and data./sp_cop [-uport] &  5. . Start sp_cop and sp_ctrl. a SharePlex Administrator must set both the TCP and UDP port parameters in the SharePlex environment.deployments of SharePlex you may need to change the port number or add additional ones.6. SharePlex permits a maximum of 64 port numbers (SharePlex instances) on one system. 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.  4. Before selecting a port number.5) Administrator Guide 333 . If the ports are different. 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.  l On the Windows platform. set the following SharePlex parameters. . you will be instructed to stop access to the source objects and shut down sp_cop. you must set a unique port number for each one.

 9. If it becomes necessary to change a port number.5) Administrator Guide 334 . Stop access to the replicating objects on the source system. use the shutdown command in sp_ctrl to stop sp_cop. To finish setting the port in an active configuration  8.6.  l If there is an active configuration. continue to the next step. On the source system. issue the status command to verify that Post stopped. followed by the Oracle SID. On the target system. start sp_cop with the -uport option. status  12. you are finished setting the port number. RAC.database_identifier where: database_identifier is o. . The next time you start sp_cop. Do one of two things:  l If there is not an active configuration.  15. or PDB name that SharePlex uses to connect to the source database (depends on whether the database is a regular Oracle instance. SharePlex 8. issue the qstatus command to verify that all of the messages were posted to the database. shutdown  13. qstatus Continue to issue the command until the export queue is empty. Shut down SharePlex on the source and target systems. NOTE: If you do not have an active configuration.6 (8. the new port number takes effect./sp_cop [-uport] &  14. then issue the flush command in sp_ctrl on the source system to clear the queues. this is the SharePlex entry location: \HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex. Allow users to access the replicating objects.  11. where port is the port number that you have chosen for the variable-data directory that you exported. flush o. tns_alias.  10. Use the status command on the source and target systems to verify that all SharePlex processes are running. Run sp_ctrl on the target system. set param SP_COP_UPORT port  7. Start the Post process. start post  16. On the target system. NOTE:If you are using multiple variable-data directories. or PDB in a container database). status Set the SharePlex port on Windows systems On Windows systems. issue the qstatus command to verify that all of the messages reached the target system. Start sp_cop on the source and target systems. SharePlex port numbers are stored in the Windows Registry. Continue to issue the command until the post queue is empty.  17.

 19.  5. type regedit to open the Registry Editor.  9. After Current State shows that the service is installed.6 (8. select the port number for the instance of SharePlex whose port you want to change. Click Close. select Run.  6.  14. click Install to establish the SharePlex service under the new port. Run the SpUtils utility.  7. under \HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex. click Stop. Your user name must be assigned to the SharePlex Admin group.  8. Under Port. then click OK.  3.  20.  2.6. In the Registry Editor. In the Windows file explorer. Click the new port number to highlight it. Replace the highlighted port number with the new number.  12.  15. navig