[go: up one dir, main page]

0% found this document useful (0 votes)
290 views210 pages

SPO Install Guide530

QUEST Software SPECIFICALLY DISCLAIMS the IMPLIED warranty of the MERCHANTABILITY and FITNESS for a PARTICULAR purpose. This guide contains proprietary information, which is protected by copyright. No part of this guide may be reproduced or transmitted without the written permission of Quest Software, Inc.

Uploaded by

sdohn
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
290 views210 pages

SPO Install Guide530

QUEST Software SPECIFICALLY DISCLAIMS the IMPLIED warranty of the MERCHANTABILITY and FITNESS for a PARTICULAR purpose. This guide contains proprietary information, which is protected by copyright. No part of this guide may be reproduced or transmitted without the written permission of Quest Software, Inc.

Uploaded by

sdohn
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 210

SharePlex For Oracle

Installation and Demonstration Guide


Version 5.3.0

Copyright Quest Software, Inc. 2006 All rights reserved.


This guide contains proprietary information, which is 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 Quest Software, Inc.

Warranty
The information contained in this document is subject to change without notice. Quest Software makes no warranty of any kind with respect to this information. QUEST SOFTWARE SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTY OF THE MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Quest Software shall not be liable for any direct, indirect, incidental, consequential, or other damage alleged in connection with the furnishing or use of this information.

Trademarks
SharePlex, LiveReorg, and SpotlightTM are trademark(s) of Quest Software, Inc. Other trademarks and registered trademarks used in this guide are property of their respective owners.

World Headquarters 5 Polaris Way Aliso Viejo, CA 92656 www.quest.com e-mail: info@quest.com U.S. and Canada: 949-754-8000 Please refer to our Web site for regional and international office information.

SharePlex For Oracle Installation and Demonstration Guide Updated 3/17/06 Version 5.3.0

