spo install guide530

210
SharePlex ® For Oracle Installation and Demonstration Guide Version 5.3.0

Upload: sdohn

Post on 24-Apr-2015

109 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: SPO Install Guide530

SharePlex® For OracleInstallation andDemonstration GuideVersion 5.3.0

SP_INST_DEMO_GD.book Page i Friday, March 17, 2006 5:59 PM

Page 2: SPO Install Guide530

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

WarrantyThe 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 dam-age alleged in connection with the furnishing or use of this information.

TrademarksSharePlex®, LiveReorg®, and SpotlightTM are trademark(s) of Quest Software, Inc. Other trademarks and reg-istered trademarks used in this guide are property of their respective owners.

World Headquarters5 Polaris WayAliso Viejo, CA 92656www.quest.come-mail: [email protected]. 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

SP_INST_DEMO_GD.book Page ii Friday, March 17, 2006 5:59 PM

Page 3: SPO Install Guide530

SP_INST_DEMO_GD.book Page iii Friday, March 17, 2006 5:59 PM

Table of ContentsAbout this manual

Viewing this manual in PDF format ........................................................................................... viiiConventions used in this manual .................................................................................................. ixAbout Quest Software................................................................................................................... xi

Introduction: Welcome to SharePlex

The advantages of SharePlex for Oracle........................................................................................ 2Strategies for information availability ........................................................................................... 4

Chapter 1: UNIX Installation and Setup

UNIX installation overview........................................................................................................... 8UNIX Preinstallation Checklist ..................................................................................................... 9Preinstallation procedure for HP-UX environments.................................................................... 28Preinstallation procedure for Sun Solaris environments.............................................................. 31Preinstallation procedure for HP Tru64 environments ................................................................ 34Preinstallation procedures for Red Hat Linux ............................................................................. 37Preinstallation procedure for AIX................................................................................................ 39Preinstallation procedure for nameserver environments ............................................................. 40Installation of SharePlex for Oracle............................................................................................. 41Post-installation procedures for UNIX cluster environments...................................................... 53Assigning SharePlex users and authorization levels.................................................................... 58Establishing SharePlex as an Oracle user .................................................................................... 61

Chapter 2: `Windows Installation and Setup

Windows installation overview ................................................................................................... 72Windows Preinstallation Checklist .............................................................................................. 73Pre-installation instructions for Windows cluster environments ................................................. 85

Page 4: SPO Install Guide530

iv SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page iv Friday, March 17, 2006 5:59 PM

Running the installation program................................................................................................. 87Adding the license key................................................................................................................. 97Establishing SharePlex as an Oracle user .................................................................................... 99Installing the SharePlex service ................................................................................................. 104Changing Global Settings in the MKS Toolkit .......................................................................... 107Post-installation procedures for Windows cluster environments............................................... 110Assigning SharePlex users and authorization levels.................................................................. 116

Chapter 3: Basic SharePlex Demonstrations

Starting SharePlex ..................................................................................................................... 121Creating and activating a configuration .................................................................................... 123Testing replication ..................................................................................................................... 125

Chapter 4: Advanced SharePlex Demonstrations

Installing the demonstration objects .......................................................................................... 134Demo 1: Initial demonstration.................................................................................................... 136

Starting SharePlex...................................................................................................................... 136Creating the configuration ......................................................................................................... 137Verifying and activating the configuration ................................................................................ 138Verifying synchronization.......................................................................................................... 139Demonstrating performance....................................................................................................... 140

Demo 2: Demonstrating partitioned replication ....................................................................... 142Demo 3: Demonstrating transformation ................................................................................... 144Demo 4: Demonstrating generic conflict resolution................................................................ 147

About this demonstration ........................................................................................................... 147Preparing for the demonstration................................................................................................. 148Configuring for conflict resolution ............................................................................................ 149Creating conflicts ....................................................................................................................... 150Viewing the results of the Conflict Resolution Demonstration ................................................. 151

Chapter 5: Solving Installation Problems

Read this first... .......................................................................................................................... 154If the UNIX CD will not mount and/or export........................................................................... 154If the license utility returns errors .............................................................................................. 155If the installation program returns errors ................................................................................... 156

Page 5: SPO Install Guide530

TABLE OF CONTENTS v

SP_INST_DEMO_GD.book Page v Friday, March 17, 2006 5:59 PM

If Oracle Setup failed..................................................................................................................159If SharePlex does not interact with Oracle .................................................................................162If users cannot run sp_cop or sp_ctrl..........................................................................................164If users cannot issue commands in sp_ctrl .................................................................................165

Appendix A: SharePlex Tables ........................................................................................167

Appendix B: Running ora_cleansp .................................................................................169

How ora_cleansp works..............................................................................................................169Other alternatives to ora_cleansp ...............................................................................................170Before running ora_cleansp........................................................................................................170Running ora_cleansp on a UNIX system ...................................................................................171Running OraCleanSp on a Windows system..............................................................................172

Appendix C: Removing SharePlex .................................................................................175

Removing SharePlex from a UNIX system................................................................................175Removing SharePlex from a Windows system ..........................................................................178

Page 6: SPO Install Guide530

vi SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page vi Friday, March 17, 2006 5:59 PM

Page 7: SPO Install Guide530

ABOUT THIS MANUAL vii

SP_INST_DEMO_GD.book Page vii Friday, March 17, 2006 5:59 PM

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 Share-Plex Administrator’s 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.

Page 8: SPO Install Guide530

viii SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page viii Friday, March 17, 2006 5:59 PM

Viewing this manual in PDF formatThis 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-refer-ence 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.

Page 9: SPO Install Guide530

ABOUT THIS MANUAL ix

SP_INST_DEMO_GD.book Page ix Friday, March 17, 2006 5:59 PM

Conventions used in this manualThe following typographic conventions are used in this manual.

Command-line syntax is expressed in Arial Narrow. The following explains the syn-tax 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.

Page 10: SPO Install Guide530

x SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page x Friday, March 17, 2006 5:59 PM

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 sys-tem (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 refers you to related documentation for more information.

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

Page 11: SPO Install Guide530

ABOUT THIS MANUAL xi

SP_INST_DEMO_GD.book Page xi Friday, March 17, 2006 5:59 PM

About Quest SoftwareQuest Software, Inc. delivers innovative products that help organizations get more per-formance 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 enter-prise IT. Quest Software, headquartered in Alis Viejo, Calif., can be found in offices around the globe and at www.quest.com.

Contacting Quest SoftwarePhone: 949-754-8000

Email: [email protected]

Mail: Quest Software, Inc.World Headquarters5 Polaris WayAliso Viejo, CA 92656USA

Web site: www.quest.com

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

Contacting Customer SupportQuest 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: [email protected]

Phone: 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

Page 12: SPO Install Guide530

xii SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page xii Friday, March 17, 2006 5:59 PM

Page 13: SPO Install Guide530

Introduction

SP_INST_DEMO_GD.book Page 1 Friday, March 17, 2006 5:59 PM

Welcome to SharePlex

This chapter explains the advantages of SharePlex for Oracle.

Contents

The advantages of SharePlex for Oracle Strategies for information availability

Page 14: SPO Install Guide530

2 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 2 Friday, March 17, 2006 5:59 PM

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

Maintains up-to-date, accessible target instancesA major benefit of SharePlex replication is that users can access a replica (target) data-base while SharePlex updates it. SharePlex target instances are continuously updated, providing a reliable copy of the production instance that can be used for reporting, que-ries, extracts, backups, and high availability. Removing that processing from the pro-duction 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 cor-ruption, such as block corruption.

Designed for high-intensity OLTP and ERP environmentsSharePlex for Oracle is designed for business volumes of data. It is capable of replicat-ing 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 resourcesSharePlex for Oracle accomplishes its replication without significantly impacting the source instance, the source system, or the network. Its log-based design allows it to rep-licate with very low overhead.

Replicates with both speed and accuracySharePlex for Oracle is fast, minimizing the latency between source and target instances by capturing modifications to selected objects from the redo logs continuously and start-ing replication before transactions are committed. If a transaction is cancelled, Share-Plex replicates the rollback so that the target instance is an accurate representation of the source database.

Page 15: SPO Install Guide530

INTRODUCTION 3Welcome to SharePlex

SP_INST_DEMO_GD.book Page 3 Friday, March 17, 2006 5:59 PM

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 repli-cated changes.

Maintains fault toleranceAnother 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, allow-ing 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 controlWith 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 parame-ters.

Provides high level of flexibilitySharePlex for Oracle enables you to customize replication to specific needs. For exam-ple, 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 easilySharePlex for Oracle is relatively simple to install. The average installation takes about an hour on two systems.

Page 16: SPO Install Guide530

4 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 4 Friday, March 17, 2006 5:59 PM

Replicates in a high availability environmentSharePlex 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 contin-ues 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, repli-cated user transactions, discarding operations already applied by the backup. With syn-chronization between the two databases restored, users move back to the primary system and continue to work.

Simplifies routine maintenanceSharePlex for Oracle simplifies the maintenance of Oracle instances involved in replica-tion 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 manu-ally, while SharePlex replicates online transactions. SharePlex synchronizes the repli-cated changes with the backup, and replication resumes in a seamless manner.

Reduces downtime and risk from migrationsHardware 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 nor-mally until the migration is complete.

Strategies for information availabilityBecause 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.

Page 17: SPO Install Guide530

INTRODUCTION 5Welcome to SharePlex

SP_INST_DEMO_GD.book Page 5 Friday, March 17, 2006 5:59 PM

Reporting instancesSharePlex for Oracle's target instances are ideal for offloading report and query process-ing 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 organization’s decision-makers will appreciate the accuracy of the data reflected in the reports.

Data distribution and distributed processingWhen 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 Share-Plex 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 connec-tion to the primary database.

Data warehousingSharePlex 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 recoverySharePlex 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.

Page 18: SPO Install Guide530

6 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 6 Friday, March 17, 2006 5:59 PM

SharePlex replication strategies at a glance.

Page 19: SPO Install Guide530

1

SP_INST_DEMO_GD.book Page 7 Friday, March 17, 2006 5:59 PM

UNIX Installation and Setup

This chapter contains instructions for installing SharePlex for Oracle on a UNIX sys-tem.

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

Page 20: SPO Install Guide530

8 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 8 Friday, March 17, 2006 5:59 PM

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

Page 21: SPO Install Guide530

CHAPTER 1 9UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 9 Friday, March 17, 2006 5:59 PM

UNIX Preinstallation ChecklistBefore 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 Sup-portLink 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? ______________________________________

Page 22: SPO Install Guide530

10 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 10 Friday, March 17, 2006 5:59 PM

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 Administrator’s 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 let-ter “c.” An example would be /dev/rz5c. On Solaris systems not using Volume Man-ager, it usually ends with the number “2.” An example would be /dev/dsk/c0t2d0s2.

What is the device name you will be using? _______________________________

Page 23: SPO Install Guide530

CHAPTER 1 11UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 11 Friday, March 17, 2006 5:59 PM

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 cre-ate 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? ______________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 24: SPO Install Guide530

12 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 12 Friday, March 17, 2006 5:59 PM

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 Admin-istrator’s 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 sys-tem 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 sys-tems, the command works in the Bourne shell (sh).

$ ulimit -aH

time(seconds) unlimitedfile(blocks) unlimiteddata(kbytes) unlimitedstack(kbytes) unlimitedcoredump(blocks) unlimitednofiles(descriptors) 1024vmemory(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 Sys-tems Administrator), and the system must be rebooted after you make the change. Consult your Systems Administrator for assistance.

(Continued on next page.)

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 25: SPO Install Guide530

CHAPTER 1 13UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 13 Friday, March 17, 2006 5:59 PM

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?__________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 26: SPO Install Guide530

14 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 14 Friday, March 17, 2006 5:59 PM

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 estab-lishing SSH compatibility for SharePlex, see Chapter 5 of the SharePlex Adminis-trator’s Guide.

What is the port number for TCP/IP and UDP? ______________

Using an alternative port numberA 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 Administrator’s Guide for how to establish port num-bers 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.)

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 27: SPO Install Guide530

CHAPTER 1 15UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 15 Friday, March 17, 2006 5:59 PM

To set an alternative port using sp_ctrlThis 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 portnumbersp_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

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 28: SPO Install Guide530

16 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 16 Friday, March 17, 2006 5:59 PM

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

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 vari-able-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? __________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 29: SPO Install Guide530

CHAPTER 1 17UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 17 Friday, March 17, 2006 5:59 PM

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 systemInstall the product directory on a separate filesystem from the one containing the production Oracle instance, but not on a raw device.

Installation on a clusterIn a cluster, install the product directory on the shared disk that you created in check-list 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 Share-Plex installation script on the primary node (the one to which the shared disk nor-mally is mounted).

All installationsDo not install the product directory in the same directory as the variable-data direc-tory 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 Administrator’s Guide.

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 30: SPO Install Guide530

18 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 18 Friday, March 17, 2006 5:59 PM

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 systemInstall 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 clusterIn 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 run-ning 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?

____________________________________________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 31: SPO Install Guide530

CHAPTER 1 19UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 19 Friday, March 17, 2006 5:59 PM

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 fol-lowing 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 compati-ble 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 instal-lation. You can ignore this message.

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 32: SPO Install Guide530

20 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 20 Friday, March 17, 2006 5:59 PM

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 Share-Plex 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?______________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 33: SPO Install Guide530

CHAPTER 1 21UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 21 Friday, March 17, 2006 5:59 PM

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 privi-leges 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 fol-lowing 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? _______________________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 34: SPO Install Guide530

22 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 22 Friday, March 17, 2006 5:59 PM

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. Excep-tion: If you will be using an Oracle hot backup to synchronize the data, it creates the target instance and database files. See the SharePlex Administrator’s Guide for syn-chronization 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? ______________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 35: SPO Install Guide530

CHAPTER 1 23UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 23 Friday, March 17, 2006 5:59 PM

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_HOMEThe ORACLE_SID and ORACLE_HOME are listed in the oratab file. On all sup-ported 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.

CHECKLIST FOR ORACLE ISSUES (continued)

Page 36: SPO Install Guide530

24 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 24 Friday, March 17, 2006 5:59 PM

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 manu-ally 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? ___________________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 37: SPO Install Guide530

CHAPTER 1 25UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 25 Friday, March 17, 2006 5:59 PM

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 tablespace’s default storage settings.

If the tables to be replicated have extensive chaining or LOB columns, take the fol-lowing into account when sizing the tablespace.

Row chaining considerationsThe 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 considerationsThe 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.)

CHECKLIST FOR ORACLE ISSUES (continued)

Page 38: SPO Install Guide530

26 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 26 Friday, March 17, 2006 5:59 PM

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 oper-ations. 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 Share-Plex 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? ______________________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 39: SPO Install Guide530

CHAPTER 1 27UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 27 Friday, March 17, 2006 5:59 PM

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 directo-ries. 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 with-out 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, con-tact your Quest sales representative to get them.

Do you have a key for each machine? _________________

Page 40: SPO Install Guide530

28 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 28 Friday, March 17, 2006 5:59 PM

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 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 sema-phore 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 neces-sary. 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.

Page 41: SPO Install Guide530

CHAPTER 1 29UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 29 Friday, March 17, 2006 5:59 PM

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.

Page 42: SPO Install Guide530

30 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 30 Friday, March 17, 2006 5:59 PM

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

Page 43: SPO Install Guide530

CHAPTER 1 31UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 31 Friday, March 17, 2006 5:59 PM

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 per-formed 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 sema-phore 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 neces-sary. 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)

Page 44: SPO Install Guide530

32 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 32 Friday, March 17, 2006 5:59 PM

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 haven’t 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 Semaphores70 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 semsys:seminfo_semmni=70set semsys:seminfo_semmns=255set semsys:seminfo_semmnu=255set semsys:seminfo_semmsl=128set semsys:seminfo_semume=255set shmsys:shminfo_shmmax=62914560set shmsys:shminfo_shmmin=1set shmsys:shminfo_shmmni=100set 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.

Page 45: SPO Install Guide530

CHAPTER 1 33UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 33 Friday, March 17, 2006 5:59 PM

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.

Page 46: SPO Install Guide530

34 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 34 Friday, March 17, 2006 5:59 PM

Preinstallation procedure for HP Tru64 environments

Important! This procedure only applies if you are installing on a HP Tru64 platform run-ning the Tru64 operating system. This procedure requires a system reboot if parame-ters 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 work-ing 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 com-mand. This procedure changes the value of the following parameters in the IPC sub-system:

• 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 sys-tem 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.

Page 47: SPO Install Guide530

CHAPTER 1 35UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 35 Friday, March 17, 2006 5:59 PM

# /sbin/sysconfig -q ipcipc:shm_max = 62914560shm_mni = 256shm_seg = 32sem_mni = 70sem_msl = 128sem_opm = 10sem_ume = 255sem_vmx = 32767sem_aem = 16384maxkernelports = 22487portreservedmaxnum = 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 = 62914560shm_mni = 128shm_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.

Page 48: SPO Install Guide530

36 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 36 Friday, March 17, 2006 5:59 PM

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 = 62914560sem_mni = 70sem_ume = 255sem_opm = 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 exist-ing 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.

Page 49: SPO Install Guide530

CHAPTER 1 37UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 37 Friday, March 17, 2006 5:59 PM

Preinstallation procedures for Red Hat LinuxThere are three procedures that you must perform before you install the SharePlex soft-ware.

1 Change the core dump block size from the default value of 0 to a positive value

2 Ensure that the ksh shell is set.

3 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 vari-able 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 imple-mentation. 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 sizeBy 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 shellRed 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.

Page 50: SPO Install Guide530

38 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 38 Friday, March 17, 2006 5:59 PM

Changing the configurable kernel parametersThis 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 sema-phore 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 neces-sary. 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 sys-

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

Page 51: SPO Install Guide530

CHAPTER 1 39UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 39 Friday, March 17, 2006 5:59 PM

Preinstallation procedure for AIXThis 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 ful-filled - 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.

Page 52: SPO Install Guide530

40 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 40 Friday, March 17, 2006 5:59 PM

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 Admin-istrator 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.spadminspoprspview

• For NISPLUS, add the following SharePlex groups to the group.org_dir table:spadminspoprspview

• 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 systemYou 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 authoriza-tion levels” on page 58.

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

Page 53: SPO Install Guide530

CHAPTER 1 41UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 41 Friday, March 17, 2006 5:59 PM

Installation of SharePlex for OracleThe following installation procedure is for installing SharePlex 5.3.0 on the UNIX plat-form. 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 fileThe 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 exe-cute 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.

Page 54: SPO Install Guide530

42 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 42 Friday, March 17, 2006 5:59 PM

Note that the .run creates a temporary target directory for extraction in the current direc-tory. 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 Administrator’s 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 systemDo the following on the local system.1 Log on as root.

Page 55: SPO Install Guide530

CHAPTER 1 43UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 43 Friday, March 17, 2006 5:59 PM

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 platformA 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 direc-tory.

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

Page 56: SPO Install Guide530

44 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 44 Friday, March 17, 2006 5:59 PM

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 avail-able on the remote machine. To do this, export the directory through NFS using the fol-lowing 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 system’s 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-UXTo 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.

Page 57: SPO Install Guide530

CHAPTER 1 45UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 45 Friday, March 17, 2006 5:59 PM

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 avail-able on the remote machine. To do this, export the directory through NFS using the fol-lowing 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 system’s distribution directory (/distdir).

8 Proceed to “Installing SharePlex for Oracle” on page 46.

Page 58: SPO Install Guide530

46 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 46 Friday, March 17, 2006 5:59 PM

Installing SharePlex for Oracle1 [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 computer’s documentation.

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)

Platform Mount commandHP TRU64 mount -r-t cdfs -o noversion device_name/mount_pointIBM AIX mount-r device_name/mount_pointHP-UX pfs_mount /device_name /mount_pointSUN SOLARIS The CD-ROM mounts automatically. No com-

mands are necessary.

Page 59: SPO Install Guide530

CHAPTER 1 47UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 47 Friday, March 17, 2006 5:59 PM

5 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.8-Oracle10.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 direc-tories. 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 NISPLUSGroup spadmin is verified in NISPLUSGroup spopr is verified in NISPLUSGroup spview is verified in NISPLUS

All SharePlex groups have been verified

8 You are prompted to enter the Oracle SID.

Enter Oracle SID[ o101v64a ]:

Page 60: SPO Install Guide530

48 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 48 Friday, March 17, 2006 5:59 PM

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.

Page 61: SPO Install Guide530

CHAPTER 1 49UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 49 Friday, March 17, 2006 5:59 PM

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 success-fully 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 addi-tional hosts [y/n]

D Respond to the prompt for additional machines in one of the following ways:

Page 62: SPO Install Guide530

50 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 50 Friday, March 17, 2006 5:59 PM

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 instruc-tions below.

13 The SharePlex License Utility reappears.SharePlex License Utility1) Read license key from file2) Enter License key manually3) Add license key for alternate hostq) 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 UtilityAdding license for machine ID : [hostID]

1) Read license key from file2) Enter license key manuallyq) 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.

Page 63: SPO Install Guide530

CHAPTER 1 51UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 51 Friday, March 17, 2006 5:59 PM

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) Read license key from file 2) Enter license key manually 3) Add license key for alternate host q) 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...

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

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

Page 64: SPO Install Guide530

52 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 52 Friday, March 17, 2006 5:59 PM

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 Administrator’s 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).

Page 65: SPO Install Guide530

CHAPTER 1 53UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 53 Friday, March 17, 2006 5:59 PM

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 installa-tion requires the following additional steps.

Important! Do not start SharePlex until instructed to do so in these steps.

Configuring SharePlex within the cluster solutionIf 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 directoryThe 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

Page 66: SPO Install Guide530

54 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 54 Friday, March 17, 2006 5:59 PM

IP addressingHost 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 documen-tation 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

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, con-tact your UNIX systems administrator.

Setting environment parametersUse 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

1.0.1.1.6 localsys #permanent IP address

1.0.1.1.7 hacluster #floating IP address

Page 67: SPO Install Guide530

CHAPTER 1 55UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 55 Friday, March 17, 2006 5:59 PM

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 parametersSet the following parameters using the directions that follow these descriptions.

• SP_SYS_HOST_NAME —Setting this parameter is a preventive measure that gen-erates 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-

Page 68: SPO Install Guide530

56 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 56 Friday, March 17, 2006 5:59 PM

ment. For more information about this parameter, see the SharePlex Reference Man-ual.

To set the parameters1 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 licensingUse 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_ctrl1 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

Page 69: SPO Install Guide530

CHAPTER 1 57UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 57 Friday, March 17, 2006 5:59 PM

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 haclusterSP_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 file1 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 sub-directory 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.

Page 70: SPO Install Guide530

58 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 58 Friday, March 17, 2006 5:59 PM

Assigning SharePlex users and authorization levelsTo 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 desig-nating 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 systemOn 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 clusterIn 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 Share-Plex 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 groupsEach SharePlex command is assigned one of three authorization levels that corresponds to one of the SharePlex groups. Each authorization level has different privileges. To

Page 71: SPO Install Guide530

CHAPTER 1 59UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 59 Friday, March 17, 2006 5:59 PM

execute a command, a SharePlex user must have that command’s 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

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 (*)

AUTH LEVEL

USER TYPE USER GROUP USER ROLES

1 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

param• start capture• stop capture• abort capture• truncate log

2 Operator spopr Can issue all SharePlex commands except those listed above.

3 Viewer spview Can view lists, status screens, and logs to monitor replication only.

Page 72: SPO Install Guide530

60 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 60 Friday, March 17, 2006 5:59 PM

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.

Page 73: SPO Install Guide530

CHAPTER 1 61UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 61 Friday, March 17, 2006 5:59 PM

Establishing SharePlex as an Oracle userThe 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 proce-dure. 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 Administrator’s 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 pro-cesses when replication is active.

Requirements for ora_setup• For non-clustered systems, run ora_setup for each Oracle instance involved in repli-

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

Page 74: SPO Install Guide530

62 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 62 Friday, March 17, 2006 5:59 PM

• To run ora_setup, the Oracle software must have a set-user-id similar to the follow-ing, 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_setupDefault 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.

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.

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.

Page 75: SPO Install Guide530

CHAPTER 1 63UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 63 Friday, March 17, 2006 5:59 PM

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_ctrlsp_ctrl> shutdown

8 From the bin sub-directory of the SharePlex product directory, run the ora_setup program.$ ./ora_setup

Page 76: SPO Install Guide530

64 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 64 Friday, March 17, 2006 5:59 PM

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

Page 77: SPO Install Guide530

CHAPTER 1 65UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 65 Friday, March 17, 2006 5:59 PM

• 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 pass-word, 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 Ora-cle 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.

Page 78: SPO Install Guide530

66 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 66 Friday, March 17, 2006 5:59 PM

• 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 cur-rent 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 user’s default tablespace is not the one specified for the SharePlex objects in step 16, ora_setup prompts you to retain the user’s 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 cur-rent 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]

Page 79: SPO Install Guide530

CHAPTER 1 67UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 67 Friday, March 17, 2006 5:59 PM

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 cur-rent 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 Ora-cle setup process.

22 [IF CHANGING THE SHAREPLEX USER AND REPLICATION IS ACTIVE] Copy the SharePlex objects from the existing SharePlex user’s schema to the new SharePlex user’s 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;

Page 80: SPO Install Guide530

68 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 68 Friday, March 17, 2006 5:59 PM

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 user’s password.• The SharePlex Oracle user that you created during ora_setup.

The script runs SQL*Plus and executes the following commands to grant the privi-lege:

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 Share-Plex user.

You are finished with the installation process.

Page 81: SPO Install Guide530

CHAPTER 1 69UNIX Installation and Setup

SP_INST_DEMO_GD.book Page 69 Friday, March 17, 2006 5:59 PM

Important!

• Before you configure SharePlex for replication, run the demonstrations in this man-ual 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 Administrator’s Guide for additional instructions for planning and config-uring 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.

Page 82: SPO Install Guide530

70 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 70 Friday, March 17, 2006 5:59 PM

Page 83: SPO Install Guide530

2

SP_INST_DEMO_GD.book Page 71 Friday, March 17, 2006 5:59 PM

`Windows Installation and Setup