Table of Contents
About this manual Viewing this manual in PDF format ........................................................................................... viii Conventions used in this manual .................................................................................................. ix About Quest Software................................................................................................................... xi Introduction: Welcome to SharePlex The advantages of SharePlex for Oracle........................................................................................ 2 Strategies for information availability ........................................................................................... 4 Chapter 1: UNIX Installation and Setup UNIX installation overview........................................................................................................... 8 UNIX Preinstallation Checklist ..................................................................................................... 9 Preinstallation procedure for HP-UX environments.................................................................... 28 Preinstallation procedure for Sun Solaris environments.............................................................. 31 Preinstallation procedure for HP Tru64 environments ................................................................ 34 Preinstallation procedures for Red Hat Linux ............................................................................. 37 Preinstallation procedure for AIX................................................................................................ 39 Preinstallation procedure for nameserver environments ............................................................. 40 Installation of SharePlex for Oracle............................................................................................. 41 Post-installation procedures for UNIX cluster environments...................................................... 53 Assigning SharePlex users and authorization levels.................................................................... 58 Establishing SharePlex as an Oracle user .................................................................................... 61 Chapter 2: `Windows Installation and Setup Windows installation overview ................................................................................................... 72 Windows Preinstallation Checklist.............................................................................................. 73 Pre-installation instructions for Windows cluster environments................................................. 85

iv

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Running the installation program................................................................................................. 87 Adding the license key................................................................................................................. 97 Establishing SharePlex as an Oracle user .................................................................................... 99 Installing the SharePlex service ................................................................................................. 104 Changing Global Settings in the MKS Toolkit.......................................................................... 107 Post-installation procedures for Windows cluster environments............................................... 110 Assigning SharePlex users and authorization levels.................................................................. 116 Chapter 3: Basic SharePlex Demonstrations Starting SharePlex ..................................................................................................................... 121 Creating and activating a configuration .................................................................................... 123 Testing replication ..................................................................................................................... 125 Chapter 4: Advanced SharePlex Demonstrations Installing the demonstration objects .......................................................................................... 134 Demo 1: Initial demonstration.................................................................................................... 136 Starting SharePlex...................................................................................................................... 136 Creating the configuration ......................................................................................................... 137 Verifying and activating the configuration ................................................................................ 138 Verifying synchronization.......................................................................................................... 139 Demonstrating performance....................................................................................................... 140 Demo 2: Demonstrating partitioned replication ....................................................................... 142 Demo 3: Demonstrating transformation ................................................................................... 144 Demo 4: Demonstrating generic conflict resolution ................................................................ 147 About this demonstration ........................................................................................................... 147 Preparing for the demonstration................................................................................................. 148 Configuring for conflict resolution ............................................................................................ 149 Creating conflicts ....................................................................................................................... 150 Viewing the results of the Conflict Resolution Demonstration ................................................. 151 Chapter 5: Solving Installation Problems Read this first... .......................................................................................................................... 154 If the UNIX CD will not mount and/or export........................................................................... 154 If the license utility returns errors .............................................................................................. 155 If the installation program returns errors ................................................................................... 156

TABLE OF CONTENTS

If Oracle Setup failed..................................................................................................................159 If SharePlex does not interact with Oracle .................................................................................162 If users cannot run sp_cop or sp_ctrl..........................................................................................164 If users cannot issue commands in sp_ctrl .................................................................................165 Appendix A: SharePlex Tables ........................................................................................167 Appendix B: Running ora_cleansp .................................................................................169 How ora_cleansp works..............................................................................................................169 Other alternatives to ora_cleansp ...............................................................................................170 Before running ora_cleansp........................................................................................................170 Running ora_cleansp on a UNIX system ...................................................................................171 Running OraCleanSp on a Windows system..............................................................................172 Appendix C: Removing SharePlex .................................................................................175 Removing SharePlex from a UNIX system................................................................................175 Removing SharePlex from a Windows system ..........................................................................178

vi

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

ABOUT THIS MANUAL

vii

About this manual


This manual provides instructions for:

Installing SharePlex on UNIX and Windows systems. Establishing SharePlex users. Establishing an Oracle account for SharePlex. Running basic and advanced demonstrations of the SharePlex software. Removing SharePlex from UNIX and Windows systems.

For information about planning and implementing a replication strategy, see the SharePlex Administrators Guide. That manual also has information about:

How SharePlex works How to run the SharePlex programs Other information for maintaining a replication environment.
A companion manual, the SharePlex Reference Manual, provides instructions for:

Using sp_ctrl commands. Setting SharePlex tuning parameters. Preventing and solving common replication problems.

viii

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Viewing this manual in PDF format


This manual is available in Adobe PDF format on a documentation CD provided with the SharePlex software. The PDF document is viewable with Adobe Acrobat Reader Version 5, 6, or 7, which is free software that can be downloaded from the Adobe Web site at www.adobe.com if it is not installed on your system. When viewing the PDF document on-screen using Adobe Acrobat, you can navigate in much the same way as in an HTML document or web page. Click any blue cross-reference text to jump to a topic. To return to the previous topic, use the following Acrobat navigational tools. Click the left-pointing arrow(s) to go back, or click the right-pointing arrow(s) to go forward.

ABOUT THIS MANUAL

ix

Conventions used in this manual


The following typographic conventions are used in this manual. Command-line syntax is expressed in Arial Narrow. The following explains the syntax components.

Bold represents required components of a command or option that must be typed


as shown.

Italics represent variables defined, named or entered by the user. {Braces} enclose available required arguments. [Brackets] represent optional command components. A vertical bar, or pipe character ( | ) within brackets or braces indicates that you can use only one of the enclosed components. Examples: reconcile queue {queuename} for {datasource-datadest} [on host] abort service {service | all}

Names of commands, programs, directories and files are expressed in Arial Bold; other names are expressed in capital letters using the default font. Examples: The sp_ctrl program is located in the bin directory. Open the oramsglst file. Find the value for ORACLE_HOME. Click Apply. System displays, such as prompts and command output, are expressed in Courier. Examples:
sp_ctrl(sysA)> User is a viewer (level=3)

Windows menu items, dialog boxes, and options within dialog boxes are expressed in Arial Bold. Example: From the File menu, select Print.

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Text is set in Times New Roman, with italics and bold styles used either for emphasis or warnings. System names are expressed generically or fictitiously. When necessary, the source system (or primary system) is referred to as SysA. Target systems (or secondary systems) are referred to as SysB, SysC, SysD, and so forth. The following icons are used to highlight important or helpful information:

This icon denotes additional information that you should know.

This icon denotes advice that can help you save time or prevent problems.

This icon calls attention to critical issues that must not be ignored.

This icon refers you to related documentation for more information.

ABOUT THIS MANUAL

xi

About Quest Software


Quest Software, Inc. delivers innovative products that help organizations get more performance and productivity from their applications, databases and infrastructure. Through a deep expertise in IT operations and a continued focus on what works best, Quest helps more than 18,000 customers worldwide meet higher expectations for enterprise IT. Quest Software, headquartered in Alis Viejo, Calif., can be found in offices around the globe and at www.quest.com.

Contacting Quest Software


Phone: Email: Mail: 949-754-8000 info@quest.com Quest Software, Inc. World Headquarters 5 Polaris Way Aliso Viejo, CA 92656 USA www.quest.com

Web site:

Please refer to our Web site for regional and international office information.

Contacting Customer Support


Quest Software's world-class support team is dedicated to ensuring successful product installation and use for all Quest Software solutions. SupportLink: www.quest.com/support Email: Phone: support@quest.com 949-754-8000 or 800-306-9329 (United States and Canada)

You can use SupportLink to do the following:

Create, update, or view support requests Search the knowledge base Access FAQs Download patches

xii

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Introduction

Welcome to SharePlex
This chapter explains the advantages of SharePlex for Oracle. Contents The advantages of SharePlex for Oracle Strategies for information availability

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

The advantages of SharePlex for Oracle


SharePlex for Oracle provides high-speed, log-based replication between Oracle instances on Sun Solaris, IBM-AIX, HP-UX, HP Tru64, Linux, and Windows platforms. SharePlex for Oracle differs from other replication products in several ways.

Maintains up-to-date, accessible target instances


A major benefit of SharePlex replication is that users can access a replica (target) database while SharePlex updates it. SharePlex target instances are continuously updated, providing a reliable copy of the production instance that can be used for reporting, queries, extracts, backups, and high availability. Removing that processing from the production server improves the performance of the production instance while enabling the secondary instance to be optimized for the needs of its users. In addition, SharePlex delivers a logical replica that protects against accidental table drops and database corruption, such as block corruption.

Designed for high-intensity OLTP and ERP environments


SharePlex for Oracle is designed for business volumes of data. It is capable of replicating millions of transactions a day for thousands of tables. It supports business varieties of data, including data types such as LONG columns and sequences, which are found in ERP applications, as well as BLOB and CLOB datatypes.

Conserves system resources


SharePlex for Oracle accomplishes its replication without significantly impacting the source instance, the source system, or the network. Its log-based design allows it to replicate with very low overhead.

Replicates with both speed and accuracy


SharePlex for Oracle is fast, minimizing the latency between source and target instances by capturing modifications to selected objects from the redo logs continuously and starting replication before transactions are committed. If a transaction is cancelled, SharePlex replicates the rollback so that the target instance is an accurate representation of the source database.

INTRODUCTION Welcome to SharePlex

SharePlex for Oracle is fast, but not at the cost of accuracy. SharePlex strictly adheres to the Oracle Read Consistency model, maintaining operation order and session context all the way to the target instance, where SharePlex uses standard SQL to apply the replicated changes.

Maintains fault tolerance


Another significant advantage of SharePlex for Oracle is its tolerance for outages. If the target Oracle instance is unavailable, SharePlex queues data on the target system, allowing transactions to accumulate until an Oracle connection can be re-established. If the target system itself is unavailable, or if there are network problems, SharePlex stores the transactions on the source system until operations are restored.

Provides high level of user control


With this design, you have additional options. You can control when SharePlex sends the data over the network. By default, SharePlex replicates as quickly as it can, sending a steady stream of data to the target systems, but you can delay transmission by stopping the Export process. To control when the transactions are applied to a target system, you can stop the Post process. When you are ready for the transactions to be applied, you simply start the posting process again. As an alternative, you can force the Post process to delay transactions based on a time factor, using one of the SharePlex tuning parameters.

Provides high level of flexibility


SharePlex for Oracle enables you to customize replication to specific needs. For example, you can replicate an entire table, or you can replicate a subset of its data (columns) beyond a firewall while protecting other, more sensitive data. You can replicate different records to different locations. And, you can configure SharePlex to interact with PL/ SQL procedures that transform data before, or instead of, posting it to a target database. SharePlex provides several other ways to configure replication routes, as well.

Installs quickly and easily


SharePlex for Oracle is relatively simple to install. The average installation takes about an hour on two systems.

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Replicates in a high availability environment


SharePlex for Oracle provides significant advantages for high-availability and other mission-critical operations where perpetual data access is essential and downtime means lost business opportunities. Using WAN connections, SharePlex replication can be used to maintain a duplicate database in a different location that is ready for fast, seamless failover and failback in planned or unplanned mode. When the primary system fails, user activity moves to the secondary system and continues while the secondary instance is copied and applied to the primary system during recovery. SharePlex reconciles the copy provided by the backup with the ongoing, replicated user transactions, discarding operations already applied by the backup. With synchronization between the two databases restored, users move back to the primary system and continue to work.

Simplifies routine maintenance


SharePlex for Oracle simplifies the maintenance of Oracle instances involved in replication by facilitating data re-synchronization with minimal interruption to user activity. Application and Oracle patches, upgrades, and DDL changes can be performed on the source machine and applied to the target machine with a hot backup instead of manually, while SharePlex replicates online transactions. SharePlex synchronizes the replicated changes with the backup, and replication resumes in a seamless manner.

Reduces downtime and risk from migrations


Hardware migrations usually require a significant amount of downtime, whether you need to change hardware platforms, move a data center, or consolidate servers to reduce costs. By maintaining a near-realtime copy of the database, SharePlex for Oracle can help you minimize migration downtime by enabling the original system to function normally until the migration is complete.

Strategies for information availability


Because SharePlex for Oracle replicates over LAN and WAN connections, you can put a replica database to work as a reliable, continuously updated alternate database that can be used in many different ways. The following strategies enable you to get the right data to the people who need it, when they need it.

INTRODUCTION Welcome to SharePlex

Reporting instances
SharePlex for Oracle's target instances are ideal for offloading report and query processing because they are accessible while being kept up-to-date, and they can be optimized with keys and indices designed for optimal query performance. You can run reports all day long, without complaints about performance from your OLTP users. Even during busy reporting times such as the end of the month or quarter, application response time will be unaffected by heavy reporting. And, your organizations decision-makers will appreciate the accuracy of the data reflected in the reports.

Data distribution and distributed processing


When many remote users access or use data stored in a central database, you can move their processing to one or more secondary databases that are kept current through SharePlex replication. That way, you can keep the central database and system optimized for transactions. SharePlex also can replicate data through an intermediary system to remote systems, providing access for remote users who have no direct network connection to the primary database.

Data warehousing
SharePlex can replicate from numerous source systems to one target system. 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. 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, timely information that users need to make good decisions.

High availability and disaster recovery


SharePlex for Oracle can be used to maintain duplicate Oracle instances over local or wide-area networks. Production can move to the alternate sites in an emergency or in a planned manner when routine maintenance is performed on the primary server. When combined with other high-availability technologies, such as disk mirroring and refresh solutions, SharePlex replication enables the secondary database to be used for queries and reporting.

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

SharePlex replication strategies at a glance.

1
UNIX Installation and Setup
This chapter contains instructions for installing SharePlex for Oracle on a UNIX system. Contents UNIX installation overview UNIX Preinstallation Checklist Preinstallation procedure for HP-UX environments Preinstallation procedure for Sun Solaris environments Preinstallation procedure for HP Tru64 environments Preinstallation procedures for Red Hat Linux Preinstallation procedure for AIX Preinstallation procedure for nameserver environments Installation of SharePlex for Oracle Post-installation procedures for UNIX cluster environments Assigning SharePlex users and authorization levels Establishing SharePlex as an Oracle user

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

UNIX installation overview


Important! Read this entire chapter before you install SharePlex so that your installation is successful.

1 Complete the UNIX Preinstallation Checklist on page 9. 2 Perform the system-level pre-installation procedures appropriate for your

environment on each system to be involved in replication. There are pre-installation procedures for the following:

HP-UX (requires system reboot), see page 28 Sun Solaris (requires system reboot), see page 31 HP Tru64 (requires system reboot), see page 34 Red Hat Linux, see page 37 AIX (requires system reboot), see page 39 Nameserver Environments, see page 40

3 Perform the installation of the SharePlex software from the CD-ROM on each

system using the instructions on page 41.


4 Assign SharePlex users and authorization levels on each system using the

instructions on page 58.


5 Perform the Oracle Initial Setup (ora_setup) for each Oracle database involved in

replication (source and target) using the instructions on page 61.


Important information about upgrades: Before you upgrade SharePlex, read the Release Notes for the version you are installing. Requirements can vary from one version of SharePlex to another, and you could be asked to take other steps instead of, or in addition to, those documented in this manual. Instructions for upgrading SharePlex are located in the Release Notes.

CHAPTER 1 UNIX Installation and Setup

UNIX Preinstallation Checklist


Before you install SharePlex, complete the following checklist.

CHECKLIST FOR SHAREPLEX VERSIONS


1 After you install SharePlex, but before you run ora_setup, install all current patches

for your version of SharePlex. It is possible that one or more patches were created after the software was released. To find out if there are patches for your version of SharePlex and for instructions for downloading and applying them, log onto www.quest.com/support and click Download Software from the Quest SupportLink home page. If you do not have a login name and password, contact Quest Technical Support at 949-754-8000 or 800-306-9329. Do you have current patches? ______________________________________

10

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES


2 Someone with root privileges must perform the installation. Root access is required

because the installation procedure performs the following root functions:

Adds spadmin, spopr, and spview groups to the /etc/group file. Sets the owner of sp_cop (the SharePlex control program) to root and then sets the
set-user-id bit for owner of the SharePlex programs so that Oracle users without root access, including ora_setup, can run SharePlex.

The set-user-id means that the owner of an executable file will be the user of that process when it executes, no matter who actually is running it. Set-user-id appears in the permissions list in the ls -l listing as s. The operating system will identify the user of sp_cop as root, which gives SharePlex enough permissions to authorize other users to connect through sp_ctrl. Who will perform the installation process?______________________________
Important! After you install SharePlex as root, you can change permissions for

SharePlex to run as non-root by following the procedure Running SharePlex as a non-root user on UNIX systems in Chapter 2 of the SharePlex Administrators Guide. This might be necessary if the filesystem is mounted in nosuid mode. The nosuid mount option invalidates the effect of the set-user-id bit for files on the affected filesystem. When the filesystem is mounted as nosuid, then sp_cop cannot run as root as designed. You can either change the permissions for sp_cop to run as non-root or, as an alternative, the filesystem can be remounted with nosuid disabled. Ask your Systems Administrator which method is preferable in your environment.
Note: Although SharePlex installs and runs as root, the root user is not added to the

SharePlex user groups by default. To include the root user as a SharePlex user, add it to the desired group in the /etc/group file. For more information about SharePlex groups, see page 58.
3 Tru64 systems and Solaris systems not using Volume Manager: When you mount

the SharePlex CD-ROM to begin the installation process, use the device name that maps to the entire CD-ROM. On Tru64 systems, this name usually ends with the letter c. An example would be /dev/rz5c. On Solaris systems not using Volume Manager, it usually ends with the number 2. An example would be /dev/dsk/c0t2d0s2. What is the device name you will be using? _______________________________

CHAPTER 1 UNIX Installation and Setup

11

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


4 Each system on which you are loading SharePlex must be connected to the network.

The network node name and IP address must be established sufficiently to allow the installation process to perform TCP operations, even though the machines themselves are not yet configured. If you disconnect the system from the network, the installation will fail. This failure might appear to be a license utility error, but it is usually the inability of the license utilities and other components of SharePlex to perform initial TCP operations. Make sure nobody renames the /etc/resolv.conf file (if using a DNS nameserver) or does anything else that disconnects the system from the network. Are all systems connected? __________
5 SharePlex supports host names that contain letters or numbers only. If a host name

contains a dot or any other non-alphanumeric character (such as . or _), create an alias in the local /etc/hosts file that contains only alphanumeric characters. Also create the alias on the NIS server and the DNS server, if used. Do all host names contain supported characters?_________________________
6 SharePlex requires a per-process memory allocation of at least 256 MB. Typically,

per-process memory usage for SharePlex processes is just a fraction of that. However, under some conditions, the Post and Read processes dynamically allocate larger sets of memory. To prevent process failure, the per-process memory needs to be high enough so that the processes can succeed under those conditions. Is the per-process memory at least 256 MB?___________________
7 SharePlex requires the number of semaphores per process to be greater than or equal

to 26 (recommended) or the number of queues plus 2. Do the semaphores meet this requirement? ___________________
8 The umask for the root user must be at least 022, so that the user and group have

read privileges. Does umask meet this requirement? ______________________________

12

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


9 Every installation of SharePlex installs a hidden marker file named /var/adm/.splex/ Shareplex.mark that defines the SharePlex installation. It must be present and cannot

be modified in any way. A sample of this file is in Chapter 1 of the SharePlex Administrators Guide.
Important! This file is very small and should not be cause for concern. The only other items that SharePlex puts into the /var/adm directory with the marker file are library links. Together, these files take up an insignificant amount of space in this directory. 10 To ensure fast, problem-free posting to the target database, SharePlex requires a system file descriptors setting of 1024 or as close to that value as your system resources can accommodate. The system file descriptors setting (nofiles) determines the num-

ber of files that a process can have open at one time. This parameter can be set either as a system hard limit or a session-based soft limit. On most production systems, the hard limit usually is set high enough for SharePlex, but it should be verified. The following command displays the hard limit (and other ulimit settings) on Sun Solaris, HP Tru64 and IBM AIX systems. On HP-UX systems, the command works in the Bourne shell (sh). $ ulimit -aH time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) unlimited coredump(blocks) unlimited nofiles(descriptors) 1024 vmemory(kbytes) unlimited The nofiles(descriptors) value is the one to verify and change if necessary. Changing the system file descriptors setting requires root privileges (usually the Systems Administrator), and the system must be rebooted after you make the change. Consult your Systems Administrator for assistance. (Continued on next page.)

CHAPTER 1 UNIX Installation and Setup

13

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued) Instead of changing the hard limit, you can set a soft limit for this parameter, but the soft limit only stays in effect for the duration of the sp_cop session for which it was set. When you shut down sp_cop and start it again, the soft limit reverts back to its default value, which could be lower than the hard limit. The soft limit can be set as high as the hard limit, but not higher. It does not require a root user to change it. On Sun Solaris, HP Tru64, IBM AIX, and HP-UX (Bourne shell), the following command displays the soft limit for file descriptors. $ ulimit -aS The following command sets the soft limit for system file descriptors. $ ulimit -n value Because of the session-based limitations of the soft limit, Quest recommends that you use the hard limit setting for sp_cop to ensure that the system file descriptors setting remains at a sufficient value. If you increase the hard limit to satisfy SharePlex, you can use the soft limit to restrict other applications to lower levels. Is the ulimit set correctly?__________________________

14

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


11 SharePlex uses the default TCP/IP and UDP port numbers of 2100 (for which the hex

equivalent is 834). Please review the following information about establishing the SharePlex port number.

In Oracle 9.2.x, port 2100 is used by an Oracle XML daemon, so it cannot be used
by SharePlex. Use the following instructions to specify an alternative port number for SharePlex after you install the SharePlex software.

If you are using a firewall, a UDP port must be open for SharePlex, in addition to
the TCP/IP port.

If you are using SSH software, you can configure SharePlex to work with it
through a secure port. Using SSH for a SharePlex instance is incompatible with using the Replication Monitor graphical user interface. For instructions for establishing SSH compatibility for SharePlex, see Chapter 5 of the SharePlex Administrators Guide. What is the port number for TCP/IP and UDP? ______________

Using an alternative port number


A SharePlex Administrator can change the SharePlex port number after installation. The same port number must be used for the TCP and UDP ports, and it must be used for the associated instances of sp_cop on all other machines involved in replication. The following instructions are for changing the port number for a single variable-data directory. If you are using multiple variable-data directories, such as for consolidated replication, see the SharePlex Administrators Guide for how to establish port numbers and other parameters. You can use either the vi text editor or the sp_ctrl interface to set the port number. (Continued on next page.)

CHAPTER 1 UNIX Installation and Setup

15

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued) To set an alternative port using sp_ctrl This procedure avoids the use of a text editor by using the sp_ctrl interface to set an alternative port number in the paramdb file.
1 Export the following environment variables on the source and target systems.

ksh shell: $ export SP_COP_TPORT=portnumber $ export SP_COP_UPORT=portnumber where portnumber is the new port number csh shell: $ setenv SP_COP_TPORT portnumber $ setenv SP_COP_UPORT portnumber where portnumber is the new port number
2 Change directories to the SharePlex product directory, then start sp_cop and sp_ctrl on the source and target systems using the -u option with the port number.

$ cd /SharePlex_product_dir/bin $ ./sp_cop -uportnumber & $ ./sp_ctrl


3 At the sp_ctrl prompt, set the following parameters on the source and target

systems: sp_ctrl> set param SP_COP_TPORT portnumber sp_ctrl> set param SP_COP_UPORT portnumber
4 Shut down sp_cop on the source and target systems. The next time you start sp_cop, the new port number takes effect. You are finished setting the port number.

sp_ctrl> shutdown

16

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


12 [CLUSTERS ONLY] SharePlex can be used in a system cluster environment. Within a clus-

ter, SharePlex uses a central, shared disk that stores the binaries and the replication environment for the cluster, including the SharePlex data queues and license keys. During failover, the adoptive node mounts the shared disk so that replication continues. Create a non-raw disk that can be mounted to all nodes in the cluster as part of the failover procedure (not the same disk as the Oracle files or data). You will be running the SharePlex installation script on the primary node of the cluster and installing the SharePlex product and variable-data directories onto the shared disk. The SharePlex queues reside in the rim sub-directory of the variable-data directory and grow dynamically as data is replicated. The maximum potential size of the variable-data directory determines the size that your shared disk needs to be. For more information about sizing the variable-data directory, see checklist step 15. Note that the /var/adm/.splex directory is on your local system. You can either create this directory on your secondary system or move it to your shared drive, and change the /var/adm/.splex a symbolic link. Is there a disk available for the shared SharePlex directories? __________________

CHAPTER 1 UNIX Installation and Setup

17

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


13 The installation script creates a product directory named by you (named /productdir in

this manual) into which it installs the SharePlex binaries. Installation on a non-clustered source or target system Install the product directory on a separate filesystem from the one containing the production Oracle instance, but not on a raw device. Installation on a cluster In a cluster, install the product directory on the shared disk that you created in checklist step 12 so that it can be shared by all nodes of the cluster. Installing the product directory on the shared disk ensures that any SharePlex patches are applied correctly. Since only one instance of SharePlex needs to be patched instead of two, SharePlex is back up and running very quickly. Install the product directory by running the SharePlex installation script on the primary node (the one to which the shared disk normally is mounted). All installations Do not install the product directory in the same directory as the variable-data directory that is created in checklist step 14. There are identically named sub-directories in both directories, and it is possible that SharePlex utilities that restore replication to a clean state could affect the wrong files. What is the name of the SharePlex product directory? ____________________________________________________________ For a list of the SharePlex directories and files, see Chapter 1 of the SharePlex Administrators Guide.

18

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


14 The installation script creates a variable-data directory named by you (named /vardir

in this manual) only if this directory currently does not exist. SharePlex maintains the current replication environment in this directory, including the data files for its queues. Installation on a non-clustered source or target system Install the variable-data directory on a separate filesystem from the one containing the production instance, but not on a raw device, to prevent the queues from affecting the performance of the production instance. Installation on a cluster In a cluster, install the variable-data directory on the shared disk that you created in checklist step 12 so that it can be shared by all nodes of the cluster. Install it by running the SharePlex installation script on the primary node (the one to which the shared disk normally is mounted). Other requirements for the variable-data directory

Do not install the variable-data directory in the same directory as the SharePlex
product directory that is created in checklist step 13. There are identically named sub-directories in both directories, and it is possible that SharePlex utilities that restore replication to a clean state could affect the wrong files.

To determine space requirements for the variable-data directory, see checklist step
15. What is the name of the SharePlex variable-data directory? ____________________________________________________________

CHAPTER 1 UNIX Installation and Setup

19

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


15 The SharePlex queues grow dynamically as data is replicated. To determine the

amount of disk space that you will need for the variable-data directory, use the following guidelines.
1 Estimate the longest time that you can tolerate replication to be down. 2 Determine how much data would be replicated in that time, using the following

formula as a guide. The formula multiplies the redo log value by 1/3 because only about 1/3 of the redo log is data that is replicated. The rest is used by Oracle for maintenance and operation of the instance itself. [size of a redo log] x [number of log switches in 1 hour] x 1/3 x [number of hours downtime] = amount of disk space needed for the queues on each system For example, if you expect to recover from 8 hours of downtime, and your redo logs are 60 MB in size and switch five times an hour, then you could need 800 MB of space on both the source and target machines for the SharePlex queues. [60 MB redo log] x [5 switches/hour] x [1/3] x [8 hours] = 800 MB disk space How much space do you need for the variable-data directory? __________________
16 Run SharePlex from either the korn (ksh) or C shell (csh) shell. Do not use the Bourne shell (sh), because the way it handles background processes is not compatible with SharePlex. If you must use the Bourne shell, switch shells to ksh or csh to

run SharePlex, then exit the shell and return to the Bourne shell.
17 When installing SharePlex on HP 11i systems, you might encounter the following

message:
chatr(error): dl_header_ext.size != sizeof(dl_header_ext). Please update your version of the linker.

This message is specific to HP 11i. It is not an error, and it does not affect the installation. You can ignore this message.

20

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


18 Make certain that your MIS department knows that operating-system changes or rou-

tine maintenance procedures that could affect the SharePlex processes (such as changing semaphores) must be implemented on all nodes in the cluster so that SharePlex fails over to an identical environment. Has MIS been informed about maintaining identical environments on the cluster?___
19 In the system startup scripts and other scripts that start SharePlex and Oracle, as well

as in manual operations, always start Oracle before you start SharePlex and shut down SharePlex before you shut down Oracle. Have scripts and procedures been structured to start and stop Oracle and SharePlex in the proper sequence? ________________ CHECKLIST FOR ORACLE ISSUES
20 If you are upgrading your Oracle database: If you plan to upgrade your database,

perform the Oracle upgrade before you install SharePlex. At the end of the SharePlex installation process, you will run a program named ora_setup, which establishes an Oracle account for SharePlex, installs some database objects, and runs an analysis that establishes object definitions. Installing the database upgrade before you run ora_setup ensures that SharePlex has the correct object definitions. Have all Oracle upgrades been performed?______________________________

CHAPTER 1 UNIX Installation and Setup

21

CHECKLIST FOR ORACLE ISSUES (continued)


21 SharePlex requires a master Oracle account (schema and user) that will be used by all

SharePlex processes to interface with Oracle. The account is created during the ora_setup portion of the installation. To perform replication, SharePlex must have a DBA role and unlimited privileges, tablespace privileges, and read privileges to the redo logs. This privilege remains in effect unless it is explicitly changed. The default user is [SPLEX/SPLEX].
Important: The SharePlex user is created with the default Oracle profile under the assumption that the profile has the unlimited resource privileges originally assigned by Oracle. View the profiles in your database to verify that the default is unlimited. If the default has been changed, assign SharePlex a DBA profile with unlimited privileges for all definitions.

The following grants are required for the SharePlex user, where splex in the syntax is the name of your SharePlex user.

To replicate DDL supported for Oracle 9i (e.g., when setting


SP_OCT_REPLICATE_DDL_ALL=1), the SharePlex Oracle user requires the following grants: grant select any table to splex with admin option; grant create any view to splex with admin option;

For Oracle 9i or 10g, the SharePlex Oracle user requires the following grant to
access the data dictionary if O7_DICTIONARY_ACCESSIBILITY is set to FALSE.* grant select any dictionary to splex;

For Oracle 8i, the SharePlex Oracle user requires the following grant to access the
data dictionary if O7_DICTIONARY_ACCESSIBILITY is set to FALSE.* grant select catalog role to splex; *(SharePlex requires access to the dictionary tables outside of the standard DBA roles.) What will be the name of the SharePlex Oracle user? _______________________

22

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR ORACLE ISSUES (continued)


22 The Oracle instance must exist before you run ora_setup, although the database does not have to be populated. SharePlex does not create or populate the database. Exception: If you will be using an Oracle hot backup to synchronize the data, it creates the

target instance and database files. See the SharePlex Administrators Guide for synchronization procedures. Have all Oracle instances been created? _____________
23 The ora_setup program uses SQL*Plus to install the SharePlex objects needed for replication. To ensure that ora_setup and other non-Oracle users have permission to log into SQL*Plus, the Oracle software must have a set-user-id of the following,

which is the default configuration after Oracle is installed: -rwsr-s--x 1 oracle dba 31829136 Mar 25 2005 oracle

Is the Oracle set-user-id set to -rwsr-s--x? ______________

CHAPTER 1 UNIX Installation and Setup

23

CHECKLIST FOR ORACLE ISSUES (continued)


24 You will be prompted for the ORACLE_SID and ORACLE_HOME directory of the

Oracle instance for which you are implementing replication. SharePlex uses the ORACLE_SID to identify the instance where the source data resides and the target instance where the data will be posted. SharePlex uses the ORACLE_HOME to locate the Oracle shared libraries. To determine the ORACLE_SID and ORACLE_HOME The ORACLE_SID and ORACLE_HOME are listed in the oratab file. On all supported UNIX platforms except Sun Solaris, this file is located in the /etc directory. On Sun machines, it is in the /var/opt/oracle directory. The oratab entry is similar to the following example.
ora8:/oracle/ora8/product: N

In this example, ora8 is the ORACLE_SID, and /oracle/ora8/product is the ORACLE_HOME.


Important!

Because most UNIX platforms store the oratab file in the /etc directory, there
might be an oratab file in the /etc directory on a Sun machine. This adversely affects SharePlex, which relies on the oratab file being in /var/opt/oracle on Sun systems. If there is one in the /etc directory, either move, rename or delete it.

SharePlex must link to the binaries and libraries of the lower minor/patch release
version of Oracle if more than one Oracle minor/patch release version is installed on the same server.

Some oratab files have an asterisk symbol (*) instead of a specific entry for the
ORACLE_SID. This causes ora_setup to fail. Ensure that a valid ORACLE_SID exists in the oratab file. Are there no other oratab files in the /etc directory? ______________ What are the ORACLE_SID and ORACLE_HOME? ________________________
25 If you are running SharePlex as a non-root user, ensure that the environment settings

(ORACLE_SID and ORACLE_HOME) are set correctly.

24

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR ORACLE ISSUES (continued)


26 The minimum number of Oracle PROCESSES and SESSIONS for Multi-Threaded

Post is the setting for the SP_OPO_THREADS_MAX parameter, plus one for the global connection. The default setting (and the max setting) for this parameter is 64.

27 Cluster only: If the nodes of the cluster have different ORACLE_HOMEs, do the

following:

Create a symbolic link in the /var/adm/.splex directory from the local


ORACLE_HOME directories to the actual ORACLE_HOME, using the following syntax. # ln -s /[Oracle client library] /$ORACLE_HOME [Oracle client library]

Edit the oratab file to use this link in place of the actual ORACLE_HOME path, as
shown in the following template: SID:/pathname_to_symbolic_link:N

After failover, the symbolic link will need to be recreated. SharePlex provides a
script named sp_apply for this purpose. Contact Quest Technical Support to obtain a current copy of this script. Invoke this script in the failover script or run it manually before you start SharePlex.
28 SharePlex has a different set of binaries for each supported Oracle version, and the

appropriate set must be installed. You will be prompted for the Oracle version that is being used for replication. What is the Oracle version on this system? __________________________
29 The LOG_PARALLELISM parameter in the init.ora file is not supported when it is set to a value greater than 1. If the LOG_PARALLELISM parameter is set to a value greater than 1, SharePlex cannot parse the redo logs correctly and thus transactions

hang in the capture queue. To prevent this problem, check the value for the LOG_PARALLELISM parameter in the init.ora file before installing SharePlex. If it is greater than 1, reset the value to 1, and restart the Oracle instance for the new value to take effect. What is the value for the LOG_PARALLELISM parameter? ___________________

CHAPTER 1 UNIX Installation and Setup

25

CHECKLIST FOR ORACLE ISSUES (continued)


30 SharePlex requires a tablespace for its internal tables in each database involved in

replication. With the exception of the SHAREPLEX_ROWIDMAP and SHAREPLEX_LOBMAP tables, the SharePlex tables use the tablespaces default storage settings. If the tables to be replicated have extensive chaining or LOB columns, take the following into account when sizing the tablespace. Row chaining considerations The size of the SHAREPLEX_ROWIDMAP table increases with the amount of row chaining. For initial installations of SharePlex (installing clean, not as an upgrade*), this table and its indices each have a 5 MB INITIAL extent, 5 MB NEXT extent, and PCTINCREASE of 0. The MAXEXTENTS is unlimited, allowing the table to grow as much as necessary. If you expect a large amount of chaining, you can estimate how big the SHAREPLEX_ROWIDMAP table will be with the following formula: (2.5) x (number of chained rows) x (57 bytes) divided by 1024 = number of kilobytes If the database is using the cost-based optimizer (CBO), incorporate the SHAREPLEX_ROWIDMAP table into the analysis schedule. LOB considerations The SHAREPLEX_LOBMAP table is created with a 1 MB INITIAL extent, 1 MB NEXT extent, and PCTINCREASE of 10. The MAXEXTENTS of this table is 120, allowing it to grow to 120 MB. There is one entry in the table for each LOB in the replicating tables. Each entry can be up to 27 bytes. The default storage usually accommodates this table, permitting more than 4 million LOB entries. If you expect more than that, size the SharePlex tablespace accordingly, taking into account that this table shares the tablespace with the SHAREPLEX_ROWIDMAP and the other SharePlex tables. The SHAREPLEX_LOBMAP table does not contain entries for LOBs stored in-row. If the database is using the cost-based optimizer (CBO) and the replicating tables include numerous LOBs, incorporate the SHAREPLEX_LOBMAP table into the analysis schedule.
* For upgrades in which a SharePlex account already exists, the storage parameters of the internal tables will not be changed.

(Continued on next page.)

26

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR ORACLE ISSUES (continued) What is the name of the SharePlex tablespace? _____________________________
Note: For a list of the SharePlex internal tables and their default storage values, see

SharePlex Tables on page 167.


31 SharePlex requires a temporary tablespace where it can perform sorts and other operations. This tablespace will be used for sorts when the compare commands are used

to compare source and target tables to verify synchronization. Compares performed on large tables require large sorting operations, especially if there are no primary or unique keys. For more information about the compare commands, see the SharePlex Reference Manual. If you expect to be using these commands, take into account sorting requirements when sizing the SharePlex temporary tablespace or choosing an existing temporary tablespace for SharePlex. The default tablespace is the tablespace where the SharePlex tables are installed. What is the name of the SharePlex temporary tablespace?______________________
32 SharePlex requires an index tablespace for the indices for its internal tables. The

default for this tablespace is the tablespace for the SharePlex tables, but performance will be enhanced if the SharePlex tables and indices are on separate tablespaces to minimize I/O contention. If you have a previous version of SharePlex, the SharePlex indices were installed in the tablespace where you installed the SharePlex tables. These indices are not moved when you install this version of SharePlex, but it is recommended that you move them to the index tablespace you are defining for this installation. If the existing SharePlex indices are on an index tablespace, you can specify that tablespace for this installation. What is the name of the SharePlex index tablespace?_________________________
33 Do you use Oracle Name Server? If so, ensure that the instance is listed in the oratab

file prior to running the SharePlex installation script. Is the instance listed? ______________________

CHAPTER 1 UNIX Installation and Setup

27

CHECKLIST FOR USER AND LICENSE INFORMATION


34 Assign a user who will own and write to the SharePlex product and variable-data

directories. This user must already exist on the system and must have read privileges to the Oracle redo logs. This user will be listed as a SharePlex Administrator in the SharePlex spadmin group during installation. You can add additional SharePlex Administrators after installation, but only this user will own the SharePlex directories. The default is oracle. Nameserver users: Add this user to the nameserver before installing SharePlex, as directed in the preinstallation instructions on page 40. Who is the owner of the SharePlex directories? _____________________________
35 You will assign SharePlex users and authorization levels at the end of the installation

process. Nameserver users: Add users before installing SharePlex by performing the preinstallation procedures on page 40.) Who will use the software? _____________________________________________
36 You will be prompted for a unique license key for each machine where you are

installing SharePlex, including nodes of a cluster. The software can be installed without a key, but you will not be able to run it. The key can be entered manually, or it can be read from a file. Permanent SharePlex license keys are generated for a specific machine ID, so be sure you know which key was assigned to which machine. Keep a copy of your license keys in a safe place in case you need them in the future. For SharePlex demonstration trials only: You need a temporary demonstration key for each system where you are installing SharePlex. If you did not receive keys, contact your Quest sales representative to get them. Do you have a key for each machine? _________________

28

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Preinstallation procedure for HP-UX environments


Important! This procedure only applies if you are installing on a HP-UX platform. This procedure requires a system reboot if semmnu is less than 255 or shmmax is less than 60 MB. This procedure must be performed on every node in a cluster, and on all nonclustered source and target machines.

This is a process to change the maximum number of kernel undo structures for SYS V semaphores and the maximum SYS V shared-memory segment size. The reason for doing this is to ensure the maximum amount of protection for SharePlex processes. This will not affect performance, but will increase system stability. Semaphores provide a locking mechanism for access to queues; undo structures are a subset of semaphores. The shared-memory segment is used by SharePlex queues as the primary working area and is shared by all SharePlex processes. If the number of semaphore undo structures on your system is larger than 255, do not change it. If it is smaller than 255, change it to 255 according to the following instructions. If the maximum shared-memory size is greater than 60 MB, do not change it. If it is smaller than 60 MB, change it to 60 MB according to the following instructions. The following steps show you how to check these parameters and change them if necessary. They must be performed by someone with root-level authority before SharePlex software is installed.
1 Log in as root. 2 Go to SAM by typing sam at the UNIX prompt. A list of SAM areas appears. 3 Arrow down to the Kernel Configuration window and press Enter. The Kernel Configuration window appears. 4 Arrow down to Configurable Parameters and press Enter. The List of Configurable Parameters popup appears. 5 Scroll down to the semmnu parameter. Note the current value and the pending

value. If either value is less than 255, proceed to the next step. If it is greater than or equal to 255, skip to step 12.
6 Position the cursor next to the semmnu parameter and press the space bar to select

it.
7 Tab once to go to the menus at the top of the window, then right-arrow to the Actions menu and press Enter.

CHAPTER 1 UNIX Installation and Setup

29

8 Arrow down to Modify Configurable Parameter and press Enter. 9 Select Specify New Formula/Value with the space bar. 10 Tab to the Formula/Value field and type 255 in the blank provided. If there is already

a value present, overwrite it.


11 Tab to OK and press Enter. This returns you to the Configurable Parameters window. Verify that the Pending Value for semmnu is 255 or greater. 12 Scroll down to the shmmax parameter. Note the current value and the pending

value. If either value is less than 60 MB, proceed to the next step. If either value is greater than 60 MB and you did not change semmnu, exit SAM and proceed to the section in this chapter,Installation of SharePlex for Oracle on page 41. If you have changed semmnu, proceed to step 19 to rebuild the kernel.
13 Position the cursor next to the shmmax parameter and press the space bar to select it. 14 If shmmax is less than 60 MB, tab once to go to the menus at the top of the window, then right-arrow to the Actions menu and press Enter. 15 Arrow down to Modify Configurable Parameter and press Enter. 16 Select Specify New Formula/Value with the space bar. 17 Tab to the Formula/Value field and type 62914560 in the blank provided. 18 Tab to OK and press Enter. This returns you to the Configurable Parameters window. Verify that the Pending Value for shmmax is 62914560. 19 Tab once to go to the File menu. Choose Exit to exit the Kernel Configuration window. The popup Create a New Kernel appears. 20 Select Create a New Kernel Now with the space bar. Tab to OK and press Enter. A message at the bottom of the popup appears: Creating a new kernel. (This process

may take one or two minutes.) The system will respond as follows: The new kernel you have just created must be moved into place prior to shutting down or rebooting the system. Select one of the following: < > Move kernel into place and shutdown/reboot < > Do not move kernel, do not shutdown/reboot <X> Overwrite /stand/system.

30

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

21 Select the Overwrite option. A popup window appears with the following message:

The newly created kernel can be found in /stand/build/vmunix_test and the configuration file used to create it can be found in /stand/build/ system.SAM. To make the kernel changes take effect, you must move the kernel to /stand/vmunix and reboot. We also suggest you move the configuration file to /stand/system at the same time.
22 Tab to OK and press Enter to reboot the system. The directories will be moved

automatically.
Note: The instance of /stand/vmunix will not match the currently running vmunix, which may result in PS inaccuracies.

23 If your environment uses nameservers, continue to Preinstallation procedure for

nameserver environments on page 40. Otherwise, proceed to Installation of SharePlex for Oracle on page 41.

CHAPTER 1 UNIX Installation and Setup

31

Preinstallation procedure for Sun Solaris environments


Important! This procedure only applies if you are installing on a Solaris platform and requires a system reboot if parameters are changed. This procedure must be performed on every node in a cluster, and on all non-clustered source and target machines.

This is a process to change the maximum number of kernel undo structures for SYS V semaphores and the maximum SYS V shared-memory segment size. The reason for doing this is to ensure the maximum amount of protection for SharePlex processes. This will not affect performance, but will increase system stability. Semaphores provide a locking mechanism for access to queues; undo structures are a subset of semaphores. The shared-memory segment is used by SharePlex queues as the primary working area and is shared by all SharePlex processes. If the number of semaphore undo structures on your system is larger than 255, do not change it. If it is smaller than 255, change it to 255 according to the following instructions. If the maximum shared-memory size is greater than 60 MB, do not change it. If it is smaller than 60 MB, change it to 60 MB according to the following instructions. The following steps show you how to check these parameters and change them if necessary. They must be performed by someone with root-level authority before SharePlex software is installed. In SunOS, configurable kernel parameters are set by adding entries in the /etc/system file. This procedure changes the value of the following parameters:

semmni: number of semaphore identifiers (SharePlex requires 70) semmns: number of semaphores in the system (SharePlex requires 255) semmnu: number of processes using the undo facility (SharePlex requires 255) semmsl: maximum number of System V semaphores that can be used by a single

process at one time (the minimum SharePlex requires 128)


semume: number of undo structures per process (SharePlex requires 255) shmmax: maximum shared memory segment size (SharePlex requires 60 MB) shmmin: minimum shared memory segment size (SharePlex recommends 1) shmmni: number of shared memory identifiers (SharePlex requires is 100) shmseg: number of shared memory segments per process (SharePlex requires 26)

32

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0


1 Log on as root. 2 List the parameters by typing sysdef i at the UNIX prompt. The following example is a part of the sysdef output that contains the configured parameters in this

example. The parameters that you are changing may not appear; configurable parameters that havent been changed usually do not appear in the sysdef output. If all parameters appear with values equal to or greater than the SharePlex requirements, you do not have to make additional changes, and you can proceed to step 6. Otherwise, proceed to the next step. IPC Semaphores 70 semaphore identifiers (SEMMNI) 100 semaphores in system (SEMMNS) 255 undo structures in system (SEMMNU) 10 max semaphores per id (SEMMSL) 255 max undo entries per process (SEMUME) * * IPC Shared Memory * 62914560 max shared memory segment size (SHMMAX) 1 min shared memory segment size (SHMMIN) 100 shared memory identifiers (SHMMNI) 26 max attached shm segments per process (SHMSEG)
3 If any of the parameters that you are addressing are not present or incorrect, go into a text editor (such as vi) and add or update the following entries in the /etc/system

file. Note that the parameter names are embedded in a larger string that includes the kernel module and variable class. set set set set set set set set set semsys:seminfo_semmni=70 semsys:seminfo_semmns=255 semsys:seminfo_semmnu=255 semsys:seminfo_semmsl=128 semsys:seminfo_semume=255 shmsys:shminfo_shmmax=62914560 shmsys:shminfo_shmmin=1 shmsys:shminfo_shmmni=100 shmsys:shminfo_shmseg=26

Note: If you are using the Solaris 9 Operating System the shmmin kernel paramter value cannot be changed.

Note: The shmseg kernel paramter is obsolete in Solaris 9 and later.

CHAPTER 1 UNIX Installation and Setup

33

4 After exiting from the editor, verify that the changes are present by executing the grep command for each of the changed parameters in /etc/system. For example, to test the change to semmnu, enter: # grep semmnu /etc/system. 5 Reboot the system for the changes to take effect. 6 If your environment uses nameservers, continue to Preinstallation procedure for

nameserver environments on page 40. Otherwise, proceed to Installation of SharePlex for Oracle on page 41.

34

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Preinstallation procedure for HP Tru64 environments


Important! This procedure only applies if you are installing on a HP Tru64 platform running the Tru64 operating system. This procedure requires a system reboot if parameters need to be changed. This procedure must be performed on every node in a cluster, and on all non-clustered source and target machines.

This is a process to change the maximum number of semaphores and the maximum SYS V shared-memory segment size. Semaphores provide a locking mechanism for access to queues. The shared-memory segment is used by SharePlex queues as the primary working area and is shared by all SharePlex processes. The reason for changing them is to ensure the maximum amount of protection for SharePlex processes. This will not affect performance, but will increase system stability. In Tru64 UNIX, configurable kernel parameters are set by using the sysconfigdb command. This procedure changes the value of the following parameters in the IPC subsystem:

semmni: number of semaphore identifiers in the system (the SharePlex requirement


is 70)

semmsl: maximum number of System V semaphores that can be used by a single


process at one time (the minimum requirement for SharePlex is 128)

semopm: maximum number of operations that can be outstanding on a single system V semaphore at one time (SharePlex requires 64)

semume: number of undo operations that can be outstanding on a single System V


semaphore (SharePlex requires 255)

shmmax: maximum shared memory segment size (SharePlex requires 60 MB)


1 Log on as root. 2 List the current kernel parameters with the sysconfig q ipc command at the UNIX

prompt. You receive a display similar to the following.

CHAPTER 1 UNIX Installation and Setup

35

# /sbin/sysconfig -q ipc ipc: shm_max = 62914560 shm_mni = 256 shm_seg = 32 sem_mni = 70 sem_msl = 128 sem_opm = 10 sem_ume = 255 sem_vmx = 32767 sem_aem = 16384 maxkernelports = 22487 portreservedmaxnum = 22487 #
3 Execute /sbin/sysconfigdb and verify that the disk-resident values match the run-

time values that were displayed in step 2. # /sbin/sysconfigdb l ipc ipc: shm_max = 62914560 shm_mni = 128 shm_seg = 32 In this display, only parameters that have been changed in /etc/sysconfigtab will be displayed. These are parameter changes that will take effect the next time the system is rebooted, and they could be different that those in memory.
4 There are two possible actions:

If any of the parameters that you are addressing for SharePlex do not meet the
SharePlex requirements in the run-time display (step 2) and they were not changed to meet the SharePlex requirements in the disk-resident file (step 3), you need to change them to meet the SharePlex requirements. Proceed to the next step.

If all of the parameters that you are addressing for SharePlex meet the SharePlex
requirements, reboot the system and skip to step 7.
5 Change the appropriate system parameters in /etc/sysconfigtab by using a text editor or through a stanza file. If your /etc/sysconfigtab already has entries for the

IPC subsystem and you do not want to edit the file directly, you will have to take the IPC entries that you want to persist after the SharePlex-directed changes, and combine them with the SharePlex-directed changes in the stanza file. The update function of sysconfigdb will not preserve the previous entries.

36

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

If you already have a stanza file for IPC, you can add the SharePlex-directed changes to that file. Refer to the following:

The stanza file must contain at least the following entries:


ipc: shm_max sem_mni sem_ume sem_opm = = = = 62914560 70 255 64

The first line must begin at the first column and must not contain any other text. To replace the existing IPC entries from a stanza file, type:
# /sbin/sysconfigdb u f stanza_file_name ipc

To create an IPC entry from a stanza file, type:


# /sbin/sysconfigdb a f stanza_file_name ipc If you want to edit the /etc/sysconfigtab file directly and you do not have an existing IPC entry, create an IPC area at the end of the file by adding the entries as described for the stanza file.
6 Reboot the system for the changes to take effect. 7 If your environment uses nameservers, continue to Preinstallation procedure for

nameserver environments on page 40. Otherwise, proceed to Installation of SharePlex for Oracle on page 41.

CHAPTER 1 UNIX Installation and Setup

37

Preinstallation procedures for Red Hat Linux


There are three procedures that you must perform before you install the SharePlex software.
1 2 3

Change the core dump block size from the default value of 0 to a positive value Ensure that the ksh shell is set. Ensure that the configurable kernel parameters are set with values equal to or exceeding the SharePlex default values.

Note: Linux Advanced Server 2.1 and Enterprise Server 3.0 running kernel version 2.4.20 or lower, and users who have set the LD_ASSUME_KERNEL environment variable to kernel version 2.4.20 or lower, show SharePlex as a threaded application that exhibits multiple processes with the same name. This is normal behavior for these lower kernel versions, since standard LinuxThreads with floating stacks is the default implementation. Note that kernel versions 2.4.21 and higher do not exhibit this behavior because they are using the Native Posix Thread Library. If LD_ASSUME_KERNEL is employed we suggest a setting of 2.4.21.

Changing the core dump block size


By default, most versions of Linux have the core dump block size set to zero. Thus, when a core dump occurs, no core file is produced. To determine the core dump block size, enter the command: ulimit -a. If you see coredump(blocks) 0, then you must change the core dump block size to ensure that a core file is produced. To set the core dump block size to a reasonable number, such as 1.5 million blocks, type the following: ulimit -c 1500000

Installing the ksh shell


Red Hat Linux must have the ksh shell installed before SharePlex is installed. A version of ksh called pdksh is included on the Red Hat Linux CDs. Refer to the Red Hat Linux documentation for more information.

38

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Changing the configurable kernel parameters


This procedure changes the maximum number of kernel undo structures for SYS V semaphores and the maximum SYS V shared-memory segment size. The reason for doing this is to ensure the maximum amount of protection for SharePlex processes. This will not affect performance, but will increase system stability. Semaphores provide a locking mechanism for access to queues; undo structures are a subset of semaphores. The shared-memory segment is used by SharePlex queues as the primary working area and is shared by all SharePlex processes. If the number of semaphore undo structures on your system is larger than 255, do not change it. If it is smaller than 255, change it to 255 according to the following instructions. If the maximum shared-memory size is greater than 60 MB, do not change it. If it is smaller than 60 MB, change it to 60 MB according to the following instructions. The following steps show you how to check these parameters and change them if necessary. They must be performed by someone with root-level authority before SharePlex software is installed. In Linux, configurable kernel parameters are set by adding entries in the /etc/sysctl.conf file. This procedure changes the value of the following parameters:

semmni: number of semaphore identifiers (SharePlex requires 70) semmns: number of semaphores in the system (SharePlex requires 255) semmnu: number of processes using the undo facility (SharePlex requires 255) semmsl: maximum number of System V semaphores that can be used by a single process at one time (the minimum requirement for SharePlex is 128)

semopm: maximum number of operations that can be outstanding on a single system V semaphore at one time (SharePlex requires 64)

semume: number of undo structures per process (SharePlex requires 255) shmmax: maximum shared memory segment size (SharePlex requiremes 60 MB) shmmin: minimum shared memory segment size (SharePlex recommends 1 MB) shmmni: number of shared memory identifiers (SharePlex requires 100) shmseg: number of shared memory segments per process (SharePlex requires 26)

Please note that the semmns and semmni kernel values are additive. You will need to add the Oracle min values to the Shareplex min values to obtain the appropriate setting.

CHAPTER 1 UNIX Installation and Setup

39

Preinstallation procedure for AIX


This required procedure defines the environment variable EXTSHM before starting sp_cop on an AIX system to circumvent problems with shared memory utilization. AIX divides the address space of 32-bit processes into 256 MB slots, of which 8 to 10 of these (depending upon the OS version) are available for shared and dynamic process memory. A 32-bit AIX application then divides the available slots between dynamic and shared memory. By default, each shared memory segment is assigned a full slot by AIX. SharePlex 5.3 uses shared memory segments for each queue, as well as a number of AIS system services used by licensing functions. Therefore, it is possible to have difficulty initializing a queue or validating a license when named export or post queues have been in use. These functions fail because their requests for shared memory cannot be fulfilled - there are no more available memory slots. You can work around this limitation by defining the environment variable EXTSHM=ON in the shell before launching sp_cop. When the kernel detects this environment variable, it allows sp_cop to assign shared memory segments more efficiently. The shared memory segments are started at the next available memory address, instead of the beginning of the next available memory slot. An example of the syntax for the EXTSHM environment variable is shown below: # export EXTSHM=ON Note that EXTSHM provides more efficient usage of available shared memory. It will not prevent the issues described above if all of the memory available for shared memory segments has been used. Also note that EXTSHM and ON must be all uppercase.
Note: This error occurs because of limitations of EXTSHM, in that the variable cannot be used with either raw or asynchronous I/O.

Important! You cannot run SQL Plus in an environment that defines EXTSHM. Oracle 8i client libraries misinterpret a defined (ON or OFF) EXTSHM variable as equal to EXTSHM=ON. In such cases, you must unset EXTSHM using the syntax unset EXTSHM. Of the SharePlex Oracle utilities, only ora_setup requires that you unset EXTSHM.

40

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Preinstallation procedure for nameserver environments


Important! Use this procedure only if you are installing in a nameserver environment.

If a replication system is within a nameserver environment, such as NIS or NISPLUS, you have the following choices for installing SharePlex groups:

Use the following procedure to add the SharePlex groups and the SharePlex Administrator to the nameserver before installing SharePlex. Or...

To install the SharePlex entries on the local system, add the SharePlex groups to the
local /etc/group file and assign users to them. The SharePlex Administrator named in preinstallation checklist step 34 must be listed in the spadmin group in the local /etc/group file and on the nameserver.

To add SharePlex groups to the nameserver


For NIS, add the following groups to the group.byname and group.bygid maps on
your NIS server. You can select the group ID values for each.
spadmin spopr spview

For NISPLUS, add the following SharePlex groups to the group.org_dir table:
spadmin spopr spview

For both NIS and NISPLUS, add the SharePlex Administrator named in step 34 of
the UNIX Preinstallation Checklist to the spadmin group that you just created. This must be done before you begin the SharePlex installation process.

To add SharePlex groups to the local system


You can add the SharePlex groups to the local system after you install SharePlex. To add users to those groups, see the instructions in Assigning SharePlex users and authorization levels on page 58.

Please continue...Proceed to Installation of SharePlex for Oracle on page 41.

CHAPTER 1 UNIX Installation and Setup

41

Installation of SharePlex for Oracle


The following installation procedure is for installing SharePlex 5.3.0 on the UNIX platform. This procedure must be completed by a person with root-level authority (user ID = 0).
Warning! If you have not done so already, review the Preinstallation Checklist on page 9 and the preinstallation procedures starting on page 28 before you begin the installation process.

Where to run the installation script


Clustered nodes: Run the SharePlex installation script only on the primary node of a
source or target cluster. Mount the shared disk that was created in preinstallation checklist step 12 before running the installation script so that directory paths and other parameters are established correctly.

Non-clustered systems: Run the SharePlex installation script on all non-clustered


source and target systems that will be involved in replication.

Downloading the tar file


The installation files are self-extracting tar files that can be downloaded from Support Link (they also are provided on the product CD-ROM). The tar files automatically execute splex_install (for SharePlex installations and upgrades) or sp_apply (for patching SharePlex) on the extracted package. Installation and upgrade files have the following naming convention, ending in .run: SharePlex_Oracle-[Release #]-[Platform]-[Oracle Version #].run Example SharePlex_Oracle-5.1.0.511-Linux-x86-Oracle92.run To execute the tar file, perform the following steps:
1 Copy the appropriate platform's .run file to a temporary directory where you

have write permissions.


2 Execute the file in that directory. After the tar extracts itself, the prompts will look like the ones in the splex_install (or sp_apply) script.

42

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Note that the .run creates a temporary target directory for extraction in the current directory. The name for the temporary target directory is the same as the .run script but with a .tmp appended to the end. For example: SharePlex_Oracle-5.1.0.511-Linux-x86-Oracle92.run.tmp This directory is removed upon completion. Continue with step 5, "Run the SharePlex installation script by issuing the following command.," on page 47. For more information about .run files for installation and patches, refer to Chapter 10: Operations, in the SharePlex Administrators Guide.

If the system does not have a local CD-ROM drive


Important! If the system where you are installing SharePlex has a local CD-ROM drive, skip this section and proceed to Installing SharePlex for Oracle on page 46.

If the system where you are installing SharePlex does not have a local CD drive, you can mount the CD on another machine that has a CD drive and transfer the installation over the network. SharePlex CD-ROMs are written in ISO format with Rockridge extensions. After the CD-ROM is mounted, you can export it though NFS and mount it remotely as-is. The procedure can be performed by a non-root user so long as the user has sufficient privilege to access the directories, hardware devices, and mounted filesystems. Root privilege is required to mount filesystems and to perform NFS export operations. Use one of the following sets of instructions, whichever applies to the types of machines you are using. In the instructions, the machine with the CD-ROM drive is called the local system, and the machine where you are installing SharePlex is called the remote system.

Remote mounting from an HP-UX system to another HP-UX system Remote mounting from an HP-UX system to a different platform Remote mounting from a non-HP-UX system to any platform, including HP-UX

Remote mounting from an HP-UX system to another HP-UX system


Do the following on the local system.
1 Log on as root.

CHAPTER 1 UNIX Installation and Setup

43

2 If you do not have pfs_mountd running, start it with the following command.

# nohup /usr/sbin/pfs_mountd &


3 If you do not have pfsd running, start it with the following command.

# nohup /usr/sbin/pfsd &


4 Enter the name of the mount point in the /etc/pfs_fstab file using vi or another text

editor.
5 Enter the mount point in the /etc/pfs_exports file. 6 Issue the following command to make the pfs filesystem visible over the network on

the remote machine. # pfs_exportfs -a


7 Mount the CD-ROM using the following command.

# pfs_mount /device_name /mount_point Do the following on the remote system.


1 If you do not have pfs_mountd running, start it with the following command.

# nohup /usr/sbin/pfs_mountd &


2 If you do not have pfsd running, start it with the following command.

# nohup /usr/sbin/pfsd &


3 Mount the filesystem that was exported from the local system, using the following

command. # pfs_mount -o xlat=unix remotesystem:/cdrom_mountpoint /local_mountpoint


4 Proceed to Installing SharePlex for Oracle on page 46.

Remote mounting from an HP-UX system to a different platform


A CD-ROM mounted on a local HP-UX system cannot be exported and remote mounted to a non-HP-UX system. Instead, you can copy the files to a distribution directory.
1 Log on to the local system as root. 2 Create or designate a distribution directory (denoted in these instructions as /distdir)

on the local system. This directory will be used to load the distribution files. It must be readable and writable by the local system and capable (for remote installations) of

44

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

NFS mounting to other systems. This directory typically requires at least 40 MB of space. Note: This is not the final directory for the files. You will be prompted for a permanent location for the files in the SharePlex installation instructions.
3 Copy the files to the distribution directory through tar by issuing the following

commands. # cd /cdrom_mountpoint # tar cf - * | (cd /distdir; tar xvf - ) The distribution directory is now ready to be exported. To install SharePlex on a remote system, you must make the distribution directory (/distdir) or CD-ROM directory available on the remote machine. To do this, export the directory through NFS using the following steps.
Note: You can export the distribution directory (/distdir) as read only. Root authority is required to perform the export function. 4 On the local system, export the distribution directory to the remote system. The

remote system will now have permission to mount the distribution directory.
5 On the remote system, mount the local systems distribution directory (/distdir). 6 Proceed to Installing SharePlex for Oracle on page 46.

Remote mounting from a non-HP-UX system to any platform, including HP-UX


To mount from a non-HP-UX system to any other platform, you can either export the CD-ROM device or copy the files to a distribution directory. The following steps guide you according to your choice. In the instructions, CD_devicename represents the device name of the CD-ROM, and cdrom_directory represents the mount point.
1 Log on to the local system as root. 2 Mount the CD-ROM on the local system by issuing the following command.

# mount -r /CD_devicename /local_mountpoint


3 To export the CD-ROM device, proceed to step 6 of this section.

Or... To copy the files to a distribution directory, continue to the next step.

CHAPTER 1 UNIX Installation and Setup

45

4 Create or designate a distribution directory (denoted in these instructions as /distdir).

This directory will be used to load the distribution files. It should be readable and writable by the local system and capable (for remote installations) of NFS mounting to other systems. This directory typically requires at least 40 MB of space. Note: This is not the final directory for the files. You will be prompted for a permanent location for the files in the SharePlex installation instructions.
5 Copy the files to the distribution directory through tar by typing:

# cd /cdrom_directory # tar cf - * | (cd /distdir; tar xvf - ) The distribution directory is now ready to be exported. To install SharePlex on a remote system, you must make the distribution directory (/distdir) or CD-ROM directory available on the remote machine. To do this, export the directory through NFS using the following steps.
Note: You can export the distribution directory (/distdir) as read only. Root authority is required to perform the export function. 6 On the local system, export the CD-ROM device or the distribution directory (/

distdir) to the remote system. The remote system will now have permission to mount the distribution directory.
7 On the remote system, mount the CD-ROM device or the local systems distribution

directory (/distdir).
8 Proceed to Installing SharePlex for Oracle on page 46.

46

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Installing SharePlex for Oracle


1 [SKIP THIS STEP IF YOU ALREADY MOUNTED THE CD LOCALLY OR OVER THE NETWORK.] To install

directly from a local CD-ROM device, mount the SharePlex CD using the appropriate mount command for your platform in the following table. Substitute the name of the CD-ROM device for device_name. Substitute the text string of the mount point on the server for /mount_point. For further information about mounting the CD-ROM, see your computers documentation. Platform
HP TRU64 IBM AIX HP-UX SUN SOLARIS

Mount command mount -r-t cdfs -o noversion device_name/mount_point mount-r device_name/mount_point pfs_mount /device_name /mount_point The CD-ROM mounts automatically. No commands are necessary.

2 Log on as root. If you attempt a non-root installation, the installation script generates

the following error message: You must be super user (root) in order to install SharePlex.
3 Change directories to the SharePlex CD-ROM by issuing the following command.

# cd /CD_mountpoint
4 If you are running multiple versions of SharePlex and you are only planning to

upgrade a single version at this time, export the IGNORE_RUN environment variable. This directs the installation program to ignore other versions of sp_cop that are currently running. $ export IGNORE_RUN=y (ksh shell) $ setenv IGNORE_RUN y (csh shell)

CHAPTER 1 UNIX Installation and Setup

47

Run the SharePlex installation script by issuing the following command. # ./SharePlex_Oracle-5.3.0.50-SunOS-5.8-Oracle10.run Creating directory SharePlex_Oracle-5.3.0.50-SunOS-5.8Oracle10.run.tmp Verifying archive integrity... All good. Uncompressing SharePlex_Oracle-5.3.0.50-SunOS-5.8-Oracle10-Self_Extra Tar File......................................................... Checking usage of a nameserver for users and groups; Enter your nameserver or 'none' [NIS/NISPLUS/none]: You are then prompted for nameserver information. Enter either NIS or NISPLUS if you are using a nameserver, or enter none if you are not using a nameserver.

6 You are prompted to enter the name of the user who will own the SharePlex binaries

and queues. Installing Product(s): SPLEX-ORACLE Please specify an existing user who has read privileges to the Oracle redo logs and will own the SharePlex product and variable-data directories. This user will be a SharePlex Administrator and placed in the spadmin group[oracle]: Enter the name of an existing user who will own the SharePlex binaries and queues, as specified in step 34 of the Preinstallation Checklist. (The default is oracle.)
7 The installation script displays its progress as follows:

Non-nameserver users see this prompt:


Adding groups to the system. Groups already existing: spadmin spopr spview

Nameserver users see this prompt:


Verifying groups spadmin spopr spview in NISPLUS Group spadmin is verified in NISPLUS Group spopr is verified in NISPLUS Group spview is verified in NISPLUS All SharePlex groups have been verified
8 You are prompted to enter the Oracle SID.

Enter Oracle SID[ o101v64a ]:

48

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Enter the ORACLE_SID for the instance.


9 The installation script prompts for verification of the Oracle home directory (ORACLE_HOME) for the instance and displays the one recorded in the oratab file.

Enter Oracle home directory or press Enter to use [/oracle/64/product/ 10.1.0.3]: Enter the ORACLE_HOME for the instance or press Enter to accept the default.
10 Next you are prompted for the location of the product directory.

Please specify the product directory location: Enter the absolute path name of the product directory that you specified in step 13 of the UNIX Preinstallation Checklist. If you do not enter an absolute path name, you are warned (Directory must be an absolute path) and given another opportunity to provide the correct path.
11 After you enter the product directory, you are prompted for the SharePlex variable-

data directory location. Please specify the variable data directory location: Enter the absolute path name of the variable-data directory that you specified in step 14 of the UNIX Preinstallation Checklist. If you do not enter an absolute path name, you are warned (Directory must be an absolute path) and given another opportunity to provide the correct path.
12 Before the installation script installs the SharePlex files it asks if you have a valid

license key. Do you have a valid SharePlex for Oracle license key for version 5.3.0 [y/n] To enter your license key, review the following options and take the appropriate action at the prompt. If you have a license key select Option 1. If you need to obtain a license key select Option 2. Option 1 Use this option if you do not have a license key for this machine. Type n and then press Enter. The license utility exits without writing any files to the hard drive and you are returned to the command line. To obtain a license key, contact Quest Software. You cannot complete the installation without entering a license key.

CHAPTER 1 UNIX Installation and Setup

49

When you receive your license key you may rerun the installation. Option 2
A If you have a license key, type y, and then press Enter. You are prompted for the

key. Enter license key = Type the key exactly as it was given to you, including spaces and observing case sensitivity, and then press Enter.
B You are prompted for the customer name.

Enter customer name = Type the customer name exactly, observing case sensitivity, and then press Enter.
C The installer verifies the key and customer name, indicates whether it is a perma-

nent or temporary license, and the expiration date. It then installs the SharePlex files and prompts you for additional machines to license. Product Name : SharePlex for Oracle Key Type : "Permanent Key" Status : [Expiration date] Please Wait. . . . . Gathering installation information & modules from the directory . Please wait . . . . . Installing the SharePlex Files =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Please wait while completing the post-installation procedures

SharePlex License Utility Installing SharePlex for Oracle License Key: License Key = [license key number] Customer Name = [customer name] The SharePlex for Oracle license, "Permanent Key" has been successfully added for host xxxx. It will expire after Midnight of [date] You can upgrade the license key at any time by executing splex_add_key utility. Would you like to upgrade this license or to add licenses for additional hosts [y/n]
D Respond to the prompt for additional machines in one of the following ways:

50

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Enter n if there are no additional machines in a cluster. The installation finishes, and SharePlex is fully installed. You may skip to the instructions beginning at step 20. Installation Complete... Enter y if there are additional machines in a cluster and continue with the instructions below.
13 The SharePlex License Utility reappears.

SharePlex License Utility 1) Read license key from file 2) Enter License key manually 3) Add license key for alternate host q) Quit License Utility Enter option:
14 Select option 3 from the SharePlex License Utility menu. You will be prompted for

the hostID for this next machine. Enter hostID returned by Quest/splex_uname program: Enter the hostID and press Enter.
15 The Splex License Utility will appear and prompt you to select an option:

SharePlex License Utility Adding license for machine ID : [hostID] 1) Read license key from file 2) Enter license key manually q) Quit License Utility Enter option: Select option 2 and press Enter.
16 You are prompted for the key.

Enter Key: Type the key exactly as it was given to you, including spaces and observing case sensitivity, and then press Enter.
17 You are prompted for the customer name.

Enter customer name = Type the customer name exactly, observing case sensitivity, and then press Enter.

CHAPTER 1 UNIX Installation and Setup

51

18 They system will confirm that they key was successfully added with the following

information: The SharePlex license has been successfully added for host [hostID]. SharePlex License Utility 1) 2) 3) q) Read license key from file Enter license key manually Add license key for alternate host Quit License Utility

Enter option: Select option 2 and press Enter to add another key. Repeat this process begining at step 13 until you have completed entering licenses for all machines. Or... Select option q and press Enter to finish the installation.
19 The system will confirm the completion of the installation process with the

following and return you to the command line prompt: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Installation Complete...
Tip: To view license keys and their expiration dates (if any), change directories to the SharePlex install sub-directory of the SharePlex product directory, and run the splex_get_key utility:

# cd /productdir/install # ./splex_get_key t
20 Unmount the CD-ROM in one of the following ways:

If the CD was mounted locally, use the following command:


# umount /cdrom Or...

If the CD was mounted remotely, use one of the following command sets:
If both systems are running HP-UX: On the remote system: # pfs_umount /remote_mountpoint

52

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

On the local system: # pfs_exportfs -u /local_mountpoint # pfs_umount /local_mountpoint If the local system is not running HP-UX: On the remote system: # umount /remote_mountpoint On the local system: # exportfs -u /local_mountpoint # umount /local_mountpoint
21 Change directories to /var/adm and issue the ls -a command. The hidden .splex

directory in the list contains the SharePlex marker file, which points SharePlex to its default environment. Change the owner of this directory to SPLEX and change the group to spadmin.
Tip: You can change the ownership of SharePlex to run as non-root. See Running SharePlex as a non-root user on UNIX systems in the SharePlex Administrators Guide. 22 If you downloaded patches for this version of SharePlex, apply them now. 23 If you are installing on a system cluster, follow the additional the directions in Post-

installation procedures for UNIX cluster environments on page 53. After that, assign SharePlex users (see page 58) and create an Oracle user and schema for SharePlex (see page 61).

CHAPTER 1 UNIX Installation and Setup

53

Post-installation procedures for UNIX cluster environments


These steps assume that you installed SharePlex using a shared disk that contains the product and variable-data directories (see preinstallation checklist step 12) and that you installed licenses using the cluster option in the license utility. A UNIX cluster installation requires the following additional steps.
Important! Do not start SharePlex until instructed to do so in these steps.

Configuring SharePlex within the cluster solution


If possible, configure SharePlex and Oracle into a single global cluster package. The combination of SharePlex and Oracle in the same package allows the cluster software to start and stop SharePlex and Oracle in the proper sequence if any component of the package fails. Configure Oracle to start before SharePlex.

Creating symbolic links to the /var/adm/.splex directory


The following instructions help you create links from each cluster node to a central /var/adm/.splex directory, which contains the library files necessary for SharePlex to run on each node
1 On each node in the cluster, use the following syntax to create a directory named /var/adm/.splex and then symbolically link this directory to the shared disk where

you installed the SharePlex binaries and directories.


Syntax:

# ln -s /shared_drive/.splex /var/adm/.splex
2 On each node, change the owner of the /var/adm directory to SPLEX and change the group to spadmin. Syntax:

# chown -R SPLEX /var/adm/.splex # chgrp -R current_group spadmin

54

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

IP addressing
Host names and IP addresses are part of the SharePlex queue structures and cannot be changed after replication commences. A logical host name, referred to in this documentation as the global cluster package name, must be established and then mapped to the floating IP address before activating a configuration file. To map the global cluster package name to the floating IP address, create an alias in the
/etc/hosts file on all nodes or in a nameserver (DNS, NIS, NISPLUS). The alias cannot

contain non-alphanumeric characters, such as underscores ( _ ) or dots (.). Example /etc/hosts file 1.0.1.1.6 1.0.1.1.7 localsys #permanent IP address hacluster #floating IP address

To verify the resolution of the machine name, issue the UNIX ping command for both the machine alias and the IP addresses. If ping does not resolve the machine name, contact your UNIX systems administrator.

Setting environment parameters


Use the following steps to set the SharePlex SP_SYS_HOST_NAME and SP_SYS_VARDIR parameters as shell variables in the .profile file for the SharePlex user on all nodes in the cluster. Setting the parameters as shell variables ensures that they are exported properly during failover when the cluster solution starts SharePlex. Do not set these parameters on source or target systems outside the cluster.
1 Open the .profile file for the SharePlex user. 2 Create an entry that sets the SP_SYS_HOST_NAME variable to the global cluster

package name that is mapped to the floating IP address. The global cluster package name is the alias that you created in the /etc/hosts file. SP_SYS_HOST_NAME instructs SharePlex to use the alias when any of its processes issues a name lookup (gethostname), superseding the local system name. It ensures that sp_ctrl commands are directed to the correct host, in this case the global cluster package name, and it enables SharePlex to migrate properly during failover.
ksh shell:

export SP_SYS_HOST_NAME=hacluster

CHAPTER 1 UNIX Installation and Setup

55

csh shell:

setenv SP_SYS_HOST_NAME hacluster


3 Set the SP_SYS_VARDIR variable to the full path name of the SharePlex variable-

data directory. This ensures that the SharePlex processes on the adoptive node connect to the current replication environment after failover.
ksh shell:

export SP_SYS_VARDIR=/ha/shareplex/vardir
csh shell:

setenv SP_SYS_VARDIR /ha/shareplex/vardir


4 Save and close the .profile file. 5 Log out, then log back in for the variables to take effect.

Important! The global cluster package name must be used in place of the node names in routing maps in the configuration file.

Setting sp_ctrl parameters


Set the following parameters using the directions that follow these descriptions.

SP_SYS_HOST_NAME Setting this parameter is a preventive measure that generates a warning in the event that a user who exports an incorrect variable logs into sp_ctrl to issue a command for the replication environment on the cluster. The host name set through sp_ctrl (which records it in the SharePlex paramdb file) is assumed to be the correct one. The warning provides the opportunity to correct whichever one is wrong. Set this parameter only on the cluster node to which the shared disk containing the variable-data directory is mounted.

SP_QUE_SYNC This parameter is optional. It protects data from certain system


failures that cause data corruption by writing data to disk as it is received, instead of using UNIX buffering. Using this parameter can slow replication speed, especially posting, so you should test it if you replicate large volumes of data. (Note: This parameter is not a substitute for UPS or any other high-availability fault tolerance system.) If you use this parameter, set it on the cluster node to which the shared disk containing the variable-data directory is mounted, and also set it on source and target systems outside the cluster that are part of this replication environ-

56

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

ment. For more information about this parameter, see the SharePlex Reference Manual.

To set the parameters


1 Change directories to the bin sub-directory of the SharePlex product directory, then start sp_cop.

$ cd /productdir/bin $ ./sp_cop &


2 Run sp_ctrl from the same directory.

$ ./sp_ctrl
3 Set the SP_SYS_HOST_NAME and (optionally) SP_QUE_SYNC parameters by issuing separate set param commands as follows.

sp_ctrl> set param SP_SYS_HOST_NAME global_cluster_package_name sp_ctrl> set param SP_QUE_SYNC 1


4 Shut down SharePlex using the following command in sp_ctrl. The command also shuts down sp_ctrl. The parameter changes take effect when sp_cop is restarted.

sp_ctrl> shutdown

Verifying licensing
Use one of the following methods to verify that all license keys for the clustered nodes were entered correctly into the shared variable-data directory. There should be an entry in the paramdb file for each cluster node.

To view licenses through sp_ctrl


1 On the cluster node that is currently mounted to the shared variable-data directory, change directories to the bin sub-directory in the SharePlex product directory, then start sp_cop.

$ cd /productdir/bin $ ./sp_cop &


2 Run sp_ctrl from the same directory.

$ ./sp_ctrl

CHAPTER 1 UNIX Installation and Setup

57

3 In sp_ctrl, issue the following command.

sp_ctrl(sysA)> list param system


4

The display lists all of the system parameters, including one license for each node in the cluster as shown in the following example. SP_SYS_HOST_NAME hacluster SP_SYS_LIC_000Z123Z4C56 "123Z456Z7Z89 z1Zzzzz2Z34zZ 1 z2z1447z" SP_SYS_LIC_ZZZQAZ000 "000Z000Z0Z00 z0Zzzzz0Z0zZ 0 z0z0000z"

5 If there is not a license for each node in the cluster, run the splex_add_key utility from the bin sub-directory, which should still be your current working directory. Use

the cluster option in the utility to add the missing keys. Directions for entering the license are in the installation instructions beginning with step 12 on page 48.

To view licenses by opening the paramdb file


1 Change directories to the data sub-directory of the variable-data directory. 2 Open the paramdb file and look for all entries beginning with SP_SYS_LIC_. 3 If there is not a license for each node in the cluster, change directories to the bin subdirectory of the product directory and run the splex_add_key utility. Use the cluster

option in the utility to add the missing keys. Directions for entering the license are in the installation instructions beginning with step 12 on page 48.

Proceed to Assigning SharePlex users and authorization levels on page 58.

58

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Assigning SharePlex users and authorization levels


To monitor, control, or change SharePlex replication, a person must be designated as a SharePlex user on the systems where he or she will be issuing commands. When designating users, you designate their authorization levels. The authorization level defines which SharePlex commands a user can issue. To designate SharePlex users and assign their command authorization levels, follow the instructions in this topic to add their names to one of the following SharePlex groups in the /etc/group file on the replication system(s) they will be accessing.

spadmin spopr spview

Creating the SharePlex groups on a non-clustered system


On each non-clustered system where you install SharePlex, the SharePlex groups are created automatically in the /etc/group file by the installation script. You can proceed to Assigning users to SharePlex groups to assign users to those groups.

Creating the SharePlex groups within a cluster


In a cluster, the SharePlex groups are added during installation only to the primary node (the node to which the shared disk containing the SharePlex directories was mounted during installation). The groups are not created automatically on the other cluster nodes, but they must exist on those nodes so that they are available when SharePlex fails over to those nodes. To create the groups on the other nodes, use the following syntax. # groupadd spadmin # groupadd spopr # groupadd spview

Assigning users to SharePlex groups


Each SharePlex command is assigned one of three authorization levels that corresponds to one of the SharePlex groups. Each authorization level has different privileges. To

CHAPTER 1 UNIX Installation and Setup

59

execute a command, a SharePlex user must have that commands authorization level or higher. When you installed SharePlex, one user was designated as a SharePlex Administrator and was added to the spadmin group. To grant other users access to SharePlex, use the following table to determine their authorization levels.

User Authorization Levels and Roles


AUTH LEVEL USER TYPE USER GROUP USER ROLES

Administrator

spadmin

Can issue all SharePlex commands. Commands that can only be issued by a SharePlex Administrator are:

startup, shutdown all configuration commands relating to


an active configuration

all parameter commands except list


2 3 Operator Viewer
spopr spview param start capture stop capture abort capture truncate log

Can issue all SharePlex commands except those listed above. Can view lists, status screens, and logs to monitor replication only.

To assign user authorization levels


Note to Nameserver users: This procedure is performed through the nameserver, so access to the /etc/group file is not necessary unless you want SharePlex entries on the local system. 1 Open the /etc/group file. 2 Add the UNIX user name of each SharePlex user to the appropriate group: spadmin, spopr, or spview. You can assign a list of user names to each group, making sure the

names are separated by commas (see the example below). If the password field is null, no password is associated with the group. In the example, the asterisk (*)

60

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

represents the password, and 102 represents the numerical group ID. The group ID must be unique. spadmin:*:102:spadmin,root,jim,jane,joyce,jerry

Put user names for SharePlex Administrators in the spadmin group. You need at
least one user with Administrator rights on each source and target system.

Put user names for SharePlex operators in the spopr group. Put user names for SharePlex viewers in the spview group. To include the root user as a SharePlex user, add it to the desired group. Although
SharePlex installs and runs as root, the root user is not added to the SharePlex user groups by default.
3 Save the /etc/group file. 4 Repeat these steps for each source and target system, including all nodes in a

cluster.
Tip: After logging onto UNIX, any user can verify his or her authorization level from the sp_ctrl interface by issuing the authlevel command. 5 Proceed to Establishing SharePlex as an Oracle user on page 61.

CHAPTER 1 UNIX Installation and Setup

61

Establishing SharePlex as an Oracle user


The ora_setup program establishes SharePlex as an Oracle user. Whether or not to run ora_setup at this time depends on whether this is a source or target system and on how you intend to synchronize the data.

If this is a source system, run ora_setup now. You cannot commence replication
until ora_setup has been run for the source instance to establish SharePlex as an Oracle user.

If this is a target system, choose one of the following options, depending on your
replication strategy, unless you have been instructed otherwise by a documented SharePlex procedure, a Quest Technical Support representative, or a Quest Systems Consultant.
A If the target instance exists, and you will be using transportable tablespaces or a

cold-copy method to synchronize the data (export/import, store/restore from tape, FTP), run ora_setup now.
B If you will be using an Oracle hot backup or DBCopy to synchronize the data, run ora_setup after the backup has been applied and the database has been

recovered and opened, following the instructions in the synchronization procedure. Running ora_setup on an existing target instance, such as a hot standby, before the backup and recovery does no harm, but you will need to re-run ora_setup again after the backup. Synchronization options are explained in Chapter 6 of the SharePlex Administrators Guide. The ora_setup program (Oracle Setup) establishes a master Oracle account with full DBA privileges and creates SharePlex internal tables and indices in the SharePlex schema. The SharePlex account will be used by all of the SharePlex for Oracle processes when replication is active.

Requirements for ora_setup


For non-clustered systems, run ora_setup for each Oracle instance involved in replication on all source and target systems.

Within a cluster, run ora_setup on the primary node (the one to which the shared
disk containing the SharePlex directories is mounted) so that the SharePlex user and password are registered in the SharePlex paramdb file.

For centralized reporting (consolidated replication) using separate variable-data


directories, run ora_setup for each variable-data directory. Create a different Oracle user for each one.

62

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

To run ora_setup, the Oracle software must have a set-user-id similar to the following, which is the default configuration after Oracle is installed. -rwsr-s--x 1 oracle dba 31829136 Mar 25 2003 oracle That set-user-id value sets the permissions to allow non-Oracle users, including ora_setup, to log into SQL*Plus.

To verify that Oracle is set up properly, type the following at the prompt:
cd $ORACLE_HOME/bin ls -l oracle

Do not alter the SharePlex database objects. If you have questions or concerns about
these objects, contact Quest Technical Support at (949) 754-8000.

To run ora_setup
Default options are shown in brackets [ ]. To choose the default, press Enter.
1 Open the Oracle instance (if it is not already open). 2 Log onto UNIX as a non-root user with DBA privileges. 3 View the oratab file, and make certain that the values for ORACLE_SID and

ORACLE_HOME directory paths are valid. HP-UX, HP (DEC/Compaq) Tru-64 and IBM AIX machines: $ cd /etc $ more oratab You will see an entry similar to this: ora8:/oracle/ora8/product In this example, ora8 is the ORACLE_SID and /oracle/ora8/product is the ORACLE_HOME directory. Sun Solaris machines: On the Solaris platform, the oratab file typically is located in the var/ opt/oracle directory, but sometimes there is an oratab file in the /etc directory as well. Rename, relocate or remove any oratab files in the /etc directory.

Warning! Sometimes oratab files have an asterisk (*) symbol instead of an entry for the ORACLE_SID, and that can cause ora_setup to fail. Ensure that the oratab file contains a valid ORACLE_SID.

CHAPTER 1 UNIX Installation and Setup

63

4 Make a note of the ORACLE_SID. You will need it for the setup process. To set the

ORACLE_SID as the default, export it by typing one of the following commands.


ksh shell:

export ORACLE_SID=[OracleSID of this instance]


csh shell:

setenv ORACLE_SID [OracleSID of this instance]


5 (FOR CONFIGURATIONS USING MULTIPLE VARIABLE-DATA DIRECTORIES) Export the environment

variable that points to the variable-data directory for the SharePlex instance for which you are running ora_setup.
ksh shell:

export SP_SYS_VARDIR=/full pathname of variable-data directory


csh shell:

setenv SP_SYS_VARDIR /full pathname of variable-data directory


6 Change directories to the bin sub-directory of the SharePlex product directory.

$ cd /product_dir/bin
7 If sp_cop is running, run sp_ctrl and shut down sp_cop with the following command. SharePlex cannot be running when you run ora_setup.

$ ./sp_ctrl sp_ctrl> shutdown


8 From the bin sub-directory of the SharePlex product directory, run the ora_setup

program. $ ./ora_setup

64

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

9 When the welcome message appears, enter the ORACLE_SID of the Oracle instance or press Enter to accept the default. The default is the value of the ORACLE_SID

environment variable. Welcome to the Oracle SharePlex setup process. This process creates tables and user accounts needed to run Oracle SharePlex replication. Please note the following: ** In response to prompts, a carriage return will choose the default given in brackets. If there is no default, a reply must be entered. ** To exit the program while the program is waiting for input, use the CTRL-C key sequence. This sequences can be entered by holding down the CONTROL key and pressing the C key. Enter the Oracle SID for which SharePlex should be installed [SID] :
10 Enter the SYSTEM account password when the following prompt appears. The

SYSTEM account password is used to create a SharePlex user. In order to create the SharePlex tables and user account, we must connect to the database as SYSTEM. The SYSTEM account must have SYSDBA privileges. Enter password for the SYSTEM account, which will not echo [MANAGER] :
11 You are prompted to create a SharePlex user.

connecting--This may take a few seconds. validating user name and password. . . This may take a few seconds. SharePlex objects will need to be created under a special account. You can pick an existing user or create a new one. Would you like to create a new SharePlex user ? [y] : y
12 Review the following choices for creating a SharePlex user, then enter the

appropriate response at the prompt.

If this is the first time that ora_setup is being run for this Oracle instance, type y
to create a new SharePlex user, then press Enter. When you create a new Oracle user for SharePlex, the default tablespace for that user is the same tablespace that you will specify for the SharePlex internal tables in step 16. Or...

CHAPTER 1 UNIX Installation and Setup

65

If this is not the first time ora_setup is being run for this Oracle instance, and you
want to keep the existing SharePlex user to maintain the current account, type n then press Enter. Or...

If you are running ora_setup to change the existing SharePlex user name or password, type n to create a new user or type y to use another existing user, then press
Enter. 13 You are prompted to enter a new or existing SharePlex user name. If you enter only

the SharePlex user name, you are prompted for a password, which is not echoed. The default SharePlex user name and password are SPLEX/SPLEX. Enter username for new user [SPLEX/SPLEX] : Enter password for new user : Re-enter password for new user :
14 .If you enter the SharePlex user name and password, the password is echoed.

Enter username/password of existing user: Warning: This user is now being granted unlimited tablespace. This privilege will remain in effect until it is explicitly changed.
Note: You are allowed five attempts to enter a valid password for an existing user. At any point, you can press Enter to return to the Create New User prompt. After five invalid passwords, you are also returned to the Create New User prompt. Enter y to create a new user or n to quit ora_setup. If you quit, SharePlex will not be established as an Oracle user. 15 You are prompted for the tablespace for the SharePlex database objects, and available tablespaces are displayed. If this is not a first-time ora_setup for this

Oracle instance, the previous SharePlex tablespace is displayed as the default. If you expect large amounts of chaining in the tables to be replicated by SharePlex, the tablespace must have at least 512K INITIAL extents, 512K NEXT extents, PCTINCREASE of 20, and MAXEXTENTS of 505. Setup will now install SharePlex objects. These are the existing tablespaces. SYSTEM RBS TEMP TOOLS USERS TEST IMPACT SCHEMA_TABLE Enter the default tablespace for use by SharePlex [TOOLS] :
16 Review the following choices for specifying the SharePlex tablespace, then enter the

appropriate response.

66

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

If this is a first-time ora_setup for this Oracle instance, either press Enter to
accept the default tablespace, or enter the name of an alternate tablespace and then press Enter. Or...

If this is not a first-time ora_setup for this instance and you want to use the current SharePlex tablespace, press Enter to accept the default. Or...

If this is not a first-time ora_setup for this instance and you want to change the
SharePlex tablespace, enter the name of the new tablespace and then press Enter.
Note: If you chose an existing Oracle user as the SharePlex user in steps 12 and 14, and if that users default tablespace is not the one specified for the SharePlex objects in step 16, ora_setup prompts you to retain the users default tablespace or change the default to the one specified for the SharePlex objects. 17 The ora_setup program executes your tablespace selection and prompts for a

temporary tablespace for SharePlex in which SharePlex can perform sorts and other functions. Enter the temporary tablespace for use by SharePlex [default]
18 Review the following choices for specifying the SharePlex temporary tablespace,

then enter the appropriate response at the prompt.

If this is a first-time ora_setup for this Oracle instance, either press Enter to
accept the default or enter the name of an alternate temporary tablespace. Or...

If this is not a first-time ora_setup for this instance and you want to keep the current SharePlex temporary tablespace, press Enter to accept the default. Or...

If this is not a first-time ora_setup for this instance and you want to change the
SharePlex temporary tablespace, enter the name of the new tablespace and then press Enter.
19 The ora_setup program executes your tablespace selection and prompts for an index

tablespace for the SharePlex indices. Enter the index tablespace for use by SharePlex [default]

CHAPTER 1 UNIX Installation and Setup

67

20 Review the following choices for specifying the SharePlex index tablespace, then

enter the appropriate response at the prompt.

If this is a first-time ora_setup for this Oracle instance, either press Enter to
accept the default or enter the name of an alternate tablespace. Or...

If this is not a first-time ora_setup for this instance and you want to keep the current SharePlex index tablespace, press Enter to accept the default. Or...

If this is not a first-time ora_setup for this instance and you want to change the
SharePlex index tablespace, enter the name of the new tablespace and then press Enter.
21 You are prompted to enter the tablespace names for the three SharePlex index

rowidmaps. Enter the name of the index tablespace for each SP_ROWIDMAP when prompted. Enter the tablespace for the SharePlex index SHAREPLEX_ROWIDMAP_I1 [TOOLS] : Enter the tablespace for the SharePlex index SHAREPLEX_ROWIDMAP_I2 [TOOLS] : Enter the tablespace for the SharePlex index SHAREPLEX_ROWIDMAP_I3 [TOOLS] : Creating SharePlex objects . . . The ora_setup program executes your tablespace selection and completes the Oracle setup process.
22 [IF CHANGING THE SHAREPLEX USER AND REPLICATION IS ACTIVE] Copy the SharePlex objects

from the existing SharePlex users schema to the new SharePlex users schema to preserve the current replication environment.
23 Issue one of the following grants to the SharePlex user so that SharePlex can access

the data dictionary if O7_DICTIONARY_ACCESSIBILITY is set to FALSE*. Oracle 9i or 10g: grant select any dictionary to splex;

68

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Oracle 8i: grant select on '||table_name||' to splex; (*SharePlex requires access to the dictionary tables outside of the standard DBA roles.)
24 [IF REPLICATING 9I DDL OR WHEN SETTING SP_OCT_REPLICATE_DDL_ALL=1] To enable

replication of DDL supported for Oracle 9i, issue the following grants to the SharePlex Oracle user. grant select any table to splex with admin option; grant create any view to splex with admin option;
25 Ora_setup will attempt to run the lmt_setup.sh script from the bin sub-directory of the SharePlex product directory automatically. If ora_setup is unable to do so, you must manually run the lmt_setup.sh script. This script creates the

SYS.SHAREPLEX_KTFBUE view exposing SYS.X$KTFBUE and grants select privilege on this view to the SharePlex Oracle user. You are prompted for the following:

The database ORACLE_SID and ORACLE_HOME. An Oracle user with SYSDBA role and that users password. The SharePlex Oracle user that you created during ora_setup.
The script runs SQL*Plus and executes the following commands to grant the privilege: SQL> create or replace view sys.shareplex_ktfbue as select * from sys.x$ktfbue; SQL> grant select on sys.shareplex_ktfbue to splex;
26 Review the following choices and do whichever is appropriate for your replication

strategy:

For high availability and peer-to-peer replication, run the SharePlex


sp_add_trigger.sql script from the util sub-directory of the SharePlex product directory to direct triggers to ignore the SharePlex user.

Or...

If this is a target reporting database, you can either disable triggers on target
objects or run the sp_add_trigger.sql script to direct triggers to ignore the SharePlex user. You are finished with the installation process.

CHAPTER 1 UNIX Installation and Setup

69

Important!

Before you configure SharePlex for replication, run the demonstrations in this manual to confirm that your installation was successful and that you are familiar with the software.

Before you activate a configuration for production, read the following chapters in the
SharePlex Administrators Guide for additional instructions for planning and configuring replication. Chapter 1: How SharePlex Works Chapter 2: Running the SharePlex Programs Chapter 3: Planning SharePlex Replication Chapter 4: Preparing for SharePlex Replication Chapter 5: SharePlex Optional Setup Chapter 6: Starting SharePlex Replication Refer to the SharePlex Reference Manual for information about:

Controlling and monitoring replication. Tuning replication with SharePlex parameters. Preventing and solving replication problems.

70

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

2
`Windows Installation and Setup
This chapter contains instructions for installing SharePlex for Oracle on a Windows system. Contents Windows installation overview Windows Preinstallation Checklist Pre-installation instructions for Windows cluster environments Running the installation program Adding the license key Establishing SharePlex as an Oracle user Installing the SharePlex service Changing Global Settings in the MKS Toolkit Post-installation procedures for Windows cluster environments Assigning SharePlex users and authorization levels