This chapter contains instructions for installing SharePlex for Oracle on a Windows sys-tem.

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

Page 84: SPO Install Guide530

72 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 72 Friday, March 17, 2006 5:59 PM

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.

Page 85: SPO Install Guide530

CHAPTER 2 73`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 73 Friday, March 17, 2006 5:59 PM

Windows Preinstallation ChecklistBefore you install the SharePlex software, make the following pre-installation decisions and complete this checklist. After installation, consult the SharePlex Administrator’s 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 Sup-portLink 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. After-ward, 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 infor-mation necessary for replication.

Is there a clean Oracle installation?___________________

Page 86: SPO Install Guide530

74 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 74 Friday, March 17, 2006 5:59 PM

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 manufacturer’s name, “Mortice Kern Systems,” and another is created under the name “Data Focus.” The default folder for NuT-CRACKER 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? _________________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 87: SPO Install Guide530

CHAPTER 2 75`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 75 Friday, March 17, 2006 5:59 PM

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 Administrator’s 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 Administrator’s 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 Administrator’s Guide.

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 88: SPO Install Guide530

76 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 76 Friday, March 17, 2006 5:59 PM

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 Win-dows servers in the replication network to the following files, which contain map-pings 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 machine’s 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 sysA.company.com sysA # source system

38.25.63.10 sysB.company.com sysB # 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 environ-ment 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 direc-tory 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? _________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 89: SPO Install Guide530

CHAPTER 2 77`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 77 Friday, March 17, 2006 5:59 PM

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 produc-tion 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? __________________________________________________________

CHECKLIST FOR SYSTEM AND NETWORK ISSUES (continued)

Page 90: SPO Install Guide530

78 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 78 Friday, March 17, 2006 5:59 PM

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 SYSTEM AND NETWORK ISSUES (continued)

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 previ-ous 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?_____________

Page 91: SPO Install Guide530

CHAPTER 2 79`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 79 Friday, March 17, 2006 5:59 PM

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 Administrator’s Guide.

Have all Oracle instances been created? _____________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 92: SPO Install Guide530

80 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 80 Friday, March 17, 2006 5:59 PM

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 privi-leges 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 fol-lowing 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? ______________________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 93: SPO Install Guide530

CHAPTER 2 81`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 81 Friday, March 17, 2006 5:59 PM

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? ___________________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 94: SPO Install Guide530

82 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 82 Friday, March 17, 2006 5:59 PM

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 tablespace’s default storage settings.

If the tables to be replicated have extensive chaining or LOB columns, take the fol-lowing into account when sizing the tablespace.

Row chaining considerationsThe 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 considerationsThe 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.)

CHECKLIST FOR ORACLE ISSUES (continued)

Page 95: SPO Install Guide530

CHAPTER 2 83`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 83 Friday, March 17, 2006 5:59 PM

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 oper-ations. 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 Share-Plex 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?_________________________

CHECKLIST FOR ORACLE ISSUES (continued)

Page 96: SPO Install Guide530

84 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 84 Friday, March 17, 2006 5:59 PM

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 directo-ries. 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? _________________

Page 97: SPO Install Guide530

CHAPTER 2 85`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 85 Friday, March 17, 2006 5:59 PM

Pre-installation instructions for Windows cluster environments

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

Installation sequence1 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 fol-lowing 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 addressingHost 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.

Page 98: SPO Install Guide530

86 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 86 Friday, March 17, 2006 5:59 PM

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 charac-ters, such as underscores ( _ ) or dots (.).

Example hosts file:

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

1.0.1.1.6 LocalSys #permanent IP address

1.0.1.1.7 HACluster #floating IP address

Page 99: SPO Install Guide530

CHAPTER 2 87`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 87 Friday, March 17, 2006 5:59 PM

Running the installation program

Important — upgrades only! You do not need to uninstall SharePlex or the NuT-CRACKER 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 spad-min 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 desk-

top 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 short-cut 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

Page 100: SPO Install Guide530

88 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 88 Friday, March 17, 2006 5:59 PM

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 Share-Plex that you are installing.

Page 101: SPO Install Guide530

CHAPTER 2 89`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 89 Friday, March 17, 2006 5:59 PM

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.

Page 102: SPO Install Guide530

90 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 90 Friday, March 17, 2006 5:59 PM

9 You are prompted for the SharePlex folder, otherwise known as the SharePlex prod-uct directory. This folder is where the SharePlex binaries and default parameter set-tings 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.”

Page 103: SPO Install Guide530

CHAPTER 2 91`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 91 Friday, March 17, 2006 5:59 PM

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 oper-ating environment, the sp_ctrl command-line interface, and the SharePlex utili-ties.

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 environ-ment, 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.

Page 104: SPO Install Guide530

92 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 92 Friday, March 17, 2006 5:59 PM

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 Administrator’s Guide for instructions for establishing a replication strategy, including how to run multiple instances of SharePlex.

Page 105: SPO Install Guide530

CHAPTER 2 93`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 93 Friday, March 17, 2006 5:59 PM

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.

Page 106: SPO Install Guide530

94 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 94 Friday, March 17, 2006 5:59 PM

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.

Page 107: SPO Install Guide530

CHAPTER 2 95`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 95 Friday, March 17, 2006 5:59 PM

19 You are prompted to confirm the installation information. To change any informa-tion, 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 NuT-CRACKER® 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.

Page 108: SPO Install Guide530

96 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 96 Friday, March 17, 2006 5:59 PM

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

Page 109: SPO Install Guide530

CHAPTER 2 97`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 97 Friday, March 17, 2006 5:59 PM

22 When the MKS Platform Components installation completes, the licensing prompt appears. Continue with the license key instructions as follows.

Adding the license keyImmediately after completing the MKS Platform Components installation, the installa-tion program displays the License Key dialog box.

23 Do either of the following, depending on the machine’s 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-clus-tered machine, proceed with the following instructions.

Page 110: SPO Install Guide530

98 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 98 Friday, March 17, 2006 5:59 PM

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 informa-tion is installed in the paramdb in the variable-data directory on each system.

If you have a license keyProceed 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 key1 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 representa-tive.

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.

Page 111: SPO Install Guide530

CHAPTER 2 99`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 99 Friday, March 17, 2006 5:59 PM

Establishing SharePlex as an Oracle userAfter 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 tar-get 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 Ora-cle 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, fol-lowing 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 Administrator’s 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 OraSetupThe 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 pro-cesses when replication is active.

Page 112: SPO Install Guide530

100 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 100 Friday, March 17, 2006 5:59 PM

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

Page 113: SPO Install Guide530

CHAPTER 2 101`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 101 Friday, March 17, 2006 5:59 PM

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

Page 114: SPO Install Guide530

102 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 102 Friday, March 17, 2006 5:59 PM

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

rect one. • In the Temp list box, select the name of the SharePlex temporary tablespace or

type the correct one.

Page 115: SPO Install Guide530

CHAPTER 2 103`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 103 Friday, March 17, 2006 5:59 PM

• 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 user’s schema to the new SharePlex user’s 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*.

Page 116: SPO Install Guide530

104 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 104 Friday, March 17, 2006 5:59 PM

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 user’s password.• The SharePlex Oracle user that you created during ora_setup.

The program runs SQL*Plus and executes the following commands to grant the priv-ilege:

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 serviceSharePlex, 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 direc-tions.

Page 117: SPO Install Guide530

CHAPTER 2 105`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 105 Friday, March 17, 2006 5:59 PM

To install the SharePlex service37 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 mes-sage 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 Win-dows systems.

Page 118: SPO Install Guide530

106 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 106 Friday, March 17, 2006 5:59 PM

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_ctrl1 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 Mod-

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

Page 119: SPO Install Guide530

CHAPTER 2 107`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 107 Friday, March 17, 2006 5:59 PM

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.

Changing Global Settings in the MKS ToolkitWhen 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.

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 Administrator’s Guide.

Page 120: SPO Install Guide530

108 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 108 Friday, March 17, 2006 5:59 PM

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.

Page 121: SPO Install Guide530

CHAPTER 2 109`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 109 Friday, March 17, 2006 5:59 PM

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

Page 122: SPO Install Guide530

110 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 110 Friday, March 17, 2006 5:59 PM

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 stepsIn 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 clus-ter 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 com-mands 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 environ-ment 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 high-availability fault tolerance system.

Page 123: SPO Install Guide530

CHAPTER 2 111`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 111 Friday, March 17, 2006 5:59 PM

Configuring SharePlex within the cluster solutionIf 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 RegistryThe 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 Registry1 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 Soft-ware\SharePlex.

4 Expand the SharePlex node, then highlight the port number.

Page 124: SPO Install Guide530

112 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 112 Friday, March 17, 2006 5:59 PM

5 In the Name column of the pane on the right, right-click the SP_SYS_VARDIR vari-able, 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.

Page 125: SPO Install Guide530

CHAPTER 2 113`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 113 Friday, March 17, 2006 5:59 PM

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

Page 126: SPO Install Guide530

114 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 114 Friday, March 17, 2006 5:59 PM

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

Page 127: SPO Install Guide530

CHAPTER 2 115`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 115 Friday, March 17, 2006 5:59 PM

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.

Page 128: SPO Install Guide530

116 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 116 Friday, March 17, 2006 5:59 PM

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 desig-nating 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 groupsEach 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 command’s 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.

Page 129: SPO Install Guide530