72

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Windows installation overview


Important! Read this entire chapter before you install SharePlex so that your installation is successful.

1 Complete the Windows Preinstallation Checklist on page 73. 2 If you are installing SharePlex on a cluster, follow the pre-installation instructions on

page 85.
3 Install the SharePlex software on each system using the instructions starting on

page 87. If this is a first-time SharePlex installation, you will be prompted to restart the system.
4 If you are installing SharePlex on a cluster, follow the post-installation instructions

on page 110.
5 Assign SharePlex users and authorization levels on each system after installation

using the instructions starting on page 116.


Important information about upgrades: Before you install an upgrade of SharePlex, refer to the Release Notes for the version you are installing. Requirements can vary from one version of SharePlex to another, and you could be asked to take additional actions beyond what is documented in this manual. Instructions for upgrading SharePlex are located in the Release Notes.

CHAPTER 2 `Windows Installation and Setup

73

Windows Preinstallation Checklist


Before you install the SharePlex software, make the following pre-installation decisions and complete this checklist. After installation, consult the SharePlex Administrators Guide for additional instructions for planning and configuring replication.

CHECKLIST FOR SHAREPLEX VERSIONS


1 After you install SharePlex, but before you run ora_setup, install all current patches

for your version of SharePlex. It is possible that one or more patches were created after the software was released. To find out if there are patches for your version of SharePlex and for instructions for downloading and applying them, log onto www.quest.com/support and click Download Software from the Quest SupportLink home page. If you do not have a login name and password, contact Quest Technical Support at 949-754-8000 or 800-306-9329. Do you have current patches? ______________________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES


2 If you are installing SharePlex on a test machine on which Oracle has been installed

and uninstalled many times, the Registry entries for Oracle could be corrupted. Before you install SharePlex on a test machine, uninstall all Oracle software and delete all Oracle Registry entries to delete all references to Oracle, if possible. Afterward, re-install Oracle using the Oracle installer program, which creates Registry entries correctly. SharePlex relies on accurate Registry entries for the ORACLE_HOME, ORACLE_SID, redo and archive log locations and other information necessary for replication. Is there a clean Oracle installation?___________________

74

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


3 In order for SharePlex security features to be utilized, partition the drives that contain

replication components as NTFS. SharePlex user groups cannot function as designed on a FAT partition, since it lacks the file security features of the NTFS format. On FAT partitions, you cannot control access to, and use of, the SharePlex processes and the sp_ctrl user interface. Any user who logs onto a FAT partition, regardless of his or her SharePlex user authorization level, will have spadmin permissions with full capability to stop, start and abort SharePlex replication processes, except for remote logins, which retain the SharePlex group assignments. To employ the security provided by the SharePlex user groups if FAT partitions must be used, prevent local access to the FAT partitions by all users except spadmin, and allow only remote login for spopr and spview groups. Additional information about the SharePlex user groups is on page 116. Have security issues with FAT partitions been addressed?___________________
4 SharePlex needs an additional 200 MB of page file size if more than 80% of the cur-

rent total page file size is being used. Greater page size provides faster processing speed when SharePlex is handling large transactions in the queues. Is there adequate page size?____________
5 SharePlex on the Windows platform uses the NuTCRACKER operating environ-

ment from Mortice Kern Systems (MKS), which enables SharePlex to be ported to the UNIX and Windows platforms in a uniform manner. The NuTCRACKER files are installed by the MKS Platform Components installation program. One Registry entry is created under the manufacturers name, Mortice Kern Systems, and another is created under the name Data Focus. The default folder for NuTCRACKER is C:\NuTCROOT, but if you select a different folder, ensure that it is secured so that it cannot accidentally be moved or removed. The NuTCracker files must not be moved after they are installed.
Important! For first-time NuTCRACKER installations, you will be prompted to

restart the system. What is the NuTCRACKER directory? _________________________________

CHAPTER 2 `Windows Installation and Setup

75

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


6 SharePlex uses the default port number of 2100 (for which the hex equivalent is 834).

You can specify a different port number during installation, but make certain to use the same port number for the associated instances of SharePlex on all other machines involved in replication. Please review the following information before determining the SharePlex port number.

In Oracle 9.2.x, port 2100 is used by an Oracle XML daemon. so it cannot be used
by SharePlex. Use the instructions in Chapter 5 of the SharePlex Administrators Guide to specify an alternative port number for SharePlex after you install the SharePlex software.

If you are using a firewall, a UDP port must be open for SharePlex, in addition to
the TCP/IP port.

If you are using SSH software, you can configure SharePlex to work with it
through a secure port to one target system. Using SSH for a SharePlex instance is incompatible with using the Replication Monitor graphical user interface. For instructions for establishing SSH compatibility for SharePlex, see Chapter 5 of the SharePlex Administrators Guide.

SharePlex permits a maximum of 64 port numbers (SharePlex instances) on one


system. What is the SharePlex port number? _______________________________
Note: Should you ever need to change the SharePlex port number, see Chapter 5 of the SharePlex Administrators Guide.

76

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


7 In some situations, machine names cannot be resolved between UNIX and Windows

systems. The workaround is to add the IP addresses and names of all UNIX and Windows servers in the replication network to the following files, which contain mappings of IP addresses to host names.

The /etc/hosts file on all UNIX machines The hosts file on all Windows machines. The file normally is in
C:\WINNT\System32\Drivers\etc).

Put each entry on an individual line. Type the machines IP address first, then tab or space over at least once and add the corresponding host name, then tab again to add the alias. Comments can be used after the host name if they are preceded by the pound (#) symbol. 102.54.94.97 38.25.63.10 sysA.company.com sysA sysB.company.com sysB # source system # target system

SharePlex supports host names that contain letters or numbers only. For host names that contain a dot or other non-alphanumeric character (such as . or _), create an alias in the /etc/hosts or hosts file that contains only alphanumeric characters. Also create the alias on the NIS server and the DNS server, if used. Are all machine names listed correctly in the host files?______________________
8 The installation creates a SharePlex product directory on the local system. This direc-

tory contains the SharePlex binaries and default parameter settings. Within a cluster, you will install the SharePlex product directory on each node so that binaries are available, Registry entries are created, and the NuTCRACKER operating environment is established in readiness for failover. As a normal precaution, install the product directory on a separate internal hard drive than the production database, or on a different partition. If you do not specify a directory during installation, the default installation directory that is used is C:\Program Files\Quest Software\SharePlex. What is the path of the SharePlex product directory? _________________________

CHAPTER 2 `Windows Installation and Setup

77

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


9 The installation creates a SharePlex variable-data directory. This directory contains several sub-directories, including one named rim, which is where the SharePlex

queue files reside. SharePlex temporarily stores replicated data in these queue files until it can send it to the next replication process. When choosing a location for this directory, use the following guidelines:

[NON-CLUSTERED SYSTEMS] Because the queue files can grow considerably, install the
variable-data directory on a separate internal hard drive than the one containing the production database, or on a different partition. Installing on a separate drive or partition prevents the queues from interfering with the performance of the production Oracle instance.

[CLUSTERS] Before installing on a cluster, create a disk that can be mounted and
accessed by all nodes of the cluster. You will install the variable-data directory on that disk when you install SharePlex on the primary cluster node. During failover, the adoptive node mounts the shared disk so that the variable-data directory remains accessible and replication continues. Do not use the same disk as the one used for the Oracle files or data. To determine space requirements for the variable-data directory, see checklist step 10. What is the name of the SharePlex variable-data directory? __________________________________________________________

78

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)


10 Because the SharePlex data queues grow dynamically as data is passed from one pro-

cess to another, it is important to size the disk containing the variable-data directory correctly to avoid running out of space. To determine the amount of disk space that you will need, use the following guidelines.
1 Estimate the longest time that you can tolerate replication to be down. 2 Determine how much data would be replicated in that time, using the following

formula as a guide. This formula multiplies the redo log value by 1/3 because only about 1/3 of the redo log is data that is replicated. The rest is used by Oracle for maintenance and operation of the instance itself. [size of a redo log] x [number of log switches in 1 hour] x 1/3 x [number of hours downtime] = amount of disk space needed for the queues on each system For example, if you expect to recover from 8 hours of downtime, and your redo logs are 60 MB in size and switch five times an hour, then you could need 800 MB of space on both source and target machines for the SharePlex queues: [60 MB redo log] x [5 switches/hour] x [1/3] x [8 hours] = 800 MB disk space. How much space do you need for the variable-data directory? __________________
11 [CLUSTERS ONLY] If you are installing on a system cluster, follow the steps in Pre-instal-

lation instructions for Windows cluster environments on page 85 before you install SharePlex. After installation, follow the steps in Post-installation procedures for Windows cluster environments on page 110.

CHECKLIST FOR ORACLE ISSUES


12 The Oracle 8.1.7 client must be installed prior to installing SharePlex regardless of

which Oracle version you are using. The Oracle 8.1.7 client can interface to all previous versions of Oracle. If you are running an Oracle 8.1.7 database, the client is already installed and no further action is needed. You can download the 8.1.7 upgrade from the Oracle web site. Is the 8.1.7 client installed?_____________

CHAPTER 2 `Windows Installation and Setup

79

CHECKLIST FOR ORACLE ISSUES (continued)


13 If you are upgrading your Oracle database: If you plan to upgrade your database,

perform the Oracle upgrade before you install SharePlex. At the end of the SharePlex installation process, you will run a program named OraSetup, which establishes an Oracle account for SharePlex, installs some database objects, and runs an analysis that establishes object definitions. Installing the database upgrade before you run OraSetup ensures that SharePlex has the correct object definitions. Have all Oracle upgrades been performed?______________________________
14 The Oracle instance must exist before you run OraSetup, although it does not have to be populated. SharePlex does not create or populate the database. Exception: If you

will be using an Oracle hot backup to synchronize the data, it creates the target instance and database files. Procedures for this are in the SharePlex Administrators Guide. Have all Oracle instances been created? _____________

80

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR ORACLE ISSUES (continued)


15 SharePlex requires a master Oracle account (schema and user) that will be used by all

SharePlex processes to interface with Oracle. The account is created during the OraSetup portion of the installation. To perform replication, SharePlex must have a DBA role and unlimited privileges, tablespace privileges, and read privileges to the redo logs. This privilege remains in effect unless it is explicitly changed. The default user is [SPLEX/SPLEX].
Important: The SharePlex user is created with the default Oracle profile under the assumption that the profile has the unlimited resource privileges originally assigned by Oracle. View the profiles in your database to verify that the default is unlimited. If the default has been changed, assign SharePlex a DBA profile with unlimited privileges for all definitions.

The following grants are required for the SharePlex user, where splex in the syntax is the name of your SharePlex user.

To replicate DDL supported for Oracle 9i (e.g., when setting


SP_OCT_REPLICATE_DDL_ALL=1) the SharePlex Oracle user requires the following grants: grant select any table to splex with admin option; grant create any view to splex with admin option;

For Oracle 8i, the SharePlex Oracle user requires the following grant to access the
data dictionary if O7_DICTIONARY_ACCESSIBILITY is set to FALSE.* grant select catalog role to splex;

For Oracle 9i or 10g, the SharePlex Oracle user requires the following grant to
access the data dictionary if O7_DICTIONARY_ACCESSIBILITY is set to FALSE.* grant select any dictionary to splex; *(SharePlex requires access to the dictionary tables outside of the standard DBA roles.) What will be the name of the SharePlex Oracle user? ______________________

CHAPTER 2 `Windows Installation and Setup

81

CHECKLIST FOR ORACLE ISSUES (continued)


16 You will be prompted during installation for the ORACLE_SID for the instance for

which you are implementing replication. SharePlex uses the ORACLE_SID to locate the objects to be replicated. The ORACLE_SID is an entry in the Windows Registry.
Important!

SharePlex must link to the binaries of the lower minor/patch release of Oracle if more than one Oracle minor/patch release is installed on the same server. Please insure that the PATH is set correctly, with the desired ORACLE_HOME appearing first in the PATH env variable. What is your ORACLE_SID? _____________
17 The minimum number of Oracle PROCESSES and SESSIONS for Multi-Threaded

Post is the setting for the SP_OPO_THREADS_MAX parameter, plus one for the global connection. The default setting (and the max setting) for this parameter is 64.
18 The LOG_PARALLELISM parameter in the init.ora file is not supported when it is set to a value greater than 1. If the LOG_PARALLELISM parameter is set to a value greater than 1, SharePlex cannot parse the redo logs correctly and thus transactions

hang in the capture queue. To prevent this problem, check the value for the LOG_PARALLELISM parameter in the init.ora file before installing SharePlex. If it is greater than 1, reset the value to 1, and restart the Oracle instance for the new value to take effect. What is the value for the LOG_PARALLELISM parameter? ___________________

82

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR ORACLE ISSUES (continued)


19 SharePlex requires a tablespace for its internal tables in each database involved in

replication. With the exception of the SHAREPLEX_ROWIDMAP and SHAREPLEX_LOBMAP tables, the SharePlex tables use the tablespaces default storage settings. If the tables to be replicated have extensive chaining or LOB columns, take the following into account when sizing the tablespace. Row chaining considerations The size of the SHAREPLEX_ROWIDMAP table increases with the amount of row chaining. For initial installations of SharePlex (installing clean, not as an upgrade*), this table and its indices each have a 5 MB INITIAL extent, 5 MB NEXT extent, and PCTINCREASE of 0. The MAXEXTENTS is unlimited, allowing the table to grow as much as necessary. If you expect a large amount of chaining, you can estimate how big the SHAREPLEX_ROWIDMAP table will be with the following formula: (2.5) x (number of chained rows) x (57 bytes) divided by 1024 = number of kilobytes If the database is using the cost-based optimizer (CBO), incorporate the SHAREPLEX_ROWIDMAP table into the analysis schedule. LOB considerations The SHAREPLEX_LOBMAP table is created with a 1 MB INITIAL extent, 1 MB NEXT extent, and PCTINCREASE of 10. The MAXEXTENTS of this table is 120, allowing it to grow to 120 MB. There is one entry in the table for each LOB in the replicating tables. Each entry can be up to 27 bytes. The default storage usually accommodates this table, permitting more than 4 million LOB entries. If you expect more than that, size the SharePlex tablespace accordingly, taking into account that this table shares the tablespace with the SHAREPLEX_ROWIDMAP and the other SharePlex tables. The SHAREPLEX_LOBMAP table does not contain entries for LOBs stored in-row. If the database is using the cost-based optimizer (CBO) and the replicating tables include numerous LOBs, incorporate the SHAREPLEX_LOBMAP table into the analysis schedule.
* For upgrades in which a SharePlex account already exists, the storage parameters of the internal tables will not be changed.

(Continued on next page.)

CHAPTER 2 `Windows Installation and Setup

83

CHECKLIST FOR ORACLE ISSUES (continued) What is the name of the SharePlex tablespace? _____________________________
Note: For a list of the SharePlex internal tables and their default storage values, see

SharePlex Tables on page 167.


20 SharePlex requires a temporary tablespace where it can perform sorts and other operations. This tablespace will mainly be used for sorts when the compare commands

are used to compare source and target tables to verify synchronization. Compares performed on large tables require large sorting operations, especially if there are no primary or unique keys. For more information about the compare commands, see the SharePlex Reference Manual. If you expect to be using these commands, take into account sorting requirements when sizing the SharePlex temporary tablespace or choosing an existing temporary tablespace for SharePlex. The default tablespace is the tablespace where the SharePlex tables are installed. What is the name of the SharePlex temporary tablespace?______________________
21 SharePlex requires an index tablespace for the indices for its internal tables. The

default for this tablespace is the tablespace for the SharePlex tables, but performance will be enhanced if the SharePlex tables and indices are on separate tablespaces to minimize I/O contention. If you have a previous version of SharePlex, the SharePlex indices were installed in the tablespace where you installed the SharePlex tables. These indices are not moved when you install this version of SharePlex, but it is recommended that you move them to the index tablespace you are defining for this installation. If the existing SharePlex indices are on an index tablespace, you can specify that tablespace for this installation. What is the name of the SharePlex index tablespace?_________________________

84

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

CHECKLIST FOR USER AND LICENSE INFORMATION


22 Assign a user who will own and write to the SharePlex product and variable-data

directories. This user must already exist on the system and must have read privileges to the Oracle redo logs. This user will be listed as a SharePlex Administrator in the SharePlex spadmin group during installation. You will add additional SharePlex Administrators after installation, but only this user will own the SharePlex directories. The default is oracle. Nameserver users: Add this user to the nameserver before installation. Who is the owner of the SharePlex directories?______________________________
23 You will assign SharePlex users and authorization levels at the end of the installation

process. Nameserver users: Add users before installing SharePlex.) Who will use the software? _____________________________________________
24 You will be prompted for a unique license key for each machine where you are