CHAPTER 2 117`Windows Installation and Setup

SP_INST_DEMO_GD.book Page 117 Friday, March 17, 2006 5:59 PM

User Authorization Levels and Roles

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 success-ful and that you are familiar with the software. After you run the demonstrations, refer to the SharePlex Administrator’s 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.

AUTH LEVEL

USER TYPE USER GROUP USER ROLES

1 Administrator spadmin Can issue all SharePlex commands. Com-mands that can only be issued by a Share-Plex Administrator are: • startup, shutdown• all configuration commands relating to

an active configuration• all parameter commands except list

param• start capture• stop capture• abort capture• truncate log

2 Operator spopr Can issue all SharePlex commands except those listed above.

3 Viewer spview Can view lists, status screens, and logs to monitor replication only.

Page 130: SPO Install Guide530

118 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 118 Friday, March 17, 2006 5:59 PM

Page 131: SPO Install Guide530

3

SP_INST_DEMO_GD.book Page 119 Friday, March 17, 2006 5:59 PM

Basic SharePlex Demonstrations

This chapter demonstrates SharePlex replication using the sp_ctrl command-line inter-face. This demonstration can be run on UNIX or Windows systems.

Warning! These demonstrations are intended to introduce you to the SharePlex soft-ware. 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 envi-ronment, use the SharePlex Administrator’s 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

Page 132: SPO Install Guide530

120 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 120 Friday, March 17, 2006 5:59 PM

Overview of the demonstrationsThese demonstrations assume that SharePlex is installed on one source system and one target system.

What you will learnThese 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 demonstrationsThe 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 Share-Plex 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 sys-tem (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.

Page 133: SPO Install Guide530

CHAPTER 3 121Basic SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 121 Friday, March 17, 2006 5:59 PM

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 Oracle’s entry in the Windows Registry.

Description of the demo tables.

Part 1: Starting SharePlexThe 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 sys-tems.

UNIX systems1 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 systems1 Log onto the system as a SharePlex Administrator (a member of the spadmin Share-

Plex group).

Column Name Data Type Null?

NAME varchar2(30)ADDRESS varchar2(60)PHONE# varchar2(12)

Page 134: SPO Install Guide530

122 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 122 Friday, March 17, 2006 5:59 PM

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.

Page 135: SPO Install Guide530

CHAPTER 3 123Basic SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 123 Friday, March 17, 2006 5:59 PM

Part 2: Creating and activating a configurationSharePlex 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 con-tain 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 sys-tem(s), any intermediary systems, and the target database’s ORACLE_SID. (An intermediary system is not used in this demonstration.)

To create the demonstration configuration1 Create a replication configuration named sample_config by issuing the create con-

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

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 Share-Plex that Oracle data is being replicated.

Template 1: Basic demonstration configuration sample_config datasource:o.source_SID splex.demo_src splex.demo_dest [email protected]_SID

Page 136: SPO Install Guide530

124 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 124 Friday, March 17, 2006 5:59 PM

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 owner’s name with a table name ensures that SharePlex replicates the correct table, since dif-ferent 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 cre-ates the routing map for your configuration, telling SharePlex where to put the repli-cated data.

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

Example:

[email protected]

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

Page 137: SPO Install Guide530

CHAPTER 3 125Basic SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 125 Friday, March 17, 2006 5:59 PM

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

Part 3: Testing replicationThis 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 startupThis test verifies that replication is proceeding.

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 con-figuration 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 con-fig command, and then edit and activate the copy. For more information about the copy config command, see the SharePlex Reference Manual.

Page 138: SPO Install Guide530

126 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 126 Friday, March 17, 2006 5:59 PM

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-754-8000’);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 COM-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 60

Page 139: SPO Install Guide530

CHAPTER 3 127Basic SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 127 Friday, March 17, 2006 5:59 PM

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 Share-Plex 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 unavailableThis 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 com-mand 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

Page 140: SPO Install Guide530

128 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 128 Friday, March 17, 2006 5:59 PM

queue for this configuration would be on a different system, the target system. How-ever, 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 sys-tem's post queue. Under normal circumstances, when SharePlex is running on both sys-tems, 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 replicationThis 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 sta-tus command.sp_ctrl(sysB)> status

Page 141: SPO Install Guide530

CHAPTER 3 129Basic SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 129 Friday, March 17, 2006 5:59 PM

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

The status command is one of several commands in sp_ctrl that can display replica-tion 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;

FIGURE 2: sample status command issued on the target system

Page 142: SPO Install Guide530

130 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 130 Friday, March 17, 2006 5:59 PM

Test 5: Verify SharePlex recovery after interruption to the primary instanceThis 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 commandThis 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;

Page 143: SPO Install Guide530

CHAPTER 3 131Basic SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 131 Friday, March 17, 2006 5:59 PM

Test 7: Compare and repair out-of-sync rowsThis 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 [email protected]_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 synchro-nization.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 [email protected]_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-

Page 144: SPO Install Guide530

132 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 132 Friday, March 17, 2006 5:59 PM

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.

Page 145: SPO Install Guide530

4

SP_INST_DEMO_GD.book Page 133 Friday, March 17, 2006 5:59 PM

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 soft-ware. 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 envi-ronment, use the SharePlex Administrator’s 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 Refer-ence Manual.

Contents

Initial demonstration Demonstrating partitioned replication Demonstrating transformation Demonstrating generic conflict resolution

Page 146: SPO Install Guide530

134 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 134 Friday, March 17, 2006 5:59 PM

Installing the demonstration objectsSharePlex 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 sys-tems 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 objectsod_employeeName Null? Type---------------------- ------- -------EMP_NO NOT NULL NUMBEREMP_FIRST_NAME VARCHAR2(20)EMP_LAST_NAME VARCHAR2(20)EMP_DOB DATEEMP_DEPT_NO NUMBEREMP_TIMESTAMP DATE

od_timesheetName Null? Type---------------------- -------- --------TS_EMP_NO NUMBERTS_IN_TIME DATETS_OUT_TIME DATETS_MOD_TIME DATE

Page 147: SPO Install Guide530

CHAPTER 4 135Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 135 Friday, March 17, 2006 5:59 PM

od_departmentName Null? Type---------------------- -------- -------DEPT_NO NOT NULL NUMBERDEPT_NAME VARCHAR2(30)DEPT_CODE VARCHAR2(5)

od_salaryName Null? Type----------------------- -------- -------SAL_EMP_NO NUMBERSAL_VALUE NUMBERSAL_CHANGED DATE

od_sales_emp_dataName Null? Type----------------------- -------- -------- EMP_NO_KEY NOT NULL NUMBEREMPLOYEE_NAME VARCHAR2(70)SALARY NUMBERDEPARTMENT VARCHAR2(50)

exc_tableName Null? Type----------------------- -------- ---------- EXC_NO NOT NULL NUMBEREXC_TYPE VARCHAR2(6)EXC_TARGET_TABLE VARCHAR2(66)EXC_FIXED VARCHAR2(3)EXC_INFO VARCHAR2(500)EXC_TIMESTAMP DATE

Page 148: SPO Install Guide530

136 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 136 Friday, March 17, 2006 5:59 PM

Demo 1: Initial demonstration

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

Starting SharePlexThe following are instructions for starting SharePlex on UNIX and Windows systems. Start SharePlex on the source and target systems.

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

Page 149: SPO Install Guide530

CHAPTER 4 137Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 137 Friday, March 17, 2006 5:59 PM

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

Page 150: SPO Install Guide530

138 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 138 Friday, March 17, 2006 5:59 PM

Using the editing commands in the text editor, follow Template 8 to create the configu-ration, 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 machine’s name. • For target_SID, substitute the ORACLE_SID of the target database. The SID is case-

sensitive.Do not allow any spaces between characters within a column. Separate columns with two or more spaces or a tab.

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 configurationYou can use the verify command in sp_ctrl to determine whether or not the configura-tion will activate properly. This command validates the database ORACLE_SID, object names and construction, configuration syntax, constraint conditions, and other compo-nents 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

Template 8: Demonstration configuration “od.config”datasource:o.source_SIDowner.od_department owner.od_department [email protected]_SIDowner.od_salary owner.od_salary [email protected]_SIDowner.od_timesheet owner.od_timesheet [email protected]_SIDowner.od_employee owner.od_employee [email protected]_SID

Page 151: SPO Install Guide530

CHAPTER 4 139Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 139 Friday, March 17, 2006 5:59 PM

2 To view the results of the verification, view the SID_log.vrfy log in the log sub-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 constraint’s 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 trigger’s 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 synchronizationThis 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 system’s name, and the target ORACLE_SID for the appropriate vari-ables in the following syntax.sp_ctrl(sysA)> compare table source_owner.od_employee to target_owner.od_employee target [email protected]_SID

sp_ctrl(sysA)> compare table source_owner.od_salary to target_owner.od_salary target [email protected]_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.

Page 152: SPO Install Guide530

140 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 140 Friday, March 17, 2006 5:59 PM

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 [email protected]_SID repair

7 Issue the show sync command on the target system. This should show no out-of-sync 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 performanceThis 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-

Page 153: SPO Install Guide530

CHAPTER 4 141Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 141 Friday, March 17, 2006 5:59 PM

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

Page 154: SPO Install Guide530

142 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 142 Friday, March 17, 2006 5:59 PM

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 Administrator’s Guide.

1 Delete (not TRUNCATE) all rows from the od_employee table on the source sys-tem. 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 fol-lowing into the SHAREPLEX_PARTITION table, substituting for the variables the SHAREPLEX_PARTITION table’s 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’ , ‘[email protected]_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

Page 155: SPO Install Guide530

CHAPTER 4 143Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 143 Friday, March 17, 2006 5:59 PM

4 Follow Template 9 to construct the configuration. Vertically partitioned replication is specified in the configuration file using a column partition, which appears in paren-theses 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” com-ponent. The partition scheme is a logical “container” for one or more column condi-tions. 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 “! [email protected]_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 satis-fies this requirement, but in this case there is only one.

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.

Template 9: Demonstration configuration “od.partition”datasource:o.srce_SIDowner.od_employee (emp_no, emp_first_name, emp_last_name, emp_dept_no) owner.od_employee !sales_partition! [email protected]_SID

Page 156: SPO Install Guide530

144 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 144 Friday, March 17, 2006 5:59 PM

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 person’s first and last name are in one column in the source table but in separate col-umns 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 data-base or redirect it to an alternate location (or both).

In this demonstration, transformation procedures are provided that combine data repli-cated 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 demon-stration 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

Page 157: SPO Install Guide530

CHAPTER 4 145Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 145 Friday, March 17, 2006 5:59 PM

od_transform_employee_update demonstration transformation routines. You are prompted for a schema and tablespace for this procedure and the name of the Share-Plex Oracle user.

5 To direct SharePlex to call transformation routines instead of posting the SQL opera-tions, 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 proce-dure 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 cor-rect owner names for the owner variables.

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

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 transforma-tion:

Template 10: Demonstration transformation.SID fileowner.od_employee I owner.od_transform_employee_insertowner.od_employee U owner.od_transform_employee_updateowner.od_salary I owner.od_transform_employee_insertowner.od_salary U owner.od_transform_employee_update

Template 11: Demonstration configuration “od.transform”datasource:o.source_SIDowner.od_salary owner.od_salary [email protected]_SIDowner.od_employee owner.od_employee [email protected]_SID

Page 158: SPO Install Guide530

146 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 146 Friday, March 17, 2006 5:59 PM

• 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 num-ber. 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.

Page 159: SPO Install Guide530

CHAPTER 4 147Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 147 Friday, March 17, 2006 5:59 PM

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 sys-tems, while SharePlex replicates their changes to keep all databases synchronized. Peer-to-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 sec-ondary 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 rep-lication, you would develop custom conflict resolution routines based on your com-pany’s business rules and replication environment.

About this demonstrationGeneric 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.

Page 160: SPO Install Guide530

148 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 148 Friday, March 17, 2006 5:59 PM

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 con-flict-resolution logic for DELETEs to conform to your company’s 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 resolu-tion 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 applica-tions, your business rules, and how conflicts could occur. When suitable for an environ-ment, 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 Administrator’s Guide.

Preparing for the demonstration1 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 pack-age, 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

Page 161: SPO Install Guide530

CHAPTER 4 149Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 149 Friday, March 17, 2006 5:59 PM

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

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

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

Page 162: SPO Install Guide530

150 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 150 Friday, March 17, 2006 5:59 PM

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

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 repli-cates the secondary od_employee table to the od_employee table on the trusted source system. Use the secondary database’s ORACLE_SID for the datasource. Use the trusted source system’s name for trusted_source_host. Use the trusted source data-base’s ORACLE_SID for trusted_source_SID.

8 Activate both configurations.sp_ctrl(sysA)> activate config od.cr_trusted_src

sp_ctrl(sysB)> activate config od.cr_secondary

Creating conflictsUse 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 priorityIn 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.

Template 13: Demonstration configuration “od.cr_trusted_src”datasource:o.trusted_source_SIDowner.od_employee owner.od_employee [email protected]_SID

Template 14: Demonstration configuration “od.cr_secondary”datasource:o.secondary_SIDowner.od_employee owner.od_employee [email protected]_source_SID

Page 163: SPO Install Guide530

CHAPTER 4 151Advanced SharePlex Demonstrations

SP_INST_DEMO_GD.book Page 151 Friday, March 17, 2006 5:59 PM

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

Page 164: SPO Install Guide530

152 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 152 Friday, March 17, 2006 5:59 PM

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.

Page 165: SPO Install Guide530

5

SP_INST_DEMO_GD.book Page 153 Friday, March 17, 2006 5:59 PM

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, replica-tion processes and other issues after you have configured replication and begun the rep-lication process can be found in the SharePlex Administrator’s 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 160If 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

Page 166: SPO Install Guide530

154 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 154 Friday, March 17, 2006 5:59 PM

Read this first...

Did you review the Release Notes for this version?Sometimes there are special installation instructions that supersede or supplement cer-tain 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 pro-cess.

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 Man-ager, 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.

Page 167: SPO Install Guide530

CHAPTER 5 155Solving Installation Problems

SP_INST_DEMO_GD.book Page 155 Friday, March 17, 2006 5:59 PM

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 con-nected 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 cor-rectly 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 machine’s 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 system1 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 systemTo 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-

Page 168: SPO Install Guide530

156 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 156 Friday, March 17, 2006 5:59 PM

ber you want to confirm. It displays the ID number for the local machine, as shown in the example below.

$ /splex/proddir/install/splex_unameHost 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 instal-lation. 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 installa-tion 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.

Page 169: SPO Install Guide530

CHAPTER 5 157Solving Installation Problems

SP_INST_DEMO_GD.book Page 157 Friday, March 17, 2006 5:59 PM

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 Share-Plex 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 Administrator’s 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 com-ponents 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 installa-tion 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 proce-dures 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,

Page 170: SPO Install Guide530

158 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 158 Friday, March 17, 2006 5:59 PM

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

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.

Page 171: SPO Install Guide530

CHAPTER 5 159Solving Installation Problems

SP_INST_DEMO_GD.book Page 159 Friday, March 17, 2006 5:59 PM

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 identi-cal 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 Administrator’s 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.

Page 172: SPO Install Guide530

160 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 160 Friday, March 17, 2006 5:59 PM

Methods for determining the ORACLE_SIDYou 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.

• 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 differ-ent 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.

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

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

Sun Solaris systemsOn 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 pre-vent problems for SharePlex.

Page 173: SPO Install Guide530

CHAPTER 5 161Solving Installation Problems

SP_INST_DEMO_GD.book Page 161 Friday, March 17, 2006 5:59 PM

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

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 spe-cific 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 Oracle’s 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.

Page 174: SPO Install Guide530

162 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 162 Friday, March 17, 2006 5:59 PM

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 con-figurations 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 Actual Value Units Set At ------------------------------ ---------------------------- ------- ------SP_ORD_CDA_LIMIT 5 cdas RestartSP_ORD_DATE_MSG 0 Live SP_ORD_DEBUG 0x00000000 bitflag Live SP_ORD_DEBUG_FLAG 0x00000000 bitflag Live SP_ORD_DELAY_RECORDS 200 records Live SP_ORD_DELAY_TIME 3 seconds Live SP_ORD_LDA_ARRAY_SIZE 5 logins RestartSP_ORD_LOG_FILESIZE 50000000 bytes RestartSP_ORD_LOG_NUMFILES 3 number RestartSP_ORD_LOGIN_O.ORA816 4e9ad19fed4910ea81 Unknown Default Value: SP_ORD_OWNER_O.ORA816 judyd Unknown Default Value:

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

Page 175: SPO Install Guide530

CHAPTER 5 163Solving Installation Problems

SP_INST_DEMO_GD.book Page 163 Friday, March 17, 2006 5:59 PM

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) Unex-pected 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_OBJMAPName Null? Type----------------------------------------- -------- ------------------OBJID NUMBERSTART_ACTID NUMBEREND_ACTID NUMBERDONE 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 Share-Plex 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.

Page 176: SPO Install Guide530

164 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 164 Friday, March 17, 2006 5:59 PM

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 Share-Plex 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 Administrator’s 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 mem-ber 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 (includ-ing 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 addi-tion, 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 parameter’s value to the correct IP address. Instructions for setting this parame-ter are on page 53 for UNIX clusters and page 110 for Windows clusters.

Page 177: SPO Install Guide530

CHAPTER 5 165Solving Installation Problems

SP_INST_DEMO_GD.book Page 165 Friday, March 17, 2006 5:59 PM

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 autho-rize other users to connect through sp_ctrl.

If you cannot issue commands in sp_ctrl even though you are in the appropriate Share-Plex group for that command, or if other aspects of SharePlex are not functioning prop-erly, 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 Adminis-trator. 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 Administra-tor’s Guide, or the Systems Administrator can remount the filesystem with nosuid dis-abled (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 command’s 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.

Page 178: SPO Install Guide530

166 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 166 Friday, March 17, 2006 5:59 PM

Page 179: SPO Install Guide530

Appendix A

SP_INST_DEMO_GD.book Page 167 Friday, March 17, 2006 5:59 PM

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 param-eters 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 tablespace default tablespace default tablespace default 0SHAREPLEX_ACT_MARKER tablespace default tablespace default tablespace default 0SHAREPLEX_COMMAND tablespace default tablespace default tablespace default 0SHAREPLEX_CONFIG tablespace default tablespace default tablespace default 0SHAREPLEX_DATAEQUATOR tablespace default tablespace default tablespace default 0SHAREPLEX_DATAEQUATOR_RESULTS

tablespace default tablespace default tablespace default 0

SHAREPLEX_LOBMAP 1 MB 1MB 120 10SHAREPLEX_MARKER tablespace default tablespace default tablespace default 0SHAREPLEX_OBJMAP tablespace default tablespace default tablespace default 0SHAREPLEX_OOS_KEYS tablespace default tablespace default tablespace default 0SHAREPLEX_OOS_MASTER tablespace default tablespace default tablespace default 0SHAREPLEX_PARTITION tablespace default tablespace default tablespace default 0SHAREPLEX_ROWIDMAP 5MB 5MB unlimited 0SHAREPLEX_TRANS tablespace default tablespace default tablespace default 0

Page 180: SPO Install Guide530

168 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 168 Friday, March 17, 2006 5:59 PM

INDICES INITIAL_EXTENT MAX_EXTENTS PCT_INCREASE

SHAREPLEX_LOBMAP_I1 1MB 1MB 120 10SHAREPLEX_LOBMAP_I2 1MB 1MB 120 10SHAREPLEX_ROWIDMAP_I1 5MB 5MB unlimited 0SHAREPLEX_ROWIDMAP_I2 5MB 5MB unlimited 0SHAREPLEX_ROWIDMAP_I3 5MB 5MB unlimited 0

Default storage values for the SharePlex tables and indices

Page 181: SPO Install Guide530

Appendix B

SP_INST_DEMO_GD.book Page 169 Friday, March 17, 2006 5:59 PM

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 environ-ment, but it rarely is appropriate in a production environment. Unless a documented procedure or demonstration requires running ora_cleansp (OraCleanSp on Win-dows 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 worksOra_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.

Page 182: SPO Install Guide530

170 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 170 Friday, March 17, 2006 5:59 PM

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 direc-tory 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 repli-cation 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_cleansp1 [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 Share-Plex 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 direc-tory 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.

Page 183: SPO Install Guide530

APPENDIX B 171Running ora_cleansp

SP_INST_DEMO_GD.book Page 171 Friday, March 17, 2006 5:59 PM

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

Page 184: SPO Install Guide530

172 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 172 Friday, March 17, 2006 5:59 PM

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 system1 Double-click the SpUtils desktop shortcut.

Or...

Navigate to the bin sub-directory of the SharePlex product directory, then double-click the SpUtils program icon.

Page 185: SPO Install Guide530

APPENDIX B 173Running ora_cleansp

SP_INST_DEMO_GD.book Page 173 Friday, March 17, 2006 5:59 PM

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.

Page 186: SPO Install Guide530

174 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 174 Friday, March 17, 2006 5:59 PM

Page 187: SPO Install Guide530

Appendix C

SP_INST_DEMO_GD.book Page 175 Friday, March 17, 2006 5:59 PM

Removing SharePlex

This appendix provides separate instructions for removing SharePlex from UNIX and Windows systems.

Removing SharePlex from a UNIX systemTo 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 pre-serves 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 installa-tion requirements.

Removing SharePlex when it is running as rootTo 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 Share-Plex database objects. Use standard Oracle methods to remove those objects.

Page 188: SPO Install Guide530

176 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 176 Friday, March 17, 2006 5:59 PM

To run splex_remove1 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 Share-Plex 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.7b) 9.2.0c) 10.1Enter 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]?

Page 189: SPO Install Guide530

APPENDIX C 177Removing SharePlex

SP_INST_DEMO_GD.book Page 177 Friday, March 17, 2006 5:59 PM

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 rootTo remove SharePlex when it is not running as a root user, you must remove the Share-Plex 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.

Page 190: SPO Install Guide530

178 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 178 Friday, March 17, 2006 5:59 PM

Removing SharePlex from a Windows system

Overview of the removal processRemoving 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 programWhen 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 unin-stall 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 selec-tively remove files.

Files not removed by the uninstall programThe uninstall program does not remove the following components.

• Files that already existed on the system when the current version of SharePlex was installed.

Page 191: SPO Install Guide530

APPENDIX C 179Removing SharePlex

SP_INST_DEMO_GD.book Page 179 Friday, March 17, 2006 5:59 PM

• 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 serviceBefore 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 service’s 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...

Page 192: SPO Install Guide530

180 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 180 Friday, March 17, 2006 5:59 PM

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 clean-est 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 avail-able.

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 Auto-matic uninstall, Custom uninstall, or Repair.

Page 193: SPO Install Guide530

APPENDIX C 181Removing SharePlex

SP_INST_DEMO_GD.book Page 181 Friday, March 17, 2006 5:59 PM

Automatic uninstallIn the Perform Uninstall dialog box, click Finish to complete the uninstall, or click Back to perform a custom uninstall.

The automatic uninstall finishes and exits.

Page 194: SPO Install Guide530

182 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 182 Friday, March 17, 2006 5:59 PM

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

Page 195: SPO Install Guide530

APPENDIX C 183Removing SharePlex

SP_INST_DEMO_GD.book Page 183 Friday, March 17, 2006 5:59 PM

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

RepairIn the Perform Repair dialog box, click Finish. The repair function detects items need-ing repair and performs the repair automatically.

To remove the NuTCRACKER operating environment1 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.

Page 196: SPO Install Guide530

184 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 184 Friday, March 17, 2006 5:59 PM

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 objectsTo remove the SharePlex user and database objects from the Oracle instance, use stan-dard Oracle methods for removing users and objects. See Oracle’s documentation for instructions if needed.

Page 197: SPO Install Guide530

CHAPTER D 185How SharePlex Works

SP_INST_DEMO_GD.book Page 185 Friday, March 17, 2006 5:59 PM

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, 116adding

aliasfor cluster name 54, 86for non-alphanumeric host name 11, 76

license keyWindows cluster 85Windows system 97

SharePlex account in databaseUNIX systems 61Windows systems 99

SharePlex usersUNIX systems 58Windows systems 116

addressing, in cluster 54, 85administrator, SharePlex 59, 116advantages of SharePlex 2AIX, see IBM AIXalias

for cluster nameUNIX 54Windows 86

for non-alphanumeric host namesUNIX 11Windows 76

Page 198: SPO Install Guide530

186 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 186 Friday, March 17, 2006 5:59 PM

alphanumeric host name 11, 76authorization levels, assigning

UNIX systems 58Windows systems 116

B

bin sub-directory 56binaries, version-specific 23, 24

C

chaining, replication implications 25, 82Changing Global Settings in the MKS Toolkit 107cluster

SharePlex variable-data directory for 17, 18cluster environments

package nameUNIX cluster 54Windows cluster 86

post-installation instructionsUNIX 53Windows 110

pre-installation instructionsWindows 85

command authorization levels, assigningUNIX 58Windows 116

configurable parameters, UNIX 28Conflict Resolution Demonstration 147connections

TCP/IP 14, 75cost-based optimizer, and SharePlex tables 25, 82

Page 199: SPO Install Guide530

CHAPTER D 187How SharePlex Works

SP_INST_DEMO_GD.book Page 187 Friday, March 17, 2006 5:59 PM

D

databasecluster

variable-data directory 17, 18creating SharePlex account 61objects

SharePlex 167datasource, definition 123DBA privileges for SharePlex 21, 61, 80, 99default

index tablespace 26, 83NuTCRACKER folder 74port number

UNIX systems 14Windows systems 75

set-user-id for Oracle 22SharePlex Administrator 27, 84SharePlex Oracle user 21, 80storage

SharePlex tablespace 25, 82SHAREPLEX_LOBMAP table 25, 82SHAREPLEX_ROWIDMAP table 25, 82

temporary tablespace 26, 83Windows installation directory 76

demonstration license 27, 84demonstrations

advanced 133basic 119

directoriesSharePlex product directory 17, 76SharePlex variable-data 18, 77

DNS nameserver 11, 155, 157

E

environment parameters, for cluster 54, 111ERP environments 2EXC_TABLE table 151

Page 200: SPO Install Guide530

188 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 188 Friday, March 17, 2006 5:59 PM

F

fileentering license key from 27SharePlex marker 12

files, setting number of open 12firewall ports 14, 75floating IP address, alias for 54, 86

G

gethostname system call 54, 110global cluster package name

UNIX cluster 54Windows cluster 85

grants to replicate 9i or 10g DDL 21, 80

H

hard limit for file descriptors 12host name

in cluster 54, 85non-alphanumeric 11, 76

hot backup, Oracle 22, 79HP Tru64

preinstallation procedure 34setting system file descriptors 12

HP-UXpreinstallation instructions 28setting system file descriptors 12

I

IBM AIXpreinstallation procedure 39setting system file descriptors 12

Import process (service) 127index tablespace for SharePlex 26, 83indices, for SharePlex tables 167install directory 51, 156

Page 201: SPO Install Guide530

CHAPTER D 189How SharePlex Works

SP_INST_DEMO_GD.book Page 189 Friday, March 17, 2006 5:59 PM

installationchecklist

UNIX systems 9Windows systems 73

clusterUNIX post-installation 53Windows post-installation 110Windows pre-installation 85

instructionsUNIX systems 7Windows systems 87

preinstallation requirementsHP-UX 28nameserver 40Solaris 31

problem solving 153internal tables, SharePlex

altering 62installing 61storage parameters 167

IP address in cluster 54, 85

K

kernel configurationHP Tru64 34HP-UX 28Red Hat Linux 38Sun Solaris 31

L

large objects, replicating 25, 82libraries

links in /var/adm directory 12problems with 160, 161

Page 202: SPO Install Guide530

190 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 190 Friday, March 17, 2006 5:59 PM

license keyadding

Windows cluster 85Windows system 97

demonstration 27, 84verifying for UNIX cluster 56viewing on UNIX system 51

Linuxpreinstallation procedures 37

lmt_setup.sh script 68, 104LOBs, replicating 25, 82LOG_PARALLELISM parameter, checking value 24, 81

M

machine namein cluster 54, 85non-alphanumeric 11, 76resolving 76

marker file, SharePlex 12, 52memory requirements for SharePlex 11MKS 74MKS Toolkit

changing Global Resources setting 96, 107Mortice Kern Systems 74

N

nameservernon-alphanumeric machine name 11, 76preinstallation instructions 40

networkrequirements for installation 11SharePlex port for 14, 75solving related installation problems 155, 157using SSH 14, 75

NFS installation for SharePlex 42nofiles value 12nosuid-mounted filesystem 10

Page 203: SPO Install Guide530

CHAPTER D 191How SharePlex Works

SP_INST_DEMO_GD.book Page 191 Friday, March 17, 2006 5:59 PM

O

objectslocating for replication 81SharePlex 167

operator 59, 117optimizer, and SharePlex tables 25, 82ora_cleansp

how to run 169in conflict-resolution demo 148in transformation demo 144

ora_setupand EXTSHM environment variable 39

ora_setup (OraSetup)UNIX systems 61Windows 99

Oracle9i-supported DDL 21, 80client 78creating SharePlex account

UNIX systems 61, 99Windows systems 99

hot backup to synchronize data 22, 79libraries 160

location problems 161Name Server use with SharePlex 26optimizer and SharePlex tables 25, 82SharePlex account

UNIX systems 21, 61Windows systems 80, 99

version 9.2.x and SharePlex port number 14, 75ORACLE_HOME 23

determining 23, 160ORACLE_SID 81, 159

determining 160of database instance 23

oratab file 62, 160

P

page file size on Windows 74

Page 204: SPO Install Guide530

192 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 192 Friday, March 17, 2006 5:59 PM

parameter forSharePlex port number 15

parametersfile 98for cluster

UNIX 54Windows 111

password for SharePlexUNIX systems 61Windows systems 99

peer-to-peer replication 147per process memory requirements 11perf_mon.sh script 126, 140permissions

to run as non-root 10port number

UNIX systems 14Windows systems 75

Preinstallation Checklist 9, 73privileges

in Oracle for SharePlex 21, 80limiting users’ 58, 116

problems with installation 153product directory, description 17, 76programs group for SharePlex 94

R

raw devices 17, 18read privileges 21, 80redo logs 19, 21, 27, 80, 84removing

SharePlexfrom UNIX system 175from Windows system 178

replicationdemonstrations

advanced 133basic 119

purpose and advantages of 2rim sub-directory 77

Page 205: SPO Install Guide530

CHAPTER D 193How SharePlex Works

SP_INST_DEMO_GD.book Page 193 Friday, March 17, 2006 5:59 PM

role for SharePlex in Oracle 21, 80root

changing SharePlex permissions from 10installing and running as 10

routing map 123row chaining, implications for replication 25, 82

S

sam 28sample_config configuration 125schema, SharePlex 21, 80security

controlling sp_ctrl access 58, 116enabling on Windows systems 74for network connections 14, 75

semaphores, SharePlex requirementsHP Tru64 systems 34HP-UX 28per process setting 11Red Hat Linux 38Sun Solaris 31

semmni parameter 31, 34, 38semmns parameter 31, 38semmnu parameter 28, 31, 38semmsl parameter 31, 34, 38semopm parameter 34, 38semume parameter 31, 34, 38service, SharePlex 104set-user-id of SharePlex 22shared memory, SharePlex requirements

HP Tru64 systems 34HP-UX 28Red Hat Linux 38Sun Solaris 31

shared variable-data directory 77

Page 206: SPO Install Guide530

194 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 194 Friday, March 17, 2006 5:59 PM

SharePlexAdministrator 14, 27, 59, 84, 117advantages 2binaries for Oracle versions 23, 24groups

adding to nameservers 40assigning users 58, 116

installation instructionsUNIX systems 7Windows systems 71

license keyentering 48, 98viewing on UNIX 51

marker file 12operators 59, 117Oracle account

UNIX systems 61, 99Windows systems 99

per process memory for 11port number

UNIX systems 14Windows systems 75

product directory 17, 90programs group 94queues 77, 127removing

from UNIX system 175from Windows system 178

running as non-root 10service

removing 178Status Database 129tables

minimizing contention 26, 83sizing 25, 82storage and descriptions 167

uninstallingUNIX 175Windows 178

users and groups 58, 116variable-data directory 18, 77

Page 207: SPO Install Guide530

CHAPTER D 195How SharePlex Works

SP_INST_DEMO_GD.book Page 195 Friday, March 17, 2006 5:59 PM

viewers 59, 117SHAREPLEX_ACT_MARKER table 167SHAREPLEX_ACTID table 167SHAREPLEX_COMMAND table 167SHAREPLEX_CONFIG table 167SHAREPLEX_DATAEQUATOR table 167SHAREPLEX_DATAEQUATOR_RESULTS table 167SHAREPLEX_LOBMAP table 167SHAREPLEX_MARKER table 167SHAREPLEX_OBJMAP table 167SHAREPLEX_OOS_KEYS 167SHAREPLEX_OOS_MASTER 167SHAREPLEX_PARTITION table 167SHAREPLEX_ROWIDMAP table 25, 82, 167SHAREPLEX_TRANS table 167shmmax parameter 29, 31, 34, 38shmmin parameter 31, 38shmmni parameter 31, 38shmseg parameter 31, 38shortcuts, in Program Manager 94soft limit for file descriptors 12Solaris, see Sun Solarissorts, tablespace for 26, 83source

instance 120objects, definition 123

source-system priority 147sp_cop

definition 10port number 14, 75running as non-root 10set-user-id 10shell for running 19starting on UNIX systems 121starting on Windows systems 121

SP_COP_TPORT parameter 15SP_COP_UPORT parameter 15Sp_Copsrv.exe 104

Page 208: SPO Install Guide530

196 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 196 Friday, March 17, 2006 5:59 PM

sp_ctrlcontrolling access 58, 116setting a default port number 106starting

UNIX system 121Windows system 114

SP_QUE_SYNC parameter 55, 110SP_SYS_HOST_NAME parameter 54, 110SP_SYS_VARDIR parameter 54, 110spadmin group

assigning 59, 117available commands for 59, 117installing on NIS 40

SpClient, installation 91splex default user 120splex_get_key 51splex_remove script 176spopr group

assigning 59, 117available commands for 59, 117installing on NIS 40

spview groupassigning 59, 117available commands for 59, 117installing on NIS 40

SQL*Plus, and ora_setup 22SSH software

using with SharePlex 14, 75Status Database 129storage

SharePlex objects 167storage parameters for SharePlex objects 167Sun Solaris

preinstallation instructions 31setting system file descriptors 12

superuser 42, 44, 45symbolic links to /var/adm/.splex directory 53sysconfigdb command 34sysdef command 32system file descriptors, setting 12

Page 209: SPO Install Guide530

CHAPTER D 197How SharePlex Works

SP_INST_DEMO_GD.book Page 197 Friday, March 17, 2006 5:59 PM

T

tablescontaining more than 255 columns 104SharePlex internal 167

tablespaceindex 26, 83privileges 21, 80temporary 26, 83

targetdatabase 129objects, definition 123

temporary tablespace for SharePlex 26, 83test machine, installing on 73timestamp priority 147transformation.SID file 145troubleshooting installation 153

U

ulimit setting 12umask setting 11uninstalling

SharePlexUNIX system 175Windows system 178

upgradingdatabase 20, 79SharePlex 8, 72

userSharePlex

creating on UNIX systems 61, 99

Page 210: SPO Install Guide530

198 SHAREPLEX® FOR ORACLEInstallation and Demonstration Guide Version 5.3.0

SP_INST_DEMO_GD.book Page 198 Friday, March 17, 2006 5:59 PM

V

variable-data directorycreating

UNIX systems 18Windows systems 77

location in a cluster 17, 18on cluster

Windows 77size and location 18

versionsof SharePlex binaries 23, 24

vi editor 123viewer 59, 117Volume Manager 10, 154

W

Windowsdetermining ORACLE_SID 160installing SharePlex 71page file size 74partition requirements 74SharePlex requirements 73uninstalling SharePlex from 178