installing SharePlex, including those in a cluster. SharePlex can be installed without a key, but you will not be able to run it. Permanent SharePlex license keys are generated for a specific machine ID, so be sure you know which key was assigned to which machine. Keep a copy of your license keys in a safe place in case you need them in the future. For SharePlex demonstration trials only: A temporary demonstration key is required for each system where you are installing SharePlex. If you did not receive keys, contact your Quest sales representative to get them. Do you have keys for all machines? _________________

CHAPTER 2 `Windows Installation and Setup

85

Pre-installation instructions for Windows cluster environments


SharePlex can be used in a clustered environment. When SharePlex fails over, the adoptive node mounts a central variable-data directory on a shared disk so that replication continues.

Installation sequence
1 Install SharePlex first on the primary node the one to which the shared disk that

you created in preinstallation checklist step 9 normally will be mounted. Do the following during installation:

When you are prompted for the location of the variable-data directory, choose a
location on the shared disk.

Install the license key for this node when prompted during the installation. Install license keys for all other nodes in the cluster at the same time that you
install the license for the primary node. To install the additional license keys, select the Add Alternate Host Id check box in the License Key dialog box.
2 Install SharePlex on all of the other nodes in the cluster (the secondary nodes), spec-

ifying for each one a variable-data directory on the local machine. You may use a temporary directory for this purpose. This directory will not be used for replication, and you can delete all of the temporary variable-data directories from the secondary nodes after SharePlex is installed.
Note: The reason you are installing SharePlex on each node, in addition to installing the binaries, is to establish essential Registry entries on those nodes and to establish the NuTCRACKER operating environment, which enables SharePlex to replicate between Windows and UNIX systems in a uniform manner.

IP addressing
Host names and IP addresses are part of the SharePlex queue structures and cannot be changed after replication commences. A logical host name must be created, also known as a global cluster package name, which must be mapped to the floating IP address before activating a configuration file.

86

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

To map the global cluster package name to the floating IP address, create an alias in the hosts file (usually located in C:\\WINNT\System32\Drivers\etc) on all nodes or in a nameserver (DNS, NIS, NISPLUS). The alias cannot contain non-alphanumeric characters, such as underscores ( _ ) or dots (.). Example hosts file:
1.0.1.1.6 1.0.1.1.7 LocalSys #permanent IP address HACluster #floating IP address

Make certain to follow the instructions in Post-installation procedures for Windows cluster environments on page 110 after you install SharePlex.

CHAPTER 2 `Windows Installation and Setup

87

Running the installation program


Important upgrades only! You do not need to uninstall SharePlex or the NuTCRACKER environment before upgrading. Install the upgrade over the existing version.

Perform the installation instructions in this chapter on all Windows machines involved in SharePlex replication, including all nodes of a cluster. Before each installation, review the Windows Preinstallation Checklist on page 73 again to ensure that all of the installation requirements are satisfied on that machine.
1 Log into Windows as the SharePlex Administrator that was specified in step 22 of

the Windows Preinstallation Checklist. This user must have Administrator privileges for Windows. The installation automatically applies this user to the SharePlex spadmin group.
2 Open and log into the Oracle instance for which you are installing this version of

SharePlex.
3 [REINSTALLATION, PATCH, OR UPGRADE ONLY] Stop the SharePlex service.

To stop SharePlex 4.0 and earlier, double-click the sp_services desktop shortcut to open the SharePlex Service dialog box, then click Stop and select the port number. Click Apply to stop the service, then click Done to close the dialog box.

To stop SharePlex 4.5 or greater, double-click the SpUtils desktop shortcut to open the SharePlex Utilities dialog box, then click the SharePlex Services tab. Select the port number, then click Stop. Click Close to close the dialog box.
4 If you downloaded SharePlex from a Quest FTP site, skip to step 7. If you are install-

ing from a CD, insert the SharePlex CD into the CD-ROM drive, then continue with the next step.
5 On the Windows desktop, double-click My Computer. 6 In the My Computer window, double-click the SharePlex CD mount point (drive G: in this documentation; yours can be different). Note: This illustration does not show

88

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

a version number. Your CD mount point will show the version of SharePlex that you are installing.

7 Double click sp_setup to launch the installation program. Note: This illustration

does not show a version number. Your setup program will show the version of SharePlex that you are installing.

CHAPTER 2 `Windows Installation and Setup

89

8 In the Welcome dialog box, click Next to continue. You can cancel this installation at any time by clicking Cancel in any of the dialog boxes.

Important: If you cancel this installation, do not run OraSetup unless you re-install the SharePlex software first. Otherwise, the correct port number for SharePlex will not be reflected in the OraSetup process.

90

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

9 You are prompted for the SharePlex folder, otherwise known as the SharePlex product directory. This folder is where the SharePlex binaries and default parameter settings will reside. The default is C:\Program Files\Quest Software\SharePlex. You can accept the default, or you can click Browse to select a different directory or enter

the path name of a new directory that will be created automatically by the installation program.

10 Click Next to continue.

Important! If you enter the path of a different directory, and any of the folders has spaces in it (for example, Product Directory) the path name must be within quotation marks, for example C:\SharePlex\Product Directory.

CHAPTER 2 `Windows Installation and Setup

91

11 You are prompted to select the components that you want to install on this system.

Choose one of the following options.

Click SharePlex Full Installation for the version of Oracle installed on the system
to install everything needed to run, control and monitor SharePlex replication. This option installs the SharePlex binaries and utilities, the NuTCRACKER operating environment, the sp_ctrl command-line interface, and the SharePlex utilities. Or...

Click SharePlex Client Installation to use this system only for issuing commands
and running utilities for a remote replication system. This option installs the SpClient remote-access interface and the sp_ctrl command-line user interface, but does not install the SharePlex binaries, the NuTCRACKER operating environment, or other files necessary to replicate or post to a database on this system. You can install sp_ctrl on any Windows system. It is fully native software.
12 Click Next to continue.

92

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

13 You are prompted for the port number for SharePlex.

To accept the default port of 2100, you must select it from the list box so that it
appears in the text box. Or...

To use a different port number, enter the number in the text box.
Make certain all related SharePlex instances on the other machines are installed on the same port number that is used on this machine to permit communication among the machines through TCP/IP connections.

14 Click Next to continue.

Note: You can install SharePlex on multiple ports to replicate multiple Oracle instances or to implement consolidated replication. Finish all of the installation procedures for this system, then see the SharePlex Administrators Guide for instructions for establishing a replication strategy, including how to run multiple instances of SharePlex.

CHAPTER 2 `Windows Installation and Setup

93

15 You are prompted for the SharePlex variable-data directory where SharePlex will

maintain its queue files, logs, user-defined parameter settings, and other replication files. It must be located on a different partition or drive than the production Oracle instance. [Clusters only: When installing on a cluster, follow the guidelines for installing the variable-data directory on page 85.]

To install the variable-data directory, either accept the default, click Browse to select a different directory, or enter the path name of a new directory that will be created automatically by the installation program.
16 Click Next to continue.

94

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

17 You are prompted for the Program Manager group for the SharePlex shortcut in the Programs list on the Start menu. Either accept the default (an existing or new folder

named Quest Software), select a different group from the list, or enter the name of a new group that will be created automatically by the installation program.

18 Click Next to continue.

Note: The Program Manager shortcuts for SharePlex are placed in WINNT\Profiles\All Users\Start Menu.

CHAPTER 2 `Windows Installation and Setup

95

19 You are prompted to confirm the installation information. To change any information, click Back. To proceed with the installation, click Next.

20 If this is a new installation of SharePlex, you are prompted to begin the installation

of the MKS Platform Components. These components comprise the NuTCRACKER operating environment, which enables SharePlex to be ported to the UNIX and Windows platforms in a uniform manner. If this is an upgrade, the licensing prompt appears. Continue with step 23.

96

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

21 Either accept the default directory (seen in the preceding screen) or type in another directory, and then choose OK. The installation of the MKS Platform Components

begins.

Notes:The default directory for the MKS Platform Components is called the MKS Toolkit, as seen in the screen capture following step 20. After you complete the rest of the installation tasks, including adding a license key and running OraSetup, you must change the default setting for Global Resources in the MKS Toolkit. Refer to Changing Global Settings in the MKS Toolkit on page 107 in this manual.

CHAPTER 2 `Windows Installation and Setup

97

22 When the MKS Platform Components installation completes, the licensing prompt

appears. Continue with the license key instructions as follows.

Adding the license key


Immediately after completing the MKS Platform Components installation, the installation program displays the License Key dialog box.

23 Do either of the following, depending on the machines configuration.

If you are installing SharePlex on a secondary node in a cluster, click Cancel to


close the License Key dialog box. The licenses for the secondary nodes should have been added at the same time that the primary node was licensed. Proceed to Installing the SharePlex service on page 104.

If you are installing SharePlex on the primary node of a cluster or on a non-clustered machine, proceed with the following instructions.

98

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Important! You can use a SharePlex license utility on the primary node of a cluster to install licenses for all secondary nodes because they share one variable-data directory, but you cannot add licenses for non-clustered machines from one machine. The license utility must be run on each non-clustered replication system so that the license information is installed in the paramdb in the variable-data directory on each system.

If you have a license key


Proceed with the licensing process.
1 If the port for this instance of SharePlex is not displayed in the Port field, select

the port from the drop-down list.


2 Click Add License. The Add Key window appears. Information about the

license is displayed in the text box at the bottom of the dialog box.
3 If you received the license key in a file, copy it from the file and then use the Control+v keys to paste it into the License Key text box. Or, enter it manually,

including spaces. The license key is case-sensitive.


4 Type the Customer Name in the second text box. The name is case-sensitive, so

it must be typed exactly as given.


5 [CLUSTERS ONLY] To add a license for a secondary node of a cluster, select the Add Alternate Host Id check box, then select the machine ID from the CPU ID list

box. Repeat this step for all secondary nodes in the cluster.
6 Click OK to close the license utility. 7 Proceed to Establishing SharePlex as an Oracle user on page 99.

If you do not have a license key


1 If you do not have a license key, click Cancel to close the License Key dialog

box. The SharePlex software and the Oracle account remain intact, but you will not be able to run SharePlex. 2 Obtain a valid key from Quest Technical Support or your Quest sales representative. 3 Install the license by double-clicking the SpUtils desktop shortcut, then clicking the License Key tab in the SharePlex Utilities dialog box. To enter the license key information, follow the instructions in If you have a license key. When the license key is accepted, you can run SharePlex.

CHAPTER 2 `Windows Installation and Setup

99

Establishing SharePlex as an Oracle user


After you have added the license key, the installation program automatically launches the OraSetup dialog box of the Sp_Utils utility after the SharePlex license process has run. The OraSetup program establishes SharePlex as an Oracle user. Whether or not to run OraSetup at this time depends on whether this is a source or target system and on how you intend to synchronize the data.

If this is a source system, run OraSetup now. You cannot commence replication
until OraSetup has been run for the source instance to establish SharePlex as an Oracle user.

If this is a target system, choose one of the following options, depending on your
replication strategy, unless you have been instructed otherwise by a documented SharePlex procedure, a Quest Technical Support representative, or a Quest Systems Consultant.
A If the target instance exists and you will be using transportable tablespaces or a

cold-copy method to synchronize the data (export/import, store/restore from tape, FTP), it is recommended that you run OraSetup now.
B If you will be using a hot backup to synchronize the data, run OraSetup after the

backup has been applied and the database has been recovered and opened, following the instructions in the synchronization procedure. Running OraSetup on an existing target instance, such as a hot standby, before the backup and recovery does no harm, but you will need to re-run OraSetup again after the backup. To postpone OraSetup, click Cancel and then go to page 104 to add the SharePlex license key and finish the installation procedures. Run OraSetup when you are instructed to do so by the synchronization procedure. Synchronization options are explained in Chapter 6 of the SharePlex Administrators Guide.
Important: If you cancel the OraSetup installation, it does not cancel the installation of the SharePlex software, nor does it remove it. SharePlex still is installed on the system, but you cannot start replication unless you first run OraSetup. You can run OraSetup at any time by using the SpUtils or SpClient utility.

About OraSetup
The OraSetup program (Oracle Setup) establishes a master Oracle account with full DBA privileges and creates SharePlex internal tables and indices in the SharePlex schema. The SharePlex account will be used by all of the SharePlex for Oracle processes when replication is active.

100

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Ora_Setup requirements
Run OraSetup for each Oracle instance involved in SharePlex replication on all
source and target systems. Within a cluster, run it on the primary node (the one to which the shared disk containing the variable-data directory is mounted) so that the SharePlex user and password are registered in the SharePlex paramdb file. You do not need to run it on the other cluster nodes.
Important! In the Windows 2000 server environment, when executing OraSetup remotely using Terminal Services, it can fail with the error ORA-12541: TNS:no listener when using Bequeath (BEQ) connections. Note that OraSetup must be run locally to use BEQ, or if run remotely, it must use a TNS connection.

For centralized reporting (consolidated replication) using separate variable-data


directories, run OraSetup for each variable-data directory.

Do not alter the SharePlex internal objects. If you have questions or concerns about
these objects, contact Quest Technical Support at (949) 754-8000.

The Oracle 8.1.7 client must be installed on the system where you are running
OraSetup.

To run OraSetup
24 In the Port list box of the OraSetup dialog box, select the port number for the instance of SharePlex for which you are running OraSetup.

CHAPTER 2 `Windows Installation and Setup

101

25 Under Oracle Login, enter the following information.

In the Oracle SID text box, type the ORACLE_SID of the Oracle instance for
which you are running OraSetup. Type the SID exactly as shown in the Windows Registry. It is case-sensitive.

In the System User text box, type the name of a DBA-privileged user. OraSetup
operates as this user to establish the SharePlex user and create the internal SharePlex objects.

In the Password text box, type the password for the DBA user.
26 Under SharePlex User Account, enter the following information. The SharePlex

account must be used only by SharePlex.

Select the New User check box if this is the first time that OraSetup is being run
for this Oracle instance or if you are creating a new Oracle user for SharePlex. A new Oracle account for SharePlex will be created.

102

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Or... Clear the New User check box if this is not the first time that OraSetup is being run for this Oracle instance and you want to keep the existing SharePlex user or use another existing Oracle user for SharePlex.

In the User text box, type the name of the new or existing SharePlex user. In the Password text box, type the password for the SharePlex user.
27 Click Next to continue. You are prompted for information to install database objects

for SharePlex.

28 Under Tablespace, enter the following information.

In the Default list box, select the name of the SharePlex tablespace or type the correct one.

In the Temp list box, select the name of the SharePlex temporary tablespace or
type the correct one.

CHAPTER 2 `Windows Installation and Setup

103

In the Index list box, select the name of the SharePlex index tablespace or type the
correct one.
29 Under Tablespaces for RowID Map Indexes, enter the information for the indices.

Either select the name of each index or type the correct one.
30 Click Next to continue. The status of OraSetup is displayed.

31 Click OK to close the SharePlex Utilities dialog box. 32 [IF YOU ARE CHANGING THE SHAREPLEX USER AND REPLICATION IS ACTIVE] Copy the SharePlex

objects from the existing SharePlex users schema to the new SharePlex users schema to preserve the current replication environment.
33 [IF REPLICATING 9I DDL] To enable replication of DDL supported for Oracle 9i, issue the

following grants to the SharePlex Oracle user. grant select any table to splex with admin option; grant create any view to splex with admin option;
34 Issue one of the following grants to the SharePlex user so that SharePlex can access

the data dictionary if O7_DICTIONARY_ACCESSIBILITY is set to FALSE*.

104

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Oracle 9i: grant select any dictionary to splex; Oracle 8i: grant select catalog role to splex; (*SharePlex requires access to the dictionary tables outside of the standard DBA roles.)
35 [ORACLE 9I ONLY] If you will be replicating Oracle 9i tables that contain more than 255 columns, run the lmt_setup.exe program from the bin sub-directory of the Share-

Plex product directory. This program creates the SYS.SHAREPLEX_KTFBUE view exposing SYS.X$KTFBUE and grants select privilege on this view to the SharePlex Oracle user. You are prompted for the following:

The database ORACLE_SID and ORACLE_HOME. An Oracle user with SYSDBA role and that users password. The SharePlex Oracle user that you created during ora_setup.
The program runs SQL*Plus and executes the following commands to grant the privilege: SQL> create or replace view sys.shareplex_ktfbue as select * from sys.x$ktfbue; SQL> grant select on sys.shareplex_ktfbue to splex;

36 At this point, the SharePlex Services dialog box appears. Follow the instructions in

the next section to install the SharePlex Services.

Installing the SharePlex service


SharePlex, like Oracle, runs as a service on the Windows platform. The service name is Sp_Copsrv.exe, and it must be installed and running for replication to proceed. During the installation process, the SharePlex Services dialog box opens after you install the license key. You can install the SharePlex service at this time (recommended) or you can close the installation window and install the service later by double-clicking the SpUtils desktop shortcut and following these directions.

CHAPTER 2 `Windows Installation and Setup

105

To install the SharePlex service


37 In the Port list box of the SharePlex Services dialog box, select the SharePlex port

number for which you are installing this service.

38 Click Install. When you see the Service Stopped message in the Current State text

box, the SharePlex service is installed.


39 To start the SharePlex service, click Start. When you see the Service Running message in the Current State text box, the SharePlex service is started. 40 Click OK to close the SharePlex Services dialog box.

Tip: The SharePlex service is installed in auto-startup mode, which starts SharePlex automatically when the system is started, ensuring that replication begins as soon as possible. To change startup status, use the Administrative Tools Control Panel on Windows systems.

106

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

41 In the Installation Complete dialog box, click Finish to complete the installation.

42 [OPTIONAL] If you are installing multiple instances of SharePlex on this system, you can set a default port number for the sp_ctrl process so that it automatically connects

to that port when it starts. You can connect to the other SharePlex instances by using the port command after sp_ctrl starts. If you do not set a default port number, sp_ctrl connects to the SharePlex instance with the lowest port number.

To set a default port for sp_ctrl


1 From the Start menu, click Run. 2 In the Run dialog box, type regedit, then click OK to run the Registry Editor

program.
3 Under My Computer, drill down to the SharePlex entry of \HKEY_LOCAL_MACHINE\SOFTWARE\Quest Software\SharePlex. 4 Click the SharePlex node. 5 In the Name column in the right pane, right click DefaultPort, then select Modify to open the Edit String dialog box. 6 In the Value Data text box, enter the port number to be used as the default, then click OK. 7 Exit the Registry Editor. 43 If you were prompted to restart the system after you installed the NuTCRACKER

files, do so now.

CHAPTER 2 `Windows Installation and Setup

107

44 If you are using SharePlex in a cluster environment, proceed to Post-installation

procedures for Windows cluster environments on page 110. Otherwise, proceed to Assigning SharePlex users and authorization levels on page 116.
Important! Repeat all of the installation procedures in this chapter for all Windows machines that will be involved in SharePlex replication. Before each installation, review the Windows Preinstallation Checklist on page 73 again to ensure that all of the system requirements are satisfied for each machine. To install SharePlex on multiple ports in preparation for consolidated replication or other configurations requiring multiple variable-data directories, see the SharePlex Administrators Guide.

Changing Global Settings in the MKS Toolkit


When you have completed the preceding installation procedures, and if you also have the MKS Platform Components (MKS Toolkit) installed (either newly installed or from a previous installation), you need to change the default setting for Global Resources memory. The default value is 16 MB and you should increase it to 64 MB. To change this setting, perform the following steps.
1 From the Start menu, select Settings, and click Control Panel, or double-click the My Computer icon on the desktop and then double-click Control Panel. The Con-

trol Panel Window opens.


2 In the Control Panel, double-click MKS Toolkit. The Configure MKS Toolkit dialog

box appears.

108

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

3 Select the Runtime Settings tab and then select Miscellaneous Settings from the Categories pulldown menu. 4 Under Global Settings in the Max Memory for Global Resources text box, change the value by typing 67108864 in the box.

CHAPTER 2 `Windows Installation and Setup

109

5 Click OK to close the dialog box. You must restart your system in order for the

change to take effect.

110

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Post-installation procedures for Windows cluster environments


These instructions assume you installed SharePlex on the cluster nodes according to the instructions in Pre-installation instructions for Windows cluster environments on page 85.

Summary of post-installation steps


In the following procedures, you will:

Incorporate SharePlex into the cluster environment. Set the SP_SYS_HOST_NAME variable in the Windows Registry to the global
cluster package name that is associated with the floating IP address. The global cluster package name is the alias you created in the hosts file. SP_SYS_HOST_NAME instructs SharePlex to use the alias when any of its processes issues a name lookup (gethostname), superseding the local system name. It ensures that sp_ctrl commands are directed to the correct host, in this case the global cluster package name, and it enables SharePlex to migrate properly during failover.

Set the SP_SYS_VARDIR environment variable in the Windows Registry to point to


the shared variable-data directory. This ensures that the current replication environment continues to be used by SharePlex after failover.

[OPTIONAL] Set the SP_QUE_SYNC parameter. SP_QUE_SYNC protects data from


certain system failures that cause data corruption by writing data to disk as it is received, instead of using UNIX buffering. Use of this parameter can significantly slow replication speed, especially posting, so you should test it if you replicate large volumes of data. Note: This parameter is not a substitute for UPS or any other highavailability fault tolerance system.

CHAPTER 2 `Windows Installation and Setup

111

Configuring SharePlex within the cluster solution


If possible, configure SharePlex and Oracle into a single global cluster package. The combination of SharePlex and Oracle in the same package allows the cluster software to start and stop SharePlex and Oracle in the proper sequence if any component of the package fails. Configure Oracle to start before SharePlex.

Setting environment variables in the Registry


The SP_SYS_VARDIR and SP_SYS_HOST_NAME environment variables must be set in the Windows Registry on all nodes in the cluster. SharePlex gets its environment information from the Registry.

Do not set these parameters as environment variables. Do not set these variables on source or target systems outside the cluster.
Warning! Do not add, change or remove Registry entries unless you are familiar with the functionality of the Registry and the Windows platform. Errors when changing Registry settings can adversely affect the operation of the software or the system itself. If you are not familiar with the Registry, consult your Systems Administrator for assistance.

To set the variables in the Registry


1 From the Start menu, click Run. 2 In the Run dialog box, type regedit, then click OK to run the Registry Editor pro-

gram.
3 Locate the SharePlex entry \HKEY_LOCAL_MACHINE\SOFTWARE\Quest Software\SharePlex. 4 Expand the SharePlex node, then highlight the port number.

112

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

5 In the Name column of the pane on the right, right-click the SP_SYS_VARDIR variable, then select Modify. The Edit string dialog box appears.

6 In the Edit String dialog box, enter the full path name of the shared variable-data directory in the Value Data field, then click OK.

7 To add the SP_SYS_HOST_NAME variable, right click the SharePlex port number, then click New, then String Value.

CHAPTER 2 `Windows Installation and Setup

113

8 In the Name column of the pane on the right, replace the blue-highlighted new string

with SP_SYS_HOST_NAME.

9 Click outside the new entry to exit edit mode. The new SP_SYS_HOST_NAME

variable is highlighted.
10 Right-click the SP_SYS_HOST_NAME variable, then select Modify. The Edit String dialog box appears. 11 In the Edit String dialog box, type the global cluster package name in the Value data

field.

12 Click OK. 13 Close the Registry Editor. 14 The next time you start the SharePlex service, the new Registry entries will take

effect.

Setting SP_QUE_SYNC
If you use SP_QUE_SYNC, set it on the primary node of the cluster (the node to which the shared variable-data directory is mounted) and on each source and target machine

114

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

outside the cluster that is part of this replication environment. For more information about SP_QUE_SYNC, see the SharePlex Reference Manual.

To set SP_QUE_SYNC
1 Double-click the SpUtils desktop shortcut to open the SharePlex Utilities dialog box, then click the SharePlex Services tab. 2 In the Port list box of the SharePlex Services dialog box, select the port

number of the SharePlex instance for which you are setting SP_QUE_SYNC, then click Start. The Current State text box displays the status of the service.

3 Click Close to close the SharePlex Utilities dialog box. 4 Double-click the sp_ctrl desktop shortcut to open the sp_ctrl com-

mand prompt.

5 If you installed SharePlex on a port number other than port 2100 and you did not set a default port for sp_ctrl (see To set a default port for sp_ctrl on page 106), there is a message stating that your TCP port is not set properly or sp_cop is not running.

CHAPTER 2 `Windows Installation and Setup

115

Use the port command to set sp_ctrl to the correct port number. (Otherwise, skip this step.) sp_ctrl> port portnumber
6 In sp_ctrl, set the SP_QUE_SYNC parameter to 1 using the following command.

sp_ctrl> set param SP_QUE_SYNC 1


7 Shut down SharePlex using the following command in sp_ctrl. The command shuts down the SharePlex service and also shuts down sp_ctrl. The parameter change

takes effect when SharePlex is restarted. sp_ctrl> shutdown Proceed to Assigning SharePlex users and authorization levels on page 116.

116

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Assigning SharePlex users and authorization levels


Important! Perform this procedure on all source and target systems.

To monitor, control, or change SharePlex replication, a person must be designated as a SharePlex user on the systems where he or she will be issuing commands. When designating users, you designate their authorization levels. The authorization level defines which SharePlex commands a user can issue. To designate SharePlex users and assign their command authorization levels, you add their names to one of the following SharePlex user groups on the replication system(s) they will be accessing.

spadmin spopr spview


The groups were created during the installation process.

Assigning users to SharePlex groups


Each SharePlex command is assigned one of three authorization levels that corresponds to one of the SharePlex groups. Each authorization level has different privileges. To execute a command, a SharePlex user must have that commands authorization level or higher. When you installed SharePlex, one user was designated as a SharePlex Administrator and was added to the spadmin group. To grant other users access to SharePlex, use the following table to determine their authorization levels and groups. Modify the groups as necessary using the standard method for your Windows operating system version.

CHAPTER 2 `Windows Installation and Setup

117

User Authorization Levels and Roles


AUTH LEVEL USER TYPE USER GROUP USER ROLES

Administrator

spadmin

Can issue all SharePlex commands. Commands that can only be issued by a SharePlex Administrator are:

startup, shutdown all configuration commands relating to


an active configuration

all parameter commands except list


2 3 Operator Viewer
spopr spview param start capture stop capture abort capture truncate log

Can issue all SharePlex commands except those listed above. Can view lists, status screens, and logs to monitor replication only.

You have now completed the installation process.


Important!

Before you configure SharePlex for replication, you are encouraged to start SharePlex and run the demonstrations in this manual to confirm that your installation was successful and that you are familiar with the software. After you run the demonstrations, refer to the SharePlex Administrators Guide for additional information about:

Starting and shutting down SharePlex properly. Configuring your data, application and system for SharePlex replication. Establishing SharePlex replication. Synchronizing your data and activating replication. Using SharePlex monitoring tools and utilities. Performing administrative operations on replication systems.

Refer to the SharePlex Reference Manual for information about:

Controlling and monitoring replication. Tuning replication with SharePlex parameters. Preventing and solving replication problems.

118

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

3
Basic SharePlex Demonstrations
This chapter demonstrates SharePlex replication using the sp_ctrl command-line interface. This demonstration can be run on UNIX or Windows systems.
Warning! These demonstrations are intended to introduce you to the SharePlex software. All of the demonstration components were created specifically for demonstration purposes, not deployment in a production environment. Do not use these demonstrations as the basis for establishing replication. To properly implement replication in your environment, use the SharePlex Administrators Guide.

Tip: The commands used in these demonstrations are described in more detail in the SharePlex Reference Manual.

Contents Overview of the demonstrations Starting SharePlex Creating and activating a configuration Testing replication

120

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Overview of the demonstrations


These demonstrations assume that SharePlex is installed on one source system and one target system.

What you will learn


These demonstrations show you:

how to start SharePlex how to create and view a configuration how to activate a configuration how SharePlex replicates smoothly from source to target systems how SharePlex quickly and accurately replicates large transactions how SharePlex queues the data if the target system is unavailable how SharePlex resumes from its stopping point when the target system is recovered how SharePlex recovers after a primary instance interruption how SharePlex replicates a TRUNCATE command how SharePlex verifies synchronization and repairs out-of-sync rows

When you complete these demonstrations, you may move on to the next chapter, which contains more advanced demonstrations of SharePlex performance and features.

Tables used in the demonstrations


The tables used in these demonstrations are source table demo_src and target table demo_dest, both of which were installed in the SharePlex schema during ora_setup. The demo tables are installed empty. If you or anyone else previously ran other SharePlex replication or tests using these tables on these systems, there may be rows in one or both of these tables. Please truncate the tables for each demo so that you can start the demonstration from a fresh state. You will replicate demo_src from a source instance on the source system (described as sysA) to demo table demo_dest in a target instance on another system, the target system (described as sysB). For this documentation, the owner of the demo tables is assumed to be splex, which is the default name for the SharePlex Oracle user. If you assigned SharePlex a different user name during ora_setup, use that one.

CHAPTER 3 Basic SharePlex Demonstrations

121

You need to know the ORACLE_SID of your source and target instances. On UNIX systems, the SID can be found by viewing the oratab file in the /etc directory (/var/opt/ oracle directory on Solaris platforms). You will see a display similar to this:
qa8:/qa/oracle/ora8/app/oracle/product/8.0

In the example, qa8 is the ORACLE_SID. On Windows systems, the ORACLE_SID is in Oracles entry in the Windows Registry. Description of the demo tables.
Column Name NAME ADDRESS PHONE# Data Type varchar2(30) varchar2(60) varchar2(12) Null?

Part 1: Starting SharePlex


The following are instructions for starting SharePlex and the sp_ctrl command-line interface on UNIX and Windows systems. Start SharePlex on the source and target systems. UNIX systems
1 Log onto the system as a SharePlex Administrator (a member of the spadmin Share-

Plex group).
2 From the bin sub-directory of the SharePlex product directory (the one containing

the binaries, represented by the productdir variable in the following syntax), run
sp_cop and sp_ctrl.

$ cd /productdir/bin $ ./sp_cop & $ . /sp_ctrl Windows systems


1 Log onto the system as a SharePlex Administrator (a member of the spadmin Share-

Plex group).

122

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

2 On the Windows desktop, double-click the SpUtils shortcut to open the SharePlex Utilities dialog box. 3 Click the SharePlex Services tab to display the SharePlex Services dialog

box.
4 In the Port list box of the SharePlex Services dialog box, select the SharePlex port number, then click Start.

5 When the Current State text box shows that the service has started, click Close to

close the dialog box.


6 On the Windows desktop, double-click the sp_ctrl shortcut to open the sp_ctrl command prompt.

CHAPTER 3 Basic SharePlex Demonstrations

123

Part 2: Creating and activating a configuration


SharePlex gets its replication instructions from configurations, which are user-defined specifications that tell SharePlex what to do. For each group of objects that you want to replicate, you create a configuration file. Configurations reside on the source system and define:

The datasource (source database) the ORACLE_SID of the Oracle database on


the source system that contains the data to be replicated.

The source objects the names of the objects within the source database that contain the data to be replicated. You can replicate some or all of the tables and sequences within a database.

The target objects the names of the objects in the database on the target system
that will receive the replicated data.

The routing map the route for transporting the data. This includes the target system(s), any intermediary systems, and the target databases ORACLE_SID. (An intermediary system is not used in this demonstration.)

To create the demonstration configuration


1 Create a replication configuration named sample_config by issuing the create config command in sp_ctrl on the source system. This opens the default text editor, which is vi for UNIX systems and WordPad for Windows systems.

sp_ctrl(sysA)> create config sample_config Refer to Template 1 as you construct your configuration. Template 1: Basic demonstration configuration sample_config datasource:o.source_SID splex.demo_src splex.demo_dest targetsys@o.target_SID

2 On the first non-commented line of the file, type the following, leaving no space

between any of the items. datasource:o.source_SID (Substitute the ORACLE_SID of the source instance for source_SID.) This tells SharePlex where to find the table whose data will be replicated. The o. tells SharePlex that Oracle data is being replicated.

124

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

3 On the next line, enter the owner name (splex) and table name (demo_src) of the

source table, separating the two items with a dot (.) but no spaces. Using the owners name with a table name ensures that SharePlex replicates the correct table, since different tables in different schemas in a database could have the same name. splex.demo_src
4 Type at least a few spaces or a tab to create a second column. Do not press Enter. 5 In the second column, enter the owner name (splex) and table name (demo_dest) of

the target table, separating the two items with a dot (.) but no spaces. splex.demo_dest
6 Type a few spaces or a tab to create a third column. Do not press Enter. 7

In the third column, type the following items with no space between them. This creates the routing map for your configuration, telling SharePlex where to put the replicated data.

the name of the target system the @ symbol the letter o a dot (.) the target instance SID

Example: sysB@o.oraB
8 Save the file and exit the editor. This returns you to the sp_ctrl prompt. 9 [OPTIONAL] To view the configuration, issue the view config command in sp_ctrl on

the source system: sp_ctrl(sysA)> view config sample_config


10 Activate the configuration in sp_ctrl on the source system. Configuration names are

case-sensitive. sp_ctrl(sysA)> activate config sample_config

CHAPTER 3 Basic SharePlex Demonstrations

125

11 To confirm that your configuration is active, type the following sp_ctrl command on the source system to display a list of all configurations. The sample_config config-

uration should appear under File Name, and the word Active should appear under State. sp_ctrl(sysA)> list config
Tip: If your configuration activation fails, use the view config sample_config command in sp_ctrl to view the file. Compare it to Template 1 on page 123 and make sure all of the information you entered is correct. For example, check for extra spaces that are not supposed to be there, or for missing components, such as the o. before the SID. For other configuration troubleshooting tips, refer to Chapter 3 of the SharePlex Reference Manual.

To correct mistakes in the configuration file:


Use the edit config sample_config command in sp_ctrl to correct mistakes in the configuration file before you activate it (or if the activation failed). This command opens the file in the text editor, and you can make the changes by editing the file. Save the changes, and re-try the activation. To change an active configuration, you must copy it to a new file first with the copy config command, and then edit and activate the copy. For more information about the copy config command, see the SharePlex Reference Manual.

Part 3: Testing replication


This section demonstrates the speed and accuracy of SharePlex replication using the configuration you built and activated. Before you run the tests, run SQL*Plus on each system, connect to your database, and select all rows from both of the demonstration tables. On sysA: SQL> select * from splex.demo_src; On sysB: SQL> select * from splex.demo_dest; These tables were installed empty. If they contain data, TRUNCATE them so that you can start the demonstration from a fresh state.

Test 1: Verify replication startup


This test verifies that replication is proceeding.

126

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0


1 Insert and commit a record into the source table (splex.demo_src) by typing:

SQL> insert into splex.demo_src values (JIM, 8001 Irvine Center Drive, 949-7548000); SQL> commit; SharePlex replicates the changes and posts them to the target table.
2 Verify that the new record is now in the splex.demo_dest table on the target system

by typing the following query: SQL> select * from splex.demo_dest; You can see that the row you inserted now exists in the target table as well as the source table.

Test 2: Verify speed and replication of large volumes


This test verifies that SharePlex replicates large volumes of data quickly and accurately.
1 Create a SQL script to insert 500 rows into the splex.demo_src table on the source

system, following it with a COMMIT. You can refer to the description on page 121 for the table's description when creating the script.
2 Run the perf_mon.sh script. This script monitors the speed of the Post process.

When it runs, it polls the Post process to determine the number of operations that were processed. It repeats this poll a specified number of times at specified intervals, and then it computes the number of INSERTs, UPDATEs, DELETEs, and COMMITs per second that SharePlex posted during that time. The results are printed to screen. Following are instructions for UNIX and Windows systems. UNIX systems Run perf_mon from the util sub-directory of the SharePlex product directory using the following syntax. You can control the frequency and interval of the poll. Syntax: perf_mon.sh #_polls poll_interval where #_polls is the number of times to poll the Post process and poll_interval is the time interval between polls Example: perf_mon.sh 10 60

CHAPTER 3 Basic SharePlex Demonstrations

127

In this example, the Post process is polled 10 times at 60-second intervals.


Windows systems

Run sp_perf_mon in the Command Prompt from the bin sub-directory of the SharePlex product directory. Use the following syntax. On Windows systems, the poll occurs every second and continues until you kill it with the control+C command. sp_perf_mon -rport_number where port_number is the SharePlex port number Example: sp_perf_mon -r2100
Note: This script does not work with multiple post queues using the same port.

3 As you did in Test 1, verify that all rows have been sent to the target system. By the

time you run SQL*Plus and generate the query on the target system, the data should already have been posted.

Test 3: Verify queuing when the target is unavailable


This test shows you how SharePlex queues the replicated data on the source system when the target system is unavailable.
1 Shut down SharePlex on the target system to simulate that this system is unavail-

able. sp_ctrl(sysB)> shutdown


2 On the source system, INSERT and COMMIT records into splex.demo_src using

the script you created for Test 2.


3 Since the target system was made unavailable by shutting down SharePlex, mean-

ing that there is no Import service available on that system to receive data, the records will be queued in the export queue on the source system. You can verify this by issuing the qstatus command, which displays the status of all SharePlex queues on a system. sp_ctrl(sysA)> qstatus Figure 1 (following) is similar to what you will see when you issue the qstatus command on the source system. Notice that there is no post queue on the source system. This is because the system is only being used as a source system. Normally, the post

128

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

queue for this configuration would be on a different system, the target system. However, this system also could be a target system if a configuration is active on another system.

FIGURE 1: Sample qstatus command issued on the source system.


Note: Since SharePlex is not running on the target system, you cannot view that system's post queue. Under normal circumstances, when SharePlex is running on both systems, you can use the qstatus command with the [on host] option on the source system to view the post queue instead of running sp_ctrl on the target. (Substitute the target system's name for host.) sp_ctrl (sysA) > qstatus on host

Test 4: Verify continuation of replication


This test demonstrates how SharePlex resumes processing from its stopping point when the target system becomes available again.
1 Start sp_cop and sp_ctrl (if they are not already running) on the target system. 2 To verify that all SharePlex processes are started on the target system, issue the status command.

sp_ctrl(sysB)> status

CHAPTER 3 Basic SharePlex Demonstrations

129

The status command summarizes the SharePlex Status Database, showing you processes that are running and any errors that occurred. The following screen shows a typical status window.

FIGURE 2: sample status command issued on the target system


The status command is one of several commands in sp_ctrl that can display replication status. To get detailed status information, including explanations of errors, you can use the lstatus command. sp_ctrl(sysB)> lstatus
3 When the SharePlex processes start, replication resumes. Run SQL*Plus on the tar-

get system and verify that the records inserted by the script on the source system now exist in the target database. SQL> select * from splex.demo_dest;

130

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Test 5: Verify SharePlex recovery after interruption to the primary instance


This test shows how SharePlex recovers after an interruption to the primary instance.
1 Stop the Capture process on the source system to simulate the interruption.

sp_ctrl(sysA)> stop capture


2 Use the script you created for Test 2 to INSERT and COMMIT records in splex.demo_src. 3 Re-start the Capture process on the source system.

sp_ctrl(sysA)> start capture


4 Check the status of the SharePlex processes on the source system to verify that Cap-

ture has started. sp_ctrl(sysA)> status


5 Run SQL*Plus on the target system and verify that all records inserted by the script

on the source system now exist in the target database. SQL> select * from splex.demo_dest;

Test 6: Verify replication of the TRUNCATE TABLE command


This test demonstrates replication of the TRUNCATE TABLE command, allowing you to remove data from the source and target tables with one command.
1 In SQL*Plus, issue the TRUNCATE TABLE command for splex.demo_src on the

source system. SQL> TRUNCATE TABLE splex.demo_src;


2 Immediately issue the qstatus command on the source system, then issue it again.

You can see that the transactions are moving through the queues on their way to the target system. sp_ctrl(sysA)> qstatus
3 Run SQL*Plus on the target system, and verify that the target table splex.demo_dest is empty.

SQL> select * from splex.demo_dest;

CHAPTER 3 Basic SharePlex Demonstrations

131

Test 7: Compare and repair out-of-sync rows


This is the final test in this demo. It demonstrates how you can use the compare table command in sp_ctrl to compare source and target tables to verify synchronization and, as an option, to repair rows that are out of synchronization.
1 On the source system, use the script you created for Test 2 to insert several rows into splex.demo_src. 2 Verify that all of the data has posted to splex.demo_dest by issuing the qstatus command in sp_ctrl on the target system until the queues in the display are at 0.

sp_ctrl(sysB)> qstatus
3 Issue the compare table command in sp_ctrl on the source system.

sp_ctrl(sysA)> compare table splex.demo_src to splex.demo_dest target target_host@o.target_SID where target_host is the name of the target machine, and target_SID is the ORACLE_SID of the target instance.
4 View the compare results using the show compare command with the [detail]

option on the source system. This should show that there are no rows out of synchronization. sp_ctrl(sysA)> show compare detail
5 On the target system, issue the UPDATE command for several rows to change the values in the NAME column in splex.demo_dest. This causes the source and target

tables to be out of synchronization.


6 Issue the compare table command on the source system again, but this time add the [repair] option. This compares the rows in splex.demo_dest against those in splex.demo_src and repairs the ones that are out of synchronization.

sp_ctrl(sysA)> compare table splex.demo_src to splex.demo_dest target target_host@o.target_SID repair


7 To verify the repair, issue the show compare command with the [detail] option on

the source system. It shows details about the repair process, such as the number of rows that were repaired and what was done to repair them. To view the SQL state-

132

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

ments that were used by the repair process, issue the show compare command again with the [report] option. sp_ctrl(sysA)> show compare detail sp_ctrl(sysA)> show compare report
8 To verify that the repair was accurate, you can manually compare the source and tar-

get tables using a SELECT statement to view all rows in both tables. SQL> select * from splex.demo_src; (on the source system) SQL> select * from splex.demo_dest; (on the target system)
Tip: SharePlex also provides a compare config command to compare all source tables in a configuration to their target tables.

This concludes the Basic SharePlex demonstration.

4
Advanced SharePlex Demonstrations
This chapter demonstrates selected features of SharePlex. These exercises can be run on UNIX and Windows systems to demonstrate:

how to build and verify a replication configuration how to use the compare table command to verify synchronization how to use partitioned replication to replicate subsets of data how to use transformation to manipulate replicated data how to use generic conflict resolution in peer-to-peer replication

Important! These demonstrations are intended to introduce you to the SharePlex software. All of the demonstration components were created specifically for demonstration purposes, not deployment in a production environment. Do not use these demonstrations as the basis for establishing replication. To properly implement replication in your environment, use the SharePlex Administrators Guide. It is recommended that you run these demonstrations in the order that they appear in this manual.

Tip: The commands used in these demonstrations are explained in the SharePlex Reference Manual.

Contents Initial demonstration Demonstrating partitioned replication Demonstrating transformation Demonstrating generic conflict resolution

134

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Installing the demonstration objects


SharePlex provides several SQL scripts, including p2p.sql and od.sql that install all of the objects that you need for these demonstrations. These scripts are located in the util sub-directory of the SharePlex product directory. Run them on the source and target systems that you will be using for the demonstrations. Run the scripts in SQL*Plus as an existing user with the DBA role and SELECT ANY TABLE privileges. You will be prompted for the following items:

The schema where you want the demonstration objects to be installed. The tablespace for the demonstration objects. Whether or not you want old demonstration objects from a previous version of
SharePlex to be removed. This requires entering the schema name for those objects, and the script will remove them. Description of the demonstration objects
od_employee

Name ---------------------EMP_NO EMP_FIRST_NAME EMP_LAST_NAME EMP_DOB EMP_DEPT_NO EMP_TIMESTAMP


od_timesheet

Null? ------NOT NULL

Type ------NUMBER VARCHAR2(20) VARCHAR2(20) DATE NUMBER DATE

Name ---------------------TS_EMP_NO TS_IN_TIME TS_OUT_TIME TS_MOD_TIME

Null? --------

Type -------NUMBER DATE DATE DATE

CHAPTER 4 Advanced SharePlex Demonstrations

135

od_department

Name ---------------------DEPT_NO DEPT_NAME DEPT_CODE


od_salary

Null? -------NOT NULL

Type ------NUMBER VARCHAR2(30) VARCHAR2(5)

Name ----------------------SAL_EMP_NO SAL_VALUE SAL_CHANGED


od_sales_emp_data

Null? --------

Type ------NUMBER NUMBER DATE

Name ----------------------EMP_NO_KEY EMPLOYEE_NAME SALARY DEPARTMENT


exc_table

Null? -------NOT NULL

Type -------NUMBER VARCHAR2(70) NUMBER VARCHAR2(50)

Name ----------------------EXC_NO EXC_TYPE EXC_TARGET_TABLE EXC_FIXED EXC_INFO EXC_TIMESTAMP

Null? -------NOT NULL

Type ---------NUMBER VARCHAR2(6) VARCHAR2(66) VARCHAR2(3) VARCHAR2(500) DATE

136

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Demo 1: Initial demonstration


This demonstration highlights the verify and compare table commands, and it provides a simple demonstration of performance.

Starting SharePlex
The following are instructions for starting SharePlex on UNIX and Windows systems. Start SharePlex on the source and target systems. UNIX systems
1 Log onto the system as a SharePlex Administrator (a member of the spadmin Share-

Plex group).
2 From the bin sub-directory of the SharePlex product directory (the one containing

the binaries, represented by the productdir variable in the following syntax), run
sp_cop and sp_ctrl.

$ cd /productdir/bin $ ./sp_cop & $ . /sp_ctrl Windows systems


1 Log onto the system as a SharePlex Administrator (a member of the spadmin Share-

Plex group).
2 On the Windows desktop, double-click the SpUtils shortcut to open the SharePlex Utilities dialog box. 3 Click the SharePlex Services tab to display the SharePlex Services dialog

box.

CHAPTER 4 Advanced SharePlex Demonstrations

137

4 In the Port list box of the SharePlex Services dialog box, select the SharePlex port number, then click Start.

5 When the Current State text box shows that the service has started, click Close to

close the dialog box.


6 On the Windows desktop, double-click the sp_ctrl shortcut to open the sp_ctrl command prompt.

Creating the configuration


In sp_ctrl, create a replication configuration named od.config that replicates the od_department, od_salary, od_timesheet, and od_employee tables on the source system to the same tables on the target system. To create the configuration, use the create config command in sp_ctrl. This command opens a new file in the default text editor for SharePlex, which is either vi (UNIX) or WordPad (Windows). sp_ctrl(sysA)> create config od.config

138

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Using the editing commands in the text editor, follow Template 8 to create the configuration, making the following substitutions.

For source_SID on line 1, use the ORACLE_SID of the source database. The SID is
case-sensitive.

For owner, substitute the owner of the object. The object in column 1 is the source
object, and the object in column 2 is the target object.

For target_host, substitute the target machines name. For target_SID, substitute the ORACLE_SID of the target database. The SID is casesensitive. Do not allow any spaces between characters within a column. Separate columns with two or more spaces or a tab. Template 8: Demonstration configuration od.config datasource:o.source_SID owner.od_department owner.od_salary owner.od_timesheet owner.od_employee owner.od_department owner.od_salary owner.od_timesheet owner.od_employee target_host@o.target_SID target_host@o.target_SID target_host@o.target_SID target_host@o.target_SID

When you are finished making the configuration entries, save the file using either the :wq command (in vi) or File>Save (WordPad). SharePlex automatically saves the file in the config sub-directory.
Important! Retain this configuration file on your system, since it will be needed for another demonstration.

Verifying and activating the configuration


You can use the verify command in sp_ctrl to determine whether or not the configuration will activate properly. This command validates the database ORACLE_SID, object names and construction, configuration syntax, constraint conditions, and other components that have an effect on activation.
1 Issue the verify command in sp_ctrl on the source system using the following syn-

tax. sp_ctrl(sysA)> verify config od.config

CHAPTER 4 Advanced SharePlex Demonstrations


2 To view the results of the verification, view the SID_log.vrfy log in the log sub-

139

directory of the SharePlex variable-data directory (where SID is the ORACLE_SID of the source database). It should warn you that there is an ON DELETE CASCADE constraint on the od_salary table. The constraints name is od_sal_emp_no_fk. Disable the constraint on the target table only. SharePlex replicates the original delete and the cascading deletes from the source system, so if these constraints are allowed to activate on the target system, SharePlex will return out-of-sync errors.
3 The log also should warn of a trigger on the od_timesheet table. The triggers name is od_timesheet_mod. Since triggers on target tables cause SharePlex to return out-

of-sync errors, disable this trigger on the target table only.


4 In sp_ctrl, issue the activate config command for the od.config configuration.

sp_ctrl(sysA)> activate config od.config

Verifying synchronization
This demonstrates the compare table command. This command compares the source and target tables to ensure their synchronization, and it provides a repair option that resynchronizes out-of-sync rows that are found.
1 Populate the od_employee and od_salary tables on the source system by executing the od_add_emps procedure that was installed in the schema where you installed

the demonstration objects. This procedure has one IN parameter that specifies the number of employees to insert per department. The default number of departments is 5. Use an IN parameter of 100 to create 500 new employees in the od_employee table and 500 entries in the od_salary table.
2 In sp_ctrl on the source system, issue the compare table command once for the source od_salary table and once for the od_salary table. Substitute the tables own-

ers, the target systems name, and the target ORACLE_SID for the appropriate variables in the following syntax. sp_ctrl(sysA)> compare table source_owner.od_employee to target_owner.od_employee target target_host@o.target_SID sp_ctrl(sysA)> compare table source_owner.od_salary to target_owner.od_salary target target_host@o.target_SID
3 In sp_ctrl on the source system, issue the show compare command. This displays

the progress of the comparisons. Continue issuing this command until both compare processes have completed.

140

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0 sp_ctrl> show compare
4 Issue the show compare command with the [detail] option on the source system to

view the results of the comparisons. sp_ctrl(sysA)> show compare detail The detail should show no out-of-sync rows.
5 Delete some rows from od_employee on the target system. This causes that table to

go out of synchronization with its source table.


6 Issue the compare table command on the source system again for the od_employee table, this time using the [repair] option. This repairs the out-of-sync condition.

sp_ctrl(sysA)> compare table source_owner.od_employee to target_owner.od_employee target target_host@o.target_SID repair


7 Issue the show sync command on the target system. This should show no out-ofsync rows, since the compare table command added the missing rows to the target od_employee table.

sp_ctrl(sysB)> show sync


8 [OPTIONAL] To view the SQL statements used for the repair, issue the show compare command with the [report] option on the source system.

sp_ctrl(sysA)> show compare report


9

Delete (do not TRUNCATE) all rows from the od_employee table on the source system. This activates the ON DELETE CASCADE constraint on the source od_salary table, deleting all of its rows. SharePlex replicates all of those deletes to the target tables.

Demonstrating performance
This demonstration allows you to view performance statistics for SharePlex replication.
1 Run the od_add_emps procedure on the source system using an IN value of 2000. This adds 10,000 rows assuming you made no changes to the od_department table. 2 Run the perf_mon.sh script. This script monitors the speed of the Post process.

When it runs, it polls the Post process to determine the number of operations that were processed. It repeats this poll a specified number of times at specified intervals, and then it computes the number of INSERTs, UPDATEs, DELETEs, and COM-

CHAPTER 4 Advanced SharePlex Demonstrations

141

MITs per second that SharePlex posted during that time. The results are printed to screen. Following are instructions for UNIX and Windows systems. UNIX systems Run perf_mon from the util sub-directory of the SharePlex product directory using the following syntax. You can control the frequency and interval of the poll. Syntax: perf_mon.sh #_polls poll_interval where #_polls is the number of times to poll the Post process and poll_interval is the time interval between polls Example: perf_mon.sh 10 5 In this example, the Post process is polled 10 times at 5-second intervals.
Windows systems

Run sp_perf_mon in the Command Prompt from the bin sub-directory of the SharePlex product directory. Use the following syntax. On Windows systems, the poll occurs every second and continues until you kill it with the control+C command. sp_ perf_mon -rport_number where port_number is the SharePlex port number Example: sp_perf_mon -r2100
Note: This script does not work with multiple post queues using the same port.

142

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Demo 2: Demonstrating partitioned replication


This demonstration illustrates a combination of horizontally partitioned replication and vertically partitioned replication, also known as selective row replication and selective column replication. You can use vertically partitioned replication to distribute selected information, such as employee names and locations, while protecting other data, such as personal information or salaries, without separating the data sets into different objects. You can use horizontally partitioned replication to distribute different segments of data to different target systems, such as sales and customer data to the individual stores responsible for it. More information about partitioned replication can be found in Chapter 4 of the SharePlex Administrators Guide.
1 Delete (not TRUNCATE) all rows from the od_employee table on the source system. If the od.config configuration is still active, the cascading delete constraint on the od_salary table activates as a result of the deletes on od_employee. SharePlex

will replicate all of those deletes and remove all rows from both target tables. If the od.config configuration is not active, delete all rows from the source and target od_employee and od_salary tables.
2 To implement horizontally partitioned replication, create a column condition, which

is conditional syntax that directs SharePlex to replicate only certain rows from the source od_employee table, in this case only the rows for the Sales department. To create the column condition, run SQL*Plus on the source system and insert the following into the SHAREPLEX_PARTITION table, substituting for the variables the SHAREPLEX_PARTITION tables owner name, the target system name, and the target database ORACLE_SID. SQL> insert into owner.shareplex_partition (partition_scheme, description, route, target_table_name, ordering, col_conditions) values (sales_partition , Replicate only sales employees , targetsystem@o.target_SID , OD_EMPLOYEE , 1 , EMP_DEPT_NO=1); SQL> COMMIT;
3 To implement vertically partitioned replication, create a new configuration named od.partition on the source system.

sp_ctrl(sysA)> create config od.partition

CHAPTER 4 Advanced SharePlex Demonstrations

143

4 Follow Template 9 to construct the configuration. Vertically partitioned replication is

specified in the configuration file using a column partition, which appears in parentheses after the source object. For this demonstration, you are specifying a column partition that directs SharePlex to replicate all columns in od_employee except for the EMP_DOB and EMP_TIMESTAMP columns. It is permissible for a configuration line to wrap to the next line, as long as you do not press Enter. Notice that, in addition to the column partition, you also are listing a partition scheme instead of a regular routing map, as indicated by the !sales_partition component. The partition scheme is a logical container for one or more column conditions. Normally, you would design your own partition schemes based on your business rules, but for the sake of this demonstration, just one partition scheme named sales_partition is used. You will notice that a line with ! target_host@o.target_SID also is needed. Use the target system name and the target database ORACLE_SID in the syntax. This line is necessary because SharePlex must be able to see the target system name and ORACLE_SID within the configuration file itself. Normally, there are configuration entries for other, non-partitioned tables replicating to the target system, which satisfies this requirement, but in this case there is only one. Template 9: Demonstration configuration od.partition datasource:o.srce_SID owner.od_employee (emp_no, emp_first_name, emp_last_name, emp_dept_no) owner.od_employee !sales_partition ! target_host@o.target_SID
5 Activate the configuration on the source system.

sp_ctrl(sysA)> activate config od.partition


6 Run od_add_emps to populate the od_employee table on the source system. Use a

small value for the IN parameter, since you will be selecting rows for viewing after they are replicated.
7 Select all rows from the target od_employee table. The value for the

EMP_DEPT_NO column should be 1 for all rows. Rows where the value for this column is a value other than 1 were not replicated.

144

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Demo 3: Demonstrating transformation


SharePlex provides the ability to have the Post process call a PL/SQL transformation procedure (routine) instead of applying a SQL operation to the target database. This gives you the ability to manipulate the replicated data first. For example, if the source and target tables are dissimilar in construction as when a persons first and last name are in one column in the source table but in separate columns in the target table you can write a procedure to make the conversion. You can use transformation for other business requirements, as well, such as to convert datatypes, units of measurement, character sets, etc. Transformation routines also can be used instead of database triggers to reduce I/O overhead. When you specify transformation for a table, Post takes no action on the replicated data; it simply passes data values to your procedure. This lets you control the destination of the data after it has been transformed. You can post to the target table and/or you can post to an alternate location. When writing your routine, is your responsibility to include in your procedure the necessary SQL operations to either post the data to the target database or redirect it to an alternate location (or both). In this demonstration, transformation procedures are provided that combine data replicated from two separate source tables, od_employee and od_salary into one target table named od_sales_emp_data.
1 Run ora_cleansp (OraCleanSp on Windows systems) on both systems according to

the instructions in Running ora_cleansp on page 169. This removes the queues from the previous demonstrations and deactivates the previous configuration.
2 DELETE (do not TRUNCATE) all rows from the source and target od_employee

tables. This table has a cascading DELETE constraint that deletes all rows from the dependent od_salary tables. DO NOT delete any rows from the od_department table. This is a look-up table.
3 Grant the demonstration user on the target system privilege to execute the sp_cr package, which was installed in the SharePlex schema during ora_setup.

SQL> grant execute on sp_cr to user_name


4 Log into SQL*Plus on the target system as the user who owns the SharePlex demonstration objects, and run the transform.sql script from the util sub-directory of the SharePlex product directory. This installs the od_transform_employee_insert and

CHAPTER 4 Advanced SharePlex Demonstrations

145

od_transform_employee_update demonstration transformation routines. You are prompted for a schema and tablespace for this procedure and the name of the SharePlex Oracle user. 5 To direct SharePlex to call transformation routines instead of posting the SQL operations, you use the transformation.SID file (where SID is the ORACLE_SID of the

target database). Post checks this file to determine if there is a transformation procedure that it must call. This file was installed with SharePlex in the data sub-directory in the SharePlex variable-data directory. Open this file on the target system in either the vi text editor (UNIX) or WordPad (Windows).
6 Follow Template 10 to create entries in the file, using the target tables and owners.

Separate each column with at least a few spaces or a tab character. Substitute the correct owner names for the owner variables. Template 10: Demonstration transformation.SID file owner.od_employee owner.od_employee owner.od_salary owner.od_salary I U I U owner.od_transform_employee_insert owner.od_transform_employee_update owner.od_transform_employee_insert owner.od_transform_employee_update

7 Follow Template 11 to create a configuration named od.transform on the source system that replicates the od_salary and od_employee tables.

sp_ctrl(sysA)> create config od.transform Template 11: Demonstration configuration od.transform datasource:o.source_SID owner.od_salary owner.od_employee owner.od_salary owner.od_employee target_host@o.target_SID target_host@o.target_SID

8 Activate the configuration.

sp_ctrl(sysA)> activate config od.transform


9 Populate the od_employee and od_salary tables on the source system using the od_add_emps procedure. Use an IN parameter of 10 to create 50 new employees in the od_sales_emp_data table. 10 In SQL*Plus, select all rows from od_sales_emp_data on the target system and

view the transformed data. You will see the following differences due to transformation:

146

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

The EMPLOYEE_NAME column contains the first and last name of the
employee. Compare this to the source od_employee table, where the first and last names are in separate columns.

The DEPARTMENT column contains the department name. Compare this to the
source od_employee table, where the EMP_DEPT_NO column contains a number. The transformation procedure transformed the replicated department number into the department name by referencing the od_department table.

The SALARY column contains the salary from the OD_SALARY table.
11 [OPTIONAL] To see how transformation works for UPDATEs, you can update the od_employee table manually. The od_transform_employee_update procedure

will make the transformation. To further this demonstration, you may construct a transformation procedure for DELETEs.

CHAPTER 4 Advanced SharePlex Demonstrations

147

Demo 4: Demonstrating generic conflict resolution


Conflict resolution is employed in peer-to-peer replication, a replication scenario where users work concurrently on the same data in replica databases, usually on different systems, while SharePlex replicates their changes to keep all databases synchronized. Peerto-peer replication presents challenges that are not found in single-direction replication situations like replicating from a production server to a secondary system for reporting purposes. In those configurations, there is never DML or DDL activity on the database on the secondary system. In peer-to-peer replication, however, all databases are accessed and changed. If the same record in matching (or shadow) tables is changed on different systems at or about the same time, conflicts can occur, and conflict resolution is required. Conflict resolution relies on PL/SQL procedures (called conflict resolution routines) that tell the SharePlex Post process what to do when a row it needs to change (insert, update or delete) was already changed by another user. For example, SharePlex can be directed to give priority to a specific source system or the most recent timestamp, or it can give specific users priority. In an actual production deployment of peer-to-peer replication, you would develop custom conflict resolution routines based on your companys business rules and replication environment.

About this demonstration


Generic conflict resolution allows you to use one PL/SQL procedure to resolve conflicts for multiple tables. The following conflict-resolution strategies are demonstrated:

Timestamp priority This demonstration is based on UPDATEs. Whichever row


was updated LAST takes priority when there is a conflict.

Source-system priority In the following steps, you will define one system as the
trusted source that takes priority in the event of a conflict. This demonstration is based on INSERTs. All INSERTs that originate on the trusted source will override INSERTs from the other system, which is referred to as the secondary system.

148

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

There is no conflict-resolution logic in the demonstration procedure for DELETEs. Instead, SharePlex will write failed DELETE statements to the SID_errlog.sql log and report an error to the Event Log. In addition, information about the statement will be written to the source.exc_table table. To extend this demonstration, you can add conflict-resolution logic for DELETEs to conform to your companys business rules.
Warning! This demonstration is intended to introduce you to the concept of peer-to-peer replication and conflict resolution. Do not use this demonstration as the basis for establishing peer-to-peer replication, and do not use the provided conflict resolution routines as your own. Peer-to-peer replication is not necessarily compatible with all business applications. It requires a thorough understanding of your data, your applications, your business rules, and how conflicts could occur. When suitable for an environment, it requires careful execution, including the creation of custom conflict resolution procedures that can be quite complex. Before you consider deployment of peer-to-peer replication, please read the documentation for establishing this replication strategy in the SharePlex Administrators Guide.

Preparing for the demonstration


1 Shut down SharePlex on both systems.

sp_ctrl(sysA)> shutdown sp_ctrl(sysB)> shutdown


2 Run ora_cleansp (OraCleanSp on Windows systems) on both systems according to

the instructions in Running ora_cleansp on page 169. This removes the queues from the previous demonstrations and deactivates the previous configuration.
3 Delete all rows in the od_employee tables on both systems. DO NOT delete any rows from the od_department table. This is a look-up table for the conflict resolu-

tion procedure.
4 Grant the demonstration user on both systems privilege to execute the sp_cr package, which was installed in the SharePlex schema during ora_setup.

SQL> grant execute on sp_cr to user_name


5 Log into SQL*Plus as the user who owns the SharePlex demonstration objects, and run the p2p.sql script on both systems from the util sub-directory of the SharePlex product directory. This installs the od_employee_gen demonstration conflict reso-

lution routine. You are prompted for a schema and tablespace for this procedure and

CHAPTER 4 Advanced SharePlex Demonstrations

149

the name of the SharePlex Oracle user. You also are prompted for the name of the machine that will be the trusted source machine, which will take priority when conflicts are generated. It does not matter which system you use.

Configuring for conflict resolution


1 To direct SharePlex to call conflict resolution routines when there is a conflict, you use the conflict_resolution.SID file (where SID is the ORACLE_SID of the local

database). Post checks this file to determine if there is a conflict resolution procedure that it must call. This file was installed with SharePlex in the data sub-directory of the SharePlex variable-data directory on each system. Open this file in either the vi text editor (UNIX) or WordPad (Windows).
2 Create an entry as shown in Template 12 in the conflict_resolution.SID file on both systems, using the od_employee table, the correct owner for that table, and the od_employee_gen procedure. Separate each column with a few spaces or a tab.

Template 12: Demonstration conflict_resolution.SID file owner.od_employee IUD owner.od_employee_gen

3 Start SharePlex and sp_ctrl on both systems. 4 In sp_ctrl, set the SP_OPO_GENERIC_CR parameter to 1 on both systems. This

enables the generic conflict resolution capability. sp_ctrl(sysA)> set param SP_OPO_GENERIC_CR 1 sp_ctrl(sysB)> set param SP_OPO_GENERIC_CR 1
5 Once you have set the SP_OPO_GENERIC_CR parameter, you must stop the Post

process and then restart it on both systems in order for the parameter to take effect. sp_ctrl(sysA)> stop post sp_ctrl(sysA)> start post sp_ctrl(sysB)> stop post sp_ctrl(sysB)> start post

150

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

6 Referring to Template 13, create a configuration named od.cr_trusted_src on the trusted source system that replicates the od_employee table on that system to the od_employee table on the secondary system.

sp_ctrl(sysA)> create config od.cr_trusted_src Template 13: Demonstration configuration od.cr_trusted_src datasource:o.trusted_source_SID owner.od_employee owner.od_employee secondary_host@o.secondary_SID

7 Referring to Template 14, create another configuration named od.cr_secondary on

the secondary system that is the opposite of the preceding configuration. It replicates the secondary od_employee table to the od_employee table on the trusted source system. Use the secondary databases ORACLE_SID for the datasource. Use the trusted source systems name for trusted_source_host. Use the trusted source databases ORACLE_SID for trusted_source_SID. Template 14: Demonstration configuration od.cr_secondary datasource:o.secondary_SID owner.od_employee owner.od_employee
8 Activate both configurations.

trusted_source_host@o.trusted_source_SID

sp_ctrl(sysA)> activate config od.cr_trusted_src sp_ctrl(sysB)> activate config od.cr_secondary

Creating conflicts
Use the od_add_emps procedure to initially populate the od_employee table on the trusted source system. SharePlex replicates those changes to the od_employee table on the secondary system, and the two are now synchronized. Now you can create conflicts.

To demonstrate source-system priority


In this demonstration, an INSERT that originates on the trusted source will override an INSERT from the other system.
1 Stop the Post processes on both systems.

CHAPTER 4 Advanced SharePlex Demonstrations

151

2 Insert a row into od_employee on the secondary system, but do not issue the COM-

MIT.
3 Insert the same row on the trusted source, but do not issue the COMMIT. 4 Issue the COMMIT on the secondary system. 5 Issue the COMMIT on the trusted source. This should generate a conflict. 6 Restart the Post processes on both systems.

To demonstrate timestamp priority


In this demonstration, whichever row was updated LAST takes priority when there is a conflict.
1 Stop the Post processes on both systems. 2 Update the EMP_TIMESTAMP column to a different value on each system using

the Primary Key, EMP_NO, to find the row.


3 Wait for the data from each system to replicate to the other system. You will see messages in the queues when you issue the qstatus command from sp_ctrl. The

message count will remain there until the COMMIT is sent. sp_ctrl(sysA)> qstatus sp_ctrl(sysB)> qstatus
4 Issue COMMITs on both systems simultaneously. 5 Start the Post processes on both systems. 6 Verify the results by selecting the rows that were updated from both tables.

Viewing the results of the Conflict Resolution Demonstration


A table named exc_table was installed in the schema that you specified when you ran the installation script. This table has the following columns, which provide information about the conflicts.

152

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

EXC_NO This column is the exception number of the conflict. EXC_TYPE This column is the type of SQL statement, whether INSERT, UPDATE or DELETE. EXC_TARGET_TABLE This column is the table on which the conflict occurred. EXC_FIXED This column describes the results of the conflict resolution routine. YES means that the routine was successful. NO means that the routine failed and the row needs to be manually changed to the correct value. EXC_INFO This column describes what the conflict resolution routine found. EXC_TIMESTAMP This column shows the time that the conflict occurred on this machine.

This concludes the Advanced SharePlex demonstration.

5
Solving Installation Problems
This chapter reviews some common problems that you could experience when installing SharePlex, running the ora_setup program, or starting SharePlex for the first time after installation. Additional help for solving problems with configuration activation, replication processes and other issues after you have configured replication and begun the replication process can be found in the SharePlex Administrators Guide. Contents Read this first... If the UNIX CD will not mount and/or export If the license utility returns errors If the installation program returns errors 160 If Oracle Setup failed If SharePlex does not interact with Oracle If users cannot run sp_cop or sp_ctrl If users cannot issue commands in sp_ctrl

154

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Read this first...


Did you review the Release Notes for this version?
Sometimes there are special installation instructions that supersede or supplement certain instructions in this manual. In addition, there can be known issues for this version that you should be aware of during or after installation. Please read the Release Notes for the version of SharePlex that you are installing before you begin the installation process.

Did you apply all patches?


Sometimes one or more patches are created after the release of a version of SharePlex. To ensure that you received all patches that could contain a fix for installation or other problems, log onto www.quest.com/support and click Download Software from the Quest SupportLink home page. If you do not have a login name and password, contact Quest Technical Support at 949.754.8000.

If the UNIX CD will not mount and/or export


Did you use the correct mounting procedure for your operating system?
On HP (DEC/Compaq) Tru64 systems and Sun Solaris systems not using Volume Manager, the device name must map to the entire CD-ROM. On Tru64 systems, this name usually ends with the letter c. An example would be /dev/rz5c. On Solaris systems not using Volume Manager, it usually ends with the number 2. An example would be /dev/dsk/c0t2d0s2.

CHAPTER 5 Solving Installation Problems

155

If the license utility returns errors


Are all machines connected to the network?
The inability of SharePlex components to perform initial TCP operations can sometimes appear to be license key or license utility errors. If you know you entered the correct key and machine IDs, verify that all systems on which you are loading SharePlex are connected to the network. The network node name and IP address of each system must be established sufficiently to allow SharePlex to perform TCP operations, even though the machines themselves are not yet configured. Also check to make sure that nobody has renamed the /etc/resolv.conf file (if using a DNS nameserver).

Did you enter the correct key and/or machine ID number?


If you received this error message: Cannot add license: License key is illegal, it could be that you entered an invalid license key. Assuming that you retyped the key correctly and still received an error, it probably means that the license key, though valid, is not the correct key for this system. Except for trial keys, which are generic, Quest license keys are assigned to a specific machine according to the machines identification number (such as host ID on Sun systems, machine ID on HP systems, etc.). You probably received at least two license keys from Quest one for a source system and one for a target system or if you are installing on multiple machines in a cluster, you should have a key for each one. Verify that the key you entered is the one that was issued for this system by comparing it to the machine identification number for which it was issued. To view the machine ID and add a key on a Windows system
1 From the Windows desktop, double-click the SpUtils shortcut, then click the License Key tab. 2 Follow the instructions in If you have a license key on page 98 to view the

machine ID and add the key. To view the machine ID and add a key on a UNIX system To view the machine ID on a UNIX system, run the splex_uname script from the install sub-directory in the SharePlex product directory on the machine whose ID num-

156

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

ber you want to confirm. It displays the ID number for the local machine, as shown in the example below. $ /splex/proddir/install/splex_uname
Host ID = 2198894273 (831076C1 HEX)

To add or change a license key on a UNIX system, use splex_add_key. You can install a license for a single UNIX machine, or you can add multiple license keys to all machines in a cluster by running the script only once on the primary node.
1 In sp_ctrl, shut down SharePlex.

sp_ctrl> shutdown
2 Change directories to the install sub-directory of the SharePlex product directory. 3 Run the splex_add_key script to start the SharePlex License Utility. 4 Follow the instructions beginning with step 12 on page 48 to enter the key.

If the installation program returns errors


Is your platform HP 11i?
When installing SharePlex, you may encounter this message: chatr(error): dl_header_ext.size!= sizeof(dl_header_ext). Please update your version of the linker. This is specific to HP 11i. This is not an error, and it does not affect the installation. You may ignore this message.

Is sp_cop shut down?


If you installed SharePlex on this system before, and you are re-installing it, the installation will return errors if SharePlex is running on this system. Shut down SharePlex using the shutdown command in sp_ctrl, or you can shut down the SharePlex service if this is a Windows system. If you are unable to run sp_ctrl, or if any SharePlex processes will not die, locate the process (using ps -ef | grep sp_ on UNIX systems or the special DTaskmgr utility on Windows systems, NOT the regular Windows Task Manager) and kill it. When all SharePlex processes have been killed, run the installation program again.

CHAPTER 5 Solving Installation Problems

157

Did you run splex_install as root?


If you attempt to install SharePlex on a UNIX system as a non-root user, you will get this error message: You must be super user (root) in order to install SharePlex. The installation requires root because it adds SharePlex groups to the /etc/group file and sets the set-user-id to on and the owner of sp_cop to root, which gives SharePlex permission to authorize non-root Oracle users to run SharePlex and sp_ctrl. If you did not install SharePlex as root, log on as root and re-run splex_install. You can change SharePlex to run as non-root after the initial root installation. See Chapter 2 of the SharePlex Administrators Guide for more information.

Are all systems connected to the network?


Check to see that all systems on which you are loading SharePlex are connected to the network. The network node name and IP address of each system must be established sufficiently to allow SharePlex to perform TCP operations, even though the target machines themselves are not yet configured. Note: These failures may appear to be license utility errors, but it is usually the inability of the license utilities and other components of SharePlex to perform initial TCP operations. Also check to make sure that nobody has renamed the /etc/resolv.conf file (if using a DNS nameserver).

Did you enter the SharePlex groups in the name service?


If your environment uses a name service such as NIS or NISPLUS, you need to add the SharePlex groups and services to the nameserver before you run the SharePlex installation program, and the SharePlex Administrator must be named in the spadmin group on the nameserver before you install SharePlex. Instructions are on page 40. If these procedures are not performed, the installation will generate an error at the point in which it attempts to verify that the groups exist.

Is the database open?


The Oracle database for the ORACLE_SID that you will be replicating must be open while you are installing SharePlex.

Did you specify a valid ORACLE_SID and ORACLE_HOME?


If you specify an invalid ORACLE_SID or ORACLE_HOME value for the Oracle instance, the installation script is unable to locate the correct Oracle libraries to link to,

158

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

and it will fail with an error such as this: Cannot find shared library usr1/oracle/ 8.1.6/lib/libclntsh.so; Exiting. Re-run the splex_install script again to provide the correct values for ORACLE_SID and ORACLE_HOME.

Did you receive Failed to run OeInstall error?


On rare occasions, installation on Windows 2000 returns the following error when the Cancel button is pressed during the MKS Platform Components portion of the installation.
Failed to run OeInstall with error = the OE installer process did not return success to not install Oe()

To resolve the problem:


1 Reboot the system. 2 Run the installation program from the SharePlex CD. When you are asked if you want to re-install the MKS Platform components, select Yes, then select Repair at

the prompt shown below.

3 Proceed with the rest of the installation.

CHAPTER 5 Solving Installation Problems

159

If Oracle Setup failed


Is the system running HP-UX?
Look for an /etc/logingroups file on the system. This file existed on HP-UX systems prior to the adaptation of POSIX standards. To allow backward compatibility, HP-UX gives priority to /etc/logingroups, and uses the /etc/group file only if /etc/logingroups does not exist. To resolve the problem, edit the /etc/group file to make its entries identical to those in the /etc/logingroups file, then delete the etc/logingroups file.

Does the instance exist?


The instance containing the data to be replicated must exist before you run ora_setup (OraSetup). It does not need to be populated. If you are using a hot backup method for initial synchronization of your data, it establishes the target instance, and you should run ora_setup when directed by the synchronization procedure. These procedures are in Chapter 6 of the SharePlex Administrators Guide.

Is Oracle running and is the instance open?


Oracle must be running and the instance must be open while you run ora_setup (OraSetup). This program accesses Oracle to establish SharePlex as a user and install its internal tables.

Is sp_cop shut down?


The SharePlex sp_cop process cannot be running while you are running ora_setup (OraSetup). If it is running, shut it down using the shutdown command in sp_ctrl. Run sp_ctrl from the bin sub-directory in the SharePlex product directory. sp_ctrl(sysA)> shutdown

Did you specify the correct ORACLE_SID and ORACLE_HOME?


If you specify an invalid ORACLE_SID and/or ORACLE_HOME for the replication instance, ora_setup (OraSetup) will fail.

160

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Methods for determining the ORACLE_SID


You can view the ORACLE_SID in a few different ways.

On UNIX and Windows systems, you can query the V$PARAMETER table through
SQL*Plus. SQL> select name, value from V$parameter where name = db_name;

On a UNIX system, you can view the oratab file.


HP Tru64, HP-UX and IBM AIX systems $ cd /etc $ more oratab You will see a display similar to this:
ora8:/qa/oracle/ora8/product

Sun Solaris systems On the Solaris platform, the oratab file is typically located in the var/ opt/oracle directory. Sometimes there is an oratab file in the /etc directory as well. If there is an oratab file in the /etc directory, remove, rename or relocate it to prevent problems for SharePlex.

In this example, ora8 is the ORACLE_SID and /qa/oracle/ora8/product is the ORACLE_HOME directory.

On Windows systems, you can view the Windows Registry under


HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE.

Is the Oracle library in $ORACLE_HOME/lib?


On UNIX systems, the ora_setup program expects the Oracle library to be in the $ORACLE_HOME/lib directory. In some environments, the Oracle library has a different name than what SharePlex expects it to be, or it is installed in a different location than expected (or both). In that case, you will see the following error message when you attempt to run ora_setup:
ld.so.1: ./ora_setup: fatal: libclntsh.so.1.0: open failed: No such file or directory. Killed.

SharePlex includes an Oracle library on the SharePlex CD to accommodate platform and OS differences in the location of the Oracle libraries. If you experience problems running ora_setup or SharePlex because of a library issue, install the appropriate library from the CD and then re-start SharePlex (if it is stopped). SharePlex will link to the correct library from that point forward.

CHAPTER 5 Solving Installation Problems

161

Did you receive an ld.so.1: sqlplus: fatal: libsunmath.so.1: can't open file: errno=2 error?
On UNIX systems, this error indicates that ora_setup cannot find the libsunmath and libshareplex libraries, even though the link exists in the proper place. You can use either of these solutions:

Create a softlink for $ORACLE_HOME/lib/libsunmath.so.1 in the /usr/lib directory. or...

In the ECXpert/config/bdg.ini file in the [DB_ENV] section add the following


line: LD_LIBRARYPATH=full oracle home path/lib

Was there an asterisk as the SID entry?


On UNIX systems, some oratab files may have the * (asterisk) symbol instead of a specific entry for the ORACLE_SID of the instance that will be replicated. This causes ora_setup to fail. Make sure a valid ORACLE_SID is in the oratab file.

Are there multiple oratab files (Sun Solaris platforms)?


On Sun systems, the ORACLE_SID and ORACLE_HOME values can be found by viewing the oratab file, which is typically located in the /var/opt/oracle directory. Since other UNIX platforms store the oratab file in the /etc directory, there may be a second oratab in your /etc directory. If there is one, either move, rename or delete it.

What is Oracles set-user-id setting?


To run ora_setup on UNIX systems, the set-user-id for the Oracle software need to be -rwsr-s--x. Those permissions allow non-Oracle users, including ora_setup, to log into SQL*Plus. The ora_setup program uses SQL*Plus to install the SharePlex database objects required for replication.

162

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

If SharePlex does not interact with Oracle


Did you run Oracle Setup for all instances involved in replication?
The ora_setup (OraSetup) program establishes SharePlex as an Oracle user. The SharePlex processes log into Oracle as this user on the source database to activate configurations and maintain the SharePlex internal replication tables, and they log in as this user on the target database to maintain tables there and apply replicated changes to the database through SQL*Plus. To verify that Oracle Setup was performed on all Oracle instances, view the SP_ORD_LOGIN_ and SP_ORD_OWNER_ parameters. There should be an entry for the SharePlex Oracle user and password (encrypted). Use the following command in sp_ctrl: sp_ctrl(sysA)> list param all
Oracle Reader parameters: Parameter Name -----------------------------SP_ORD_CDA_LIMIT SP_ORD_DATE_MSG SP_ORD_DEBUG SP_ORD_DEBUG_FLAG SP_ORD_DELAY_RECORDS SP_ORD_DELAY_TIME SP_ORD_LDA_ARRAY_SIZE SP_ORD_LOG_FILESIZE SP_ORD_LOG_NUMFILES SP_ORD_LOGIN_O.ORA816 Default Value: SP_ORD_OWNER_O.ORA816 Default Value: Actual Value ---------------------------5 0 0x00000000 0x00000000 200 3 5 50000000 3 4e9ad19fed4910ea81 judyd Units Set At ------- -----cdas Restart Live bitflag Live bitflag Live records Live seconds Live logins Restart bytes Restart number Restart Unknown Unknown

You also can verify that ora_setup was performed by querying the database for tables beginning with SHAREPLEX_, and you can check to see if an Oracle account was established for SharePlex. If these items do not exist, shut down sp_cop and follow the instructions for running ora_setup on page 61 (UNIX) or page 97 (Windows).

CHAPTER 5 Solving Installation Problems

163

Did you get an object map error?


If Capture stops and returns errors after an upgrade, look for the following error in the Event Log: 02/09/01 11:07 Notice: sp_ocap(osp) (for o.lob816 queue o.lob816) ORA-00904: invalid column name. 02/09/01 11:07 Error: sp_ocap(osp) (for o.lob816 queue o.lob816) Unexpected Oracle error: ORA-00904: invalid column name. in rom.c:114 In Oracle, issue a DESCRIBE command for the SHAREPLEX_OBJMAP table.

SQL> desc SHAREPLEX_OBJMAP Name Null? ----------------------------------------- -------OBJID START_ACTID END_ACTID DONE

Type -----------------NUMBER NUMBER NUMBER NUMBER

If there is no DONE column, it means that you did not run ora_setup after you installed the SharePlex upgrade and downloaded the patches. Whenever you upgrade, you must run ora_setup again for all instances involved in replication in order for SharePlex to update its Oracle information. To resolve the problem, shut down sp_cop and run ora_setup. After you run ora_setup, start sp_cop and Capture to resume replication.

Did you run ora_setup as a non-root user?


On UNIX systems, you must run ora_setup as non-root. Otherwise, SharePlex will not have the correct permissions to interact with Oracle.

Did you assign a DBA role to the SharePlex Oracle user?


The SharePlex Oracle user requires a DBA role with unlimited privileges. The SharePlex user is created with the default Oracle profile under the assumption that the profile has the unlimited resource privileges assigned by Oracle as the default. If SharePlex is unable to interact with Oracle, check to see if the default was changed. If so, assign SharePlex a DBA role with unlimited privileges for all definitions.

164

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

If users cannot run sp_cop or sp_ctrl


Was SharePlex installed by a root user?
When you install as root on a UNIX system, it sets the set-user-id owner of the SharePlex programs so that Oracle users without root access can run SharePlex and use sp_ctrl.The set-user-id means that the owner of an executable file will be the user of that process when it executes, no matter who actually is running it. (Set-user-id appears in the permissions list in the ls -l listing as s.) SharePlex sets the set-user-id to on and sets the owner of sp_cop to root. In addition, when you install as root, the installation program adds the SharePlex user groups to the /etc/group file. Without the SharePlex groups, sp_ctrl cannot be started, because only the authorized SharePlex users in these groups can run sp_ctrl. You can change SharePlex to run as non-root after the initial root installation. See Chapter 2 of the SharePlex Administrators Guide for more information.

Was the initiating user an authorized SharePlex user?


Only a member of the spadmin group can start sp_cop. A root user that is not a member of spadmin can start sp_cop, but no users (including root) will be able to connect through sp_ctrl to issue commands. To issue commands through sp_ctrl, a user (including root) must be a member of the SharePlex spadmin, spopr or spview group, and sp_cop must be started by a member of spadmin.

Is this a cluster environment?


In order for the SharePlex processes to issue name lookups and migrate properly in a clustered environment (where a package name supersedes the local system name), the SP_SYS_HOST_NAME parameter must be set to the correct package name. In addition, the host name set by this parameter must be the same on all members of the cluster so that the name can bind to a socket and the /etc/hosts file or nameserver can correctly map the parameters value to the correct IP address. Instructions for setting this parameter are on page 53 for UNIX clusters and page 110 for Windows clusters.

CHAPTER 5 Solving Installation Problems

165

Was the filesystem mounted as nosuid?


On UNIX systems, the SharePlex installation script sets the owner of sp_cop to root and then sets the set-user-id bit for owner of the SharePlex programs so that Oracle users without root access can run SharePlex. For SharePlex, the operating system will identify the user of sp_cop as root. This gives SharePlex enough permissions to authorize other users to connect through sp_ctrl. If you cannot issue commands in sp_ctrl even though you are in the appropriate SharePlex group for that command, or if other aspects of SharePlex are not functioning properly, check to see if the filesystem was mounted with the nosuid option. The nosuid option invalidates the effect of setuid and setgid bits on the affected file system, so sp_cop will be unable to run as root as designed and users cannot connect through sp_ctrl. If you are unsure how the filesystem was mounted, check with your Systems Administrator. There are two solutions: a root user can either change the permissions for sp_cop to run as non-root by following the procedure in Chapter 2 of the SharePlex Administrators Guide, or the Systems Administrator can remount the filesystem with nosuid disabled (but this likely will negate the security protection that necessitated using nosuid).

If users cannot issue commands in sp_ctrl


Did you assign them to the SharePlex groups?
Only one SharePlex user, the Administrator who owns the SharePlex binaries and files, is created during SharePlex installation. For other users to start SharePlex and/or issue commands through sp_ctrl, you must assign them to the appropriate SharePlex user groups. Instructions for assigning users to groups on UNIX systems are in page 58. For Windows systems, see page 116.

Do they have the right authorization level for the command?


To issue a specific command (such as activate config or stop export), a user must have that commands authorization level or higher. For example, a SharePlex Administrator (authorization level 1) can issue any command, but a member of the spview group can only issue status commands and a few other commands that do not directly affect the replication processes. Using the table on page 59, make sure you assigned users to the SharePlex group that corresponds to the authorization level you are granting them.

166

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Appendix

SharePlex Tables
The SharePlex ora_setup process installs these objects into the SharePlex tablespace for use by its replication processes. Do not alter them in any way, or replication will be adversely affected. If the SharePlex tables are installed on a locally managed tablespace, the storage parameters will not be set. Default storage values for the SharePlex tables and indices
INTERNAL TABLES INITIAL_EXTENT NEXT_EXTENT MAX_EXTENTS PCT_INCREASE

SHAREPLEX_ACTID SHAREPLEX_ACT_MARKER SHAREPLEX_COMMAND SHAREPLEX_CONFIG SHAREPLEX_DATAEQUATOR SHAREPLEX_DATAEQUATOR_ RESULTS SHAREPLEX_LOBMAP SHAREPLEX_MARKER SHAREPLEX_OBJMAP SHAREPLEX_OOS_KEYS SHAREPLEX_OOS_MASTER SHAREPLEX_PARTITION SHAREPLEX_ROWIDMAP SHAREPLEX_TRANS

tablespace default tablespace default tablespace default tablespace default tablespace default tablespace default 1 MB tablespace default tablespace default tablespace default tablespace default tablespace default 5MB tablespace default

tablespace default tablespace default 0 tablespace default tablespace default 0 tablespace default tablespace default 0 tablespace default tablespace default 0 tablespace default tablespace default 0 tablespace default tablespace default 0 1MB 120 10

tablespace default tablespace default 0 tablespace default tablespace default 0 tablespace default tablespace default 0 tablespace default tablespace default 0 tablespace default tablespace default 0 5MB unlimited 0 tablespace default tablespace default 0

168

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Default storage values for the SharePlex tables and indices


INDICES INITIAL_EXTENT MAX_EXTENTS PCT_INCREASE

SHAREPLEX_LOBMAP_I1 SHAREPLEX_LOBMAP_I2 SHAREPLEX_ROWIDMAP_I1 SHAREPLEX_ROWIDMAP_I2 SHAREPLEX_ROWIDMAP_I3

1MB 1MB 5MB 5MB 5MB

1MB 1MB 5MB 5MB 5MB

120 120 unlimited unlimited unlimited

10 10 0 0 0

Appendix

Running ora_cleansp
The ora_cleansp utility removes the current replication state on a system, including deactivating configurations. This can be acceptable in a test or demonstration environment, but it rarely is appropriate in a production environment. Unless a documented procedure or demonstration requires running ora_cleansp (OraCleanSp on Windows systems), contact Quest Technical Support for assistance before running this utility for the first time. There are other alternatives to running ora_cleansp.

How ora_cleansp works


Ora_cleansp works in two stages to restore replication to an initial state, as follows: Ora_cleansp first truncates all of the SharePlex internal tables, except for the SHAREPLEX_PARTITION table, which contains partition schemes that might be needed again. It does not remove the SharePlex Oracle user, password, or demonstration objects.

After the tables are truncated, ora_cleansp removes the following components from the SharePlex variable-data directory:

the queue files in the rim sub-directory. the log files in the log sub-directory. The Commands and Event logs each retain one
entry reflecting the outcome of the ora_cleansp procedure.

the contents of the statusdb file in the data sub-directory. the contents of the dump and state sub-directories.
Ora_cleansp preserves user-created files such as configuration files, conflict-resolution files, transformation files, hint files, the paramdb, and the oramsglist file. Ora_cleansp deactivates configurations. To start replication after running ora_cleansp, you must activate a configuration.

170

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Other alternatives to ora_cleansp


To stop activity for a configuration without truncating the SharePlex tables and
restoring replication to an initial state, you might be able to use the abort config or purge config command in sp_ctrl. For more information about these commands, see the SharePlex Reference Manual.

To truncate the SharePlex tables without purging files in the variable-data directory,
you can run the cleanup.sql script (from the bin sub-directory of the product directory on UNIX systems or the util sub-directory of the product directory on Windows systems).

On UNIX systems, you can purge the files in the variable-data directory without
truncating the SharePlex tables by running the clean_vardir.sh script from the bin sub-directory of the SharePlex product directory.
Important! Ora_cleansp must be run on all source and target systems to restore replication to an initial state. To verify if and when ora_cleansp was run on a system, view the Commands Log or Event Log on that system.

Before running ora_cleansp


1 [UNIX ONLY] Change shells to the ksh shell. 2 Log on as a SharePlex Administrator. 3 [UNIX ONLY] Set the SP_SYS_VARDIR environment variable to point to the SharePlex variable-data directory. If you are running multiple instances of sp_cop using

multiple variable-data directories, set SP_SYS_VARDIR for the variable-data directory that you want to restore.
ksh shell:

$ export SP_SYS_VARDIR=/SharePlex_vardir_absolute_path
csh shell:

$ setenv SP_SYS_VARDIR /SharePlex_vardir_absolute_path


4 Run sp_ctrl from the bin sub-directory of the SharePlex product directory.

APPENDIX B Running ora_cleansp

171

5 Shut down sp_cop.

sp_ctrl> shutdown
6 Verify that all SharePlex processes are stopped by using either the ps -ef | grep sp_ command on UNIX systems or DTaskmgr on Windows systems. 7 Kill all orphan SharePlex processes by using either the kill -9 command on UNIX systems or the KillSharePlex.bat program on Windows systems. 8 [UNIX ONLY] If you have not done so already, view the oratab file to determine the val-

ues for ORACLE_HOME and ORACLE_SID for the instance. $ cd /etc $ more oratab
9 [UNIX ONLY] Set the ORACLE_HOME and ORACLE_SID environment variables. ksh shell:

$ export ORACLE_HOME=[value from oratab file] $ export ORACLE_SID=[value from oratab file]
csh shell:

$ setenv ORACLE_HOME [value from oratab file] $ setenv ORACLE_SID [value from oratab file]
10 Run ora_cleansp using one of the following methods, depending on the platform.

Running ora_cleansp on a UNIX system


1 Change directories to the bin sub-directory of the SharePlex product directory (this must be the current working directory), and run ora_cleansp with the SharePlex Oracle user account and password. When run as a different user, ora_cleansp

does not truncate the SharePlex tables. $ ./ora_cleansp SharePlex_username/SharePlex_password


Tip: To find out the name of the SharePlex account, use the following command:

$ cat SharePlex_variable_data_directory/data/paramdb | grep SP_ORD_OWNER. You will see a display similar to this: SP_ORD_OWNER_O.oraA jdadd.

172

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0


The first component after the dot is the ORACLE_SID (oraA in the example). The second component is the Oracle account name (jdadd in the example). 2 View the Event Log after you run the utility to confirm its results.

Note: The utility might generate an error message stating that it cannot remove the .../ save_SharePlex_version directory. You can remove this directory.

Running OraCleanSp on a Windows system


1 Double-click the SpUtils desktop shortcut.

Or... Navigate to the bin sub-directory of the SharePlex product directory, then doubleclick the SpUtils program icon.

APPENDIX B Running ora_cleansp

173

2 In the SharePlex Utilities dialog box, click the OraCleanSp tab.

3 In the Port list box, select the port number for the instance of SharePlex for which you are running OraCleanSp. 4 Under SharePlex User Info, enter the following information.

In the User text box, type the name of the SharePlex Oracle user for the designated
instance of SharePlex. OraCleanSp must run as the SharePlex Oracle user.

In the Password text box, type the password for the SharePlex user. In the Oracle SID text box, type the ORACLE_SID of the Oracle instance for
which you are running OraCleanSp.
5 Click Clean to execute OraCleanSp. Processing progress is displayed in the text box

at the bottom of the dialog box.


6 Click Close to close the dialog box.

174

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Appendix

Removing SharePlex
This appendix provides separate instructions for removing SharePlex from UNIX and Windows systems.

Removing SharePlex from a UNIX system


To remove SharePlex from a UNIX source or target system, use either of the following procedures, depending on whether or not SharePlex is running as a root user. Use one of these procedures only if a system no longer will be used for replication or if you are directed to use it by Quest Technical Support or a documented procedure. Installing a SharePlex upgrade or reinstalling the software without un-installing it preserves existing data files. Before you upgrade or re-install SharePlex, see the Release Notes for the version you are installing to familiarize yourself with any special installation requirements.

Removing SharePlex when it is running as root


To remove SharePlex when it is running as a root user, use the splex_remove script. This script removes the following components.

The SharePlex product and variable-data directories, including user-created files


such as configuration files, conflict-resolution files, and hints files.

The SharePlex marker file (/var/adm/.splex/Shareplex.mark).


This script does not remove the SharePlex internal tables, their indices, or other SharePlex database objects. Use standard Oracle methods to remove those objects.

176

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

To run splex_remove
1 Log on as root. 2 Shut down SharePlex.

sp_ctrl(system:port)> shutdown
3 Use the following command to make certain that no other users are running SharePlex and that no SharePlex processes are running, including sp_cop.

# ps -ef | grep sp_


4 If any SharePlex processes are running, shut them down or use the UNIX kill com-

mand to kill them.


5 Change directories to the install sub-directory of the SharePlex product directory.

# cd /product_dir/install
6 Run the splex_remove script. You are prompted to wait while the SharePlex files

are removed, and then you are prompted for the Oracle version for which you are removing SharePlex. # . splex_remove Please wait while moving required files to /tmp Select the version of Oracle for which you are removing SharePlex: a) 8.1.7 b) 9.2.0 c) 10.1 Enter the version (a, b, or c):
7 Type either a, b, or c and then press Enter. You are prompted to confirm that you

want to remove SharePlex. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! YOU ARE ABOUT TO REMOVE SHAREPLEX. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SharePlex will be removed from your system. ---------------------------------------------------Are you sure you want to continue [y/n]?

APPENDIX C Removing SharePlex

177

8 Type y, then press Enter to continue the removal procedure. You are notified that

SharePlex has been removed from the system. Please wait while removing files..... ORAVER=n Removing Groups and Users from the system. Done !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9 Change directories to a different directory to get out of the current directory, which

has been removed and no longer is recognized by the operating system.


10 Use standard Oracle procedures to remove the SharePlex user and schema from the

database.

Removing SharePlex when it is not running as root


To remove SharePlex when it is not running as a root user, you must remove the SharePlex programs and files manually. You cannot use the splex_remove script, because it runs as root. To remove SharePlex, follow these steps.
1 Log on as root. 2 Shut down SharePlex.

sp_ctrl(system:port)> shutdown
3 Use the following command to make certain no other users are running SharePlex and that no SharePlex processes are running, including sp_cop.

# ps -ef | grep sp_


4 If any SharePlex processes are running, shut them down or use the UNIX kill com-

mand to kill them.


5 As the spadmin user, remove the SharePlex product and variable-data directories. 6 As the spadmin user, drop the SharePlex user and database objects from the data-

base.
7 As the spadmin user, remove the /var/adm/.splex directory. 8 As root, remove the spadmin, spopr, spview groups from /etc/group file.

178

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Removing SharePlex from a Windows system


Overview of the removal process
Removing SharePlex from a Windows system involves the following procedures.

Shutting down the SharePlex service. Removing the SharePlex software and system files. Removing the NuTCRACKER operating environment. Manually removing files that are not removed by the uninstaller. Manually removing the SharePlex user and database objects.

Files removed by the uninstall program


When SharePlex was installed, a file named install.log was installed in the SharePlex product directory. This file contains a record of all files created on the system by the installation program. When you run the uninstall program to remove SharePlex, it reads install.log to determine which files to remove. The following components are removed by the automatic uninstall option of the uninstall program for all instances of SharePlex (all SharePlex services on all ports).

The SharePlex Registry entries. The SharePlex desktop icons. The SharePlex menu items (except for the top-level Program Manager Group
folder).

The SharePlex product directory.


The uninstall program also contains a custom uninstall option that enables you to selectively remove files.

Files not removed by the uninstall program


The uninstall program does not remove the following components.

Files that already existed on the system when the current version of SharePlex was
installed.

APPENDIX C Removing SharePlex

179

Files created by SharePlex or a user in the product or variable-data directory after the
current version of SharePlex was installed. Such files can be removed manually after SharePlex is removed. This is standard procedure for most Windows applications.

The SharePlex variable-data directory. To remove this directory, delete it through the
operating system. The uninstall program does not remove this directory because there could be user-created files, such as configuration files and custom parameter settings, that you want to keep for a future installation of SharePlex.

To remove the SharePlex service


Before you remove the SharePlex software from the system, follow these steps to stop and remove each SharePlex service on the system.
1 Double-click the SpUtils desktop icon. 1 Click the SharePlex Services tab. 2 In the Port list box, select the port number for the SharePlex instance that you want

to remove.
3 Under SharePlex Service Status, click Stop. 4 Click Apply to stop the service. The Current State field displays the status. 5 [FOR MULTIPLE SHAREPLEX SERVICES] While in the SharePlex Services dialog box, repeat

the preceding steps to stop each SharePlex service.


6 After the SharePlex service stops, click Remove. 7 Click Apply to remove the services key from the Registry. 8 [FOR MULTIPLE SHAREPLEX SERVICES] While in the SharePlex Services dialog box, repeat

steps 6 and 7 for all SharePlex services to remove their Registry keys.
9 Click Close to close the SharePlex Service dialog box.

To remove the SharePlex software and system files


1 From Start menu, click Programs, then navigate to the SharePlex program folder and click Uninstall.

Or...

180

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Use the Add/Remove Programs tool in the Windows Control Panel.


2 In the Select Uninstall Method dialog box, select an uninstall option.

Select Automatic to remove everything listed in Files removed by the uninstall


program on page 178. This is the recommended procedure because it is the cleanest way to remove SharePlex from the system. Or...

Select Custom to selectively remove files. Use this option only if you must retain
some files while deleting others. Or...

Select Repair to re-install files or update Registry entries. This option might
require the original SharePlex installation CD if the installation files are not available.
3 Click Next to continue. You are prompted based on the uninstall option that you selected. Follow the remaining steps for the option that you selected, either Automatic uninstall, Custom uninstall, or Repair.

APPENDIX C Removing SharePlex Automatic uninstall In the Perform Uninstall dialog box, click Finish to complete the uninstall, or click Back to perform a custom uninstall.

181

The automatic uninstall finishes and exits.

182

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0 Custom uninstall

In the Select Private Files to Remove dialog box, select the files that you want to
remove by clicking them. To deselect a file, click it again. Or...

Select all of the files by clicking the Select All button. This has the same effect as if
you had selected the Automatic uninstall option.

To clear your selections and start selecting files over again, click Select None.

4 Click Next to continue. 5 For the next series of dialog boxes, use the same procedure as before to select com-

ponents to be removed. Remaining component types for which you can make selections are:

Directories. INI files to remove. INI files to edit back to the way they were before SharePlex was installed. Registry keys to remove. Registry trees to remove.

APPENDIX C Removing SharePlex

183

Registry keys to edit back to the way they were before SharePlex was installed. Sub-systems to remove.
6 In the Perform Uninstall dialog box, click Finish to begin the uninstall process, or click Back to change any of your selections. The removal process finishes and exits.

Repair In the Perform Repair dialog box, click Finish. The repair function detects items needing repair and performs the repair automatically.

To remove the NuTCRACKER operating environment


1 From the Start menu, click Settings, then click Control Panel. 2 In the Control Panel dialog box, double-click Add/Remove Programs. 3 In the Add/Remove Programs dialog box, highlight MKS Platform Components. 4 Click Change/Remove. 5 Search the Registry to ensure that any Mortice Kern Systems, MKS and Data Focus entries from HKEY_LOCAL_MACHINE\Software are removed. If you locate any

such entries, remove them.

184

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

Important! If you intend to reinstall SharePlex or NuTCRACKER, it will not reinstall unless these Registry entries are removed.

Warning! Do not add, change or remove Registry entries unless you are familiar with the functionality of the Registry and the Windows platform. Errors when changing Registry settings can adversely affect the operation of the software or the system itself. If you are not familiar with the Registry, consult your System Administrator for assistance.

To remove the SharePlex user and database objects


To remove the SharePlex user and database objects from the Oracle instance, use standard Oracle methods for removing users and objects. See Oracles documentation for instructions if needed.

CHAPTER D How SharePlex Works

185

Symbols .profile file 54 .splex directory 52 /etc directory 23, 161 /etc/group file 58, 116 /etc/resolv.conf file 11, 155, 157 /etc/system file 31, 32, 38 /sbin/sysconfigdb 35 /stand/vmunix 30 /var/adm/.splex directory 52, 53 /var/adm/.splex/Shareplex.mark 12 /var/opt/oracle directory 23, 161 A access to sp_ctrl, controlling 58, 116 adding alias for cluster name 54, 86 for non-alphanumeric host name 11, 76 license key Windows cluster 85 Windows system 97 SharePlex account in database UNIX systems 61 Windows systems 99 SharePlex users UNIX systems 58 Windows systems 116 addressing, in cluster 54, 85 administrator, SharePlex 59, 116 advantages of SharePlex 2 AIX, see IBM AIX alias for cluster name UNIX 54 Windows 86 for non-alphanumeric host names UNIX 11 Windows 76

186

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

alphanumeric host name 11, 76 authorization levels, assigning UNIX systems 58 Windows systems 116 B bin sub-directory 56 binaries, version-specific 23, 24 C chaining, replication implications 25, 82 Changing Global Settings in the MKS Toolkit 107 cluster SharePlex variable-data directory for 17, 18 cluster environments package name UNIX cluster 54 Windows cluster 86 post-installation instructions UNIX 53 Windows 110 pre-installation instructions Windows 85 command authorization levels, assigning UNIX 58 Windows 116 configurable parameters, UNIX 28 Conflict Resolution Demonstration 147 connections TCP/IP 14, 75 cost-based optimizer, and SharePlex tables 25, 82

CHAPTER D How SharePlex Works

187

D database cluster variable-data directory 17, 18 creating SharePlex account 61 objects SharePlex 167 datasource, definition 123 DBA privileges for SharePlex 21, 61, 80, 99 default index tablespace 26, 83 NuTCRACKER folder 74 port number UNIX systems 14 Windows systems 75 set-user-id for Oracle 22 SharePlex Administrator 27, 84 SharePlex Oracle user 21, 80 storage SharePlex tablespace 25, 82 SHAREPLEX_LOBMAP table 25, 82 SHAREPLEX_ROWIDMAP table 25, 82 temporary tablespace 26, 83 Windows installation directory 76 demonstration license 27, 84 demonstrations advanced 133 basic 119 directories SharePlex product directory 17, 76 SharePlex variable-data 18, 77 DNS nameserver 11, 155, 157 E environment parameters, for cluster 54, 111 ERP environments 2 EXC_TABLE table 151

188

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

F file entering license key from 27 SharePlex marker 12 files, setting number of open 12 firewall ports 14, 75 floating IP address, alias for 54, 86 G gethostname system call 54, 110 global cluster package name UNIX cluster 54 Windows cluster 85 grants to replicate 9i or 10g DDL 21, 80 H hard limit for file descriptors 12 host name in cluster 54, 85 non-alphanumeric 11, 76 hot backup, Oracle 22, 79 HP Tru64 preinstallation procedure 34 setting system file descriptors 12 HP-UX preinstallation instructions 28 setting system file descriptors 12 I IBM AIX preinstallation procedure 39 setting system file descriptors 12 Import process (service) 127 index tablespace for SharePlex 26, 83 indices, for SharePlex tables 167 install directory 51, 156

CHAPTER D How SharePlex Works installation checklist UNIX systems 9 Windows systems 73 cluster UNIX post-installation 53 Windows post-installation 110 Windows pre-installation 85 instructions UNIX systems 7 Windows systems 87 preinstallation requirements HP-UX 28 nameserver 40 Solaris 31 problem solving 153 internal tables, SharePlex altering 62 installing 61 storage parameters 167 IP address in cluster 54, 85 K kernel configuration HP Tru64 34 HP-UX 28 Red Hat Linux 38 Sun Solaris 31 L large objects, replicating 25, 82 libraries links in /var/adm directory 12 problems with 160, 161

189

190

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

license key adding Windows cluster 85 Windows system 97 demonstration 27, 84 verifying for UNIX cluster 56 viewing on UNIX system 51 Linux preinstallation procedures 37 lmt_setup.sh script 68, 104 LOBs, replicating 25, 82 LOG_PARALLELISM parameter, checking value 24, 81 M machine name in cluster 54, 85 non-alphanumeric 11, 76 resolving 76 marker file, SharePlex 12, 52 memory requirements for SharePlex 11 MKS 74 MKS Toolkit changing Global Resources setting 96, 107 Mortice Kern Systems 74 N nameserver non-alphanumeric machine name 11, 76 preinstallation instructions 40 network requirements for installation 11 SharePlex port for 14, 75 solving related installation problems 155, 157 using SSH 14, 75 NFS installation for SharePlex 42 nofiles value 12 nosuid-mounted filesystem 10

CHAPTER D How SharePlex Works

191

O objects locating for replication 81 SharePlex 167 operator 59, 117 optimizer, and SharePlex tables 25, 82 ora_cleansp how to run 169 in conflict-resolution demo 148 in transformation demo 144 ora_setup and EXTSHM environment variable 39 ora_setup (OraSetup) UNIX systems 61 Windows 99 Oracle 9i-supported DDL 21, 80 client 78 creating SharePlex account UNIX systems 61, 99 Windows systems 99 hot backup to synchronize data 22, 79 libraries 160 location problems 161 Name Server use with SharePlex 26 optimizer and SharePlex tables 25, 82 SharePlex account UNIX systems 21, 61 Windows systems 80, 99 version 9.2.x and SharePlex port number 14, 75 ORACLE_HOME 23 determining 23, 160 ORACLE_SID 81, 159 determining 160 of database instance 23 oratab file 62, 160 P page file size on Windows 74

192

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

parameter for SharePlex port number 15 parameters file 98 for cluster UNIX 54 Windows 111 password for SharePlex UNIX systems 61 Windows systems 99 peer-to-peer replication 147 per process memory requirements 11 perf_mon.sh script 126, 140 permissions to run as non-root 10 port number UNIX systems 14 Windows systems 75 Preinstallation Checklist 9, 73 privileges in Oracle for SharePlex 21, 80 limiting users 58, 116 problems with installation 153 product directory, description 17, 76 programs group for SharePlex 94 R raw devices 17, 18 read privileges 21, 80 redo logs 19, 21, 27, 80, 84 removing SharePlex from UNIX system 175 from Windows system 178 replication demonstrations advanced 133 basic 119 purpose and advantages of 2 rim sub-directory 77

CHAPTER D How SharePlex Works role for SharePlex in Oracle 21, 80 root changing SharePlex permissions from 10 installing and running as 10 routing map 123 row chaining, implications for replication 25, 82 S sam 28 sample_config configuration 125 schema, SharePlex 21, 80 security controlling sp_ctrl access 58, 116 enabling on Windows systems 74 for network connections 14, 75 semaphores, SharePlex requirements HP Tru64 systems 34 HP-UX 28 per process setting 11 Red Hat Linux 38 Sun Solaris 31 semmni parameter 31, 34, 38 semmns parameter 31, 38 semmnu parameter 28, 31, 38 semmsl parameter 31, 34, 38 semopm parameter 34, 38 semume parameter 31, 34, 38 service, SharePlex 104 set-user-id of SharePlex 22 shared memory, SharePlex requirements HP Tru64 systems 34 HP-UX 28 Red Hat Linux 38 Sun Solaris 31 shared variable-data directory 77

193

194

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

SharePlex Administrator 14, 27, 59, 84, 117 advantages 2 binaries for Oracle versions 23, 24 groups adding to nameservers 40 assigning users 58, 116 installation instructions UNIX systems 7 Windows systems 71 license key entering 48, 98 viewing on UNIX 51 marker file 12 operators 59, 117 Oracle account UNIX systems 61, 99 Windows systems 99 per process memory for 11 port number UNIX systems 14 Windows systems 75 product directory 17, 90 programs group 94 queues 77, 127 removing from UNIX system 175 from Windows system 178 running as non-root 10 service removing 178 Status Database 129 tables minimizing contention 26, 83 sizing 25, 82 storage and descriptions 167 uninstalling UNIX 175 Windows 178 users and groups 58, 116 variable-data directory 18, 77

CHAPTER D How SharePlex Works viewers 59, 117 SHAREPLEX_ACT_MARKER table 167 SHAREPLEX_ACTID table 167 SHAREPLEX_COMMAND table 167 SHAREPLEX_CONFIG table 167 SHAREPLEX_DATAEQUATOR table 167 SHAREPLEX_DATAEQUATOR_RESULTS table 167 SHAREPLEX_LOBMAP table 167 SHAREPLEX_MARKER table 167 SHAREPLEX_OBJMAP table 167 SHAREPLEX_OOS_KEYS 167 SHAREPLEX_OOS_MASTER 167 SHAREPLEX_PARTITION table 167 SHAREPLEX_ROWIDMAP table 25, 82, 167 SHAREPLEX_TRANS table 167 shmmax parameter 29, 31, 34, 38 shmmin parameter 31, 38 shmmni parameter 31, 38 shmseg parameter 31, 38 shortcuts, in Program Manager 94 soft limit for file descriptors 12 Solaris, see Sun Solaris sorts, tablespace for 26, 83 source instance 120 objects, definition 123 source-system priority 147 sp_cop definition 10 port number 14, 75 running as non-root 10 set-user-id 10 shell for running 19 starting on UNIX systems 121 starting on Windows systems 121 SP_COP_TPORT parameter 15 SP_COP_UPORT parameter 15 Sp_Copsrv.exe 104

195

196

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

sp_ctrl controlling access 58, 116 setting a default port number 106 starting UNIX system 121 Windows system 114 SP_QUE_SYNC parameter 55, 110 SP_SYS_HOST_NAME parameter 54, 110 SP_SYS_VARDIR parameter 54, 110 spadmin group assigning 59, 117 available commands for 59, 117 installing on NIS 40 SpClient, installation 91 splex default user 120 splex_get_key 51 splex_remove script 176 spopr group assigning 59, 117 available commands for 59, 117 installing on NIS 40 spview group assigning 59, 117 available commands for 59, 117 installing on NIS 40 SQL*Plus, and ora_setup 22 SSH software using with SharePlex 14, 75 Status Database 129 storage SharePlex objects 167 storage parameters for SharePlex objects 167 Sun Solaris preinstallation instructions 31 setting system file descriptors 12 superuser 42, 44, 45 symbolic links to /var/adm/.splex directory 53 sysconfigdb command 34 sysdef command 32 system file descriptors, setting 12

CHAPTER D How SharePlex Works

197

T tables containing more than 255 columns 104 SharePlex internal 167 tablespace index 26, 83 privileges 21, 80 temporary 26, 83 target database 129 objects, definition 123 temporary tablespace for SharePlex 26, 83 test machine, installing on 73 timestamp priority 147 transformation.SID file 145 troubleshooting installation 153 U ulimit setting 12 umask setting 11 uninstalling SharePlex UNIX system 175 Windows system 178 upgrading database 20, 79 SharePlex 8, 72 user SharePlex creating on UNIX systems 61, 99

198

SHAREPLEX FOR ORACLE Installation and Demonstration Guide Version 5.3.0

V variable-data directory creating UNIX systems 18 Windows systems 77 location in a cluster 17, 18 on cluster Windows 77 size and location 18 versions of SharePlex binaries 23, 24 vi editor 123 viewer 59, 117 Volume Manager 10, 154 W Windows determining ORACLE_SID 160 installing SharePlex 71 page file size 74 partition requirements 74 SharePlex requirements 73 uninstalling SharePlex from 178

You might also like