Using Sybase Failover in a High Availability System

Similar documents
Supplement for Installing Adaptive Server for Common Criteria Configuration

Installation and Release Bulletin ASE Real Time Services Option for Windows and UNIX

Adaptive Server Enterprise

Heterogeneous Replication Guide

Release Bulletin Risk Analytics Platform 2.0

User s Guide. Monitor Server

Release Bulletin DataWindow.NET 2.0

Adaptive Server Enterprise

Release Bulletin InfoMaker 10.5

Adaptive Server Enterprise

Enterprise Connect Data Access and Mainframe Connect

Installation Guide. PocketBuilder 2.0

What s New in Replication Server?

Configuration Guide Adaptive Server Enterprise WINDOWS NT

Installation Guide Adaptive Server Enterprise IPF/HP-UX

Installation Guide. jconnect for JDBC 6.0

Adaptive Server Enterprise

Using Adaptive Server Distributed Transaction Management Features

Connecting to Your Database. PowerBuilder 10.5

Installation Guide Software Developer s Kit and Open Server MICROSOFT WINDOWS

Installation Guide. SQL Expert 15.0

Release Bulletin EDI Products 4.2

Transaction Router Service User s Guide

Reference Application Integrator for CICS

Risk Analytics Platform

New Features Mainframe Connect IPS 12.6

Mainframe Connect DirectConnect for z/os Option

Embedded SQL /C Programmer s Guide

Installation Guide. jconnect for JDBC 6.05

Replication Server Heterogeneous Edition

Enterprise Connect Data Access

Reference Guide. ECMap. Version 4.2. [ Windows ]

Overview Guide. Mainframe Connect 15.0

Feature Guide. EAServer. Version 5.2

Sybase Adaptive Server Enterprise Installation Guide. Linux/Intel

Programmer s Reference for Remote Stored Procedures. Open ServerConnect TM. Version 4.0

Sybase Replication Agent

QAnywhere User s Guide

Enterprise Connect Data Access Options

New Features in DataWindow.NET 2.0

API Reference Manual. EAServer. Version 5.2

Heterogeneous Replication Guide. Replication Server 15.2

Reference Guide. EC Gateway. Version 4.2. [ Windows ]

Sybase Data Integration Suite

What s New in EAServer. EAServer. Version 5.2

Programmer s Reference for PL/1

Troubleshooting Guide

Performance and Tuning Guide. EAServer. Version 5.2

What s New. Replication Server 15.0

Adaptive Server Enterprise

Configuration and User s Guide. RepConnector 15.0

Installation Guide Adaptive Server Enterprise. Linux/Intel

Administration Guide. Mirror Activator [ Linux, Microsoft Windows, and UNIX ]

Adaptive Server Enterprise

Sybase Replication Agent

MobiLink Tutorials Part number: DC Last modified: October 2004

Installation Guide Adaptive Server Enterprise HP 9000/800 HP-UX

New Features. EDI Products 5.0

Release Bulletin Sybase Replication Server Version 12.6 for IBM AIX

New Features EDI Products 4.2

Mainframe Connect Server Option

API Reference Manual. EAServer 6.0

Adaptive Server Enterprise

MobiLink Clients Part number: DC Last modified: October 2004

Open Client and Open Server

Risk Analytics Platform

Sybase PowerDesigner Business Process Model. User s Guide

Release Bulletin Enterprise Connect Data Access for Microsoft Windows

Cookbook. EAServer. Version 5.2

Installation Guide. Sybase PowerDesigner Windows

Web Services Toolkit User s Guide

Mainframe Connect Client Option

Troubleshooting Guide

Installation Guide. RepConnector 15.0 [ WINDOWS, LINUX, UNIX ]

Mainframe Connect Server Option

Installation Guide. Replication Server [ Windows ]

New Functionality in Sybase Adaptive Server Enterprise

Samples. Sybase WorkSpace 2.0.2

Adaptive Server Enterprise

Adaptive Server Anywhere SNMP Extension Agent User s Guide

Release Bulletin Sybase Mobile Workflow for SAP Business Suite 1.2.1

Common Libraries Reference Manual

Troubleshooting Guide. EAServer. Version 5.2

Release Bulletin PowerBuilder Application Server Plug-In 1.0 for Windows

DRAFT. Sybase, Inc. One Sybase Drive Dublin, CA Sybase Avaki EII Provisioning and Advanced Data Integration Guide

Design Guide. Replication Server 15.1

Command Line Tools Guide. e-biz Impact 5.4.5

Release Bulletin Open Client and Open Server Version for Windows

Administration Guide: Volume 2. Replication Server 12.6

Adaptive Server Enterprise

What s New. Replication Server

Release Bulletin Adaptive Server Enterprise Version for Linux

Java Message Service User s Guide. EAServer 6.0

XA-Server Integration Guide for TUXEDO

Release Bulletin Adaptive Server Enterprise Version for Mac OS X 10.3

Introduction to Sybase IQ. Sybase IQ 12.7

Connecting to Your Database. PowerBuilder 11.5

New Features Summary PowerDesigner 15.2

Performance and Tuning Guide. EAServer 6.0

Installing and Administering a Satellite Environment

Transcription:

Using Sybase Failover in a High Availability System Adaptive Server Enterprise 12.5.1

DOCUMENT ID: DC31651-01-1251-02 LAST REVISED: September 2003 Copyright 1989-2003 by Sybase, Inc. All rights reserved. This publication pertains to Sybase software and to any subsequent release until otherwise indicated in new editions or technical notes. Information in this document is subject to change without notice. The software described herein is furnished under a license agreement, and it may be used or copied only in accordance with the terms of that agreement. To order additional documents, U.S. and Canadian customers should call Customer Fulfillment at (800) 685-8225, fax (617) 229-9845. Customers in other countries with a U.S. license agreement may contact Customer Fulfillment via the above fax number. All other international customers should contact their Sybase subsidiary or local distributor. Upgrades are provided only at regularly scheduled software release dates. No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of Sybase, Inc. Sybase, the Sybase logo, AccelaTrade, ADA Workbench, Adaptable Windowing Environment, Adaptive Component Architecture, Adaptive Server, Adaptive Server Anywhere, Adaptive Server Enterprise, Adaptive Server Enterprise Monitor, Adaptive Server Enterprise Replication, Adaptive Server Everywhere, Adaptive Server IQ, Adaptive Warehouse, Anywhere Studio, Application Manager, AppModeler, APT Workbench, APT-Build, APT-Edit, APT-Execute, APT-FORMS, APT-Translator, APT-Library, AvantGo, AvantGo Application Alerts, AvantGo Mobile Delivery, AvantGo Mobile Document Viewer, AvantGo Mobile Inspection, AvantGo Mobile Marketing Channel, AvantGo Mobile Pharma, AvantGo Mobile Sales, AvantGo Pylon, AvantGo Pylon Application Server, AvantGo Pylon Conduit, AvantGo Pylon PIM Server, AvantGo Pylon Pro, Backup Server, BizTracker, ClearConnect, Client-Library, Client Services, Convoy/DM, Copernicus, Data Pipeline, Data Workbench, DataArchitect, Database Analyzer, DataExpress, DataServer, DataWindow, DB-Library, dbqueue, Developers Workbench, Direct Connect Anywhere, DirectConnect, Distribution Director, e-adk, E-Anywhere, e-biz Integrator, E-Whatever, EC Gateway, ECMAP, ECRTP, efulfillment Accelerator, Embedded SQL, EMS, Enterprise Application Studio, Enterprise Client/Server, Enterprise Connect, Enterprise Data Studio, Enterprise Manager, Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise Work Designer, Enterprise Work Modeler, eprocurement Accelerator, EWA, Financial Fusion, Financial Fusion Server, Gateway Manager, GlobalFIX, ImpactNow, Industry Warehouse Studio, InfoMaker, Information Anywhere, Information Everywhere, InformationConnect, InternetBuilder, iscript, Jaguar CTS, jconnect for JDBC, Mail Anywhere Studio, MainframeConnect, Maintenance Express, Manage Anywhere Studio, M-Business Channel, M-Business Network, M-Business Server, MDI Access Server, MDI Database Gateway, media.splash, MetaWorks, My AvantGo, My AvantGo Media Channel, My AvantGo Mobile Marketing, MySupport, Net-Gateway, Net-Library, New Era of Networks, ObjectConnect, ObjectCycle, OmniConnect, OmniSQL Access Module, OmniSQL Toolkit, Open Biz, Open Client, Open ClientConnect, Open Client/Server, Open Client/Server Interfaces, Open Gateway, Open Server, Open ServerConnect, Open Solutions, Optima++, PB-Gen, PC APT Execute, PC Net Library, PocketBuilder, Pocket PowerBuilder, Power++, power.stop, PowerAMC, PowerBuilder, PowerBuilder Foundation Class Library, PowerDesigner, PowerDimensions, PowerDynamo, PowerJ, PowerScript, PowerSite, PowerSocket, Powersoft, PowerStage, PowerStudio, PowerTips, Powersoft Portfolio, Powersoft Professional, PowerWare Desktop, PowerWare Enterprise, ProcessAnalyst, Rapport, Report Workbench, Report-Execute, Replication Agent, Replication Driver, Replication Server, Replication Server Manager, Replication Toolkit, Resource Manager, RW-DisplayLib, S-Designor, SDF, Secure SQL Server, Secure SQL Toolset, Security Guardian, SKILS, smart.partners, smart.parts, smart.script, SQL Advantage, SQL Anywhere, SQL Anywhere Studio, SQL Code Checker, SQL Debug, SQL Edit, SQL Edit/TPU, SQL Everywhere, SQL Modeler, SQL Remote, SQL Server, SQL Server Manager, SQL SMART, SQL Toolset, SQL Server/CFT, SQL Server/DBM, SQL Server SNMP SubAgent, SQL Station, SQLJ, STEP, SupportNow, S.W.I.F.T. Message Format Libraries, Sybase Central, Sybase Client/Server Interfaces, Sybase Financial Server, Sybase Gateways, Sybase MPP, Sybase SQL Desktop, Sybase SQL Lifecycle, Sybase SQL Workgroup, Sybase User Workbench, SybaseWare, Syber Financial, SyberAssist, SyBooks, System 10, System 11, System XI (logo), SystemTools, Tabular Data Stream, TradeForce, Transact-SQL, Translation Toolkit, UltraLite.NET, UNIBOM, Unilib, Uninull, Unisep, Unistring, URK Runtime Kit for UniCode, Viewer, Visual Components, VisualSpeller, VisualWriter, VQL, WarehouseArchitect, Warehouse Control Center, Warehouse Studio, Warehouse WORKS, Watcom, Watcom SQL, Watcom SQL Server, Web Deployment Kit, Web.PB, Web.SQL, WebSights, WebViewer, WorkGroup SQL Server, XA-Library, XA-Server and XP Server are trademarks of Sybase, Inc. 03/03 Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. All other company and product names used herein may be trademarks or registered trademarks of their respective companies. Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies. Sybase, Inc., One Sybase Drive, Dublin, CA 94568.

Contents About This Book... xv CHAPTER 1 What is High Availability?... 1 What is High Availability?... 1 Differences between active-active and active-passive configurations... 3 Requirements for failover... 3 Resource requirements... 4 Applications running with Sybase s failover... 5 How does Sybase s failover work with high availability?... 5 Single system presentation... 7 Special considerations for Sybase failover... 7 Installing the monitoring tables scripts... 7 Using failover with disk mirroring... 8 installhasvss script... 8 SYB_HACMP server entry... 9 Define user-defined data types in Adaptive Servers before configuring them for failover... 9 Adaptive Server and two-phase commit transactions... 9 CHAPTER 2 Failover and Failback... 11 What is failover?... 11 Client connections during failover... 13 User logins in failover... 14 What is failback?... 14 Performing failback... 15 Cluster locks in a high availability node... 16 CHAPTER 3 Asymmetric and Symmetric Setup... 19 Asymmetric and symmetric configuration... 19 Asymmetric companion configuration... 19 Symmetric companion configuration... 21 Determining the name of the companion server with Using Sybase Failover in a High Availability System iii

Contents @@hacmpservername... 22 Auditing in a high availability system... 23 Setting auditing options... 24 CHAPTER 4 Modes of Failover... 27 What are modes?... 27 Determining the companion s mode... 28 Different modes of a companion server... 29 Domains... 32 CHAPTER 5 Proxy Databases, User Databases, and Proxy System Tables. 35 Proxy databases... 35 Creating proxy databases... 36 Size of the proxy databases... 37 Behavior of commands and system procedures in proxy databases... 38 Manually updating the proxy databases... 40 Proxy system tables in master... 40 CHAPTER 6 Running do_advisory... 43 What is the do_advisory option?... 43 How do I run the do_advisory option?... 47 Quorum attributes... 48 CHAPTER 7 Configuring Adaptive Server for Failover on HP... 51 Configuring hardware and operating system for high availability... 51 Preparing Adaptive Server to work with the HA subsystem... 52 Install Adaptive Servers... 52 Add entries for both Adaptive Servers to the interfaces file... 52 Set the value of $SYBASE... 53 sybha executable... 54 Create new default device other than master... 55 Add local server to sysservers... 55 Run installhasvss to install HA stored procedures... 56 Assign ha_role to system administrator... 56 Verify configuration parameters... 57 Configuring HP for failover... 57 Create the package configuration... 58 Edit the ASE_HA.sh script... 59 Verify and distribute the configuration... 68 Configuring companion servers for failover... 69 Run sp_companion with do_advisory option... 70 iv Adaptive Server Enterprise

Contents Configure for asymmetric configuration... 70 Configure for symmetric configuration... 71 Administering Sybase failover... 72 Failing back to the primary companion and resuming normal companion mode... 73 Suspending companion mode... 74 Dropping companion mode... 75 Troubleshooting Sybase failover on HP... 76 Error message 18750... 76 Recovering from a failed prepare_failback... 77 Location of error logs... 78 CHAPTER 8 Configuring Adaptive Server for Failover on IBM AIX... 79 Configuring hardware and operating system for high availability... 79 Requirements for running Sybase s failover on IBM AIX... 80 Preparing Adaptive Server to work with the HA subsystem... 81 Install Adaptive Servers... 81 Add entries for both Adaptive Servers to the interfaces file... 82 Set the value of $SYBASE... 83 sybha executable... 84 Verify configuration parameters... 85 Add thresholds to the master log... 85 Create new default device other than master... 86 Add local server to sysservers... 86 Run installhasvss to install HA stored procedures... 87 Assign ha_role to system administrator... 87 Configure the IBM AIX Subsystem for Sybase Failover... 87 Modify the ASE_HA.sh Script... 88 Configure the resource groups in HACMP... 93 Configuring companion servers for failover... 95 Run sp_companion with do_advisory option... 95 Configure for asymmetric configuration... 95 Configure for symmetric configuration... 97 Bring up primary companion as a monitored resource... 98 Administering Sybase failover... 99 Failing back to the primary node... 99 Suspending companion mode... 100 Resuming normal companion mode... 101 Dropping companion mode... 102 Troubleshooting failover on HACMP for AIX... 103 Error message 18750... 103 Recovering from a failed prepare_failback... 104 Location of failover logs... 105 Using Sybase Failover in a High Availability System v

Contents CHAPTER 9 Configuring Adaptive Server for Failover on HP Tru64 TruCluster Server 5.x... 107 Configuring hardware and operating system for high availability. 107 Requirements for running Sybase s failover on HP TruCluster... 108 Preparing Adaptive Server to work with The HA subsystem... 108 Install Adaptive Servers... 108 Add entries for both Adaptive Servers to the interfaces file.. 109 sybha executable... 110 Verify configuration parameters... 111 Add thresholds to the master log... 111 Create new default device other than master... 112 Add the local server to sysservers... 112 Assign ha_role to the system administrator... 113 Run installhasvss to install HA stored procedures... 113 Configure the HP Tru64 subsystem for Sybase s failover... 114 Modify the ASE_HA.sh script... 114 Modify the ASE_HA.cap profile... 118 Configure companion servers for failover... 119 Run sp_companion with do_advisory Option... 119 Configure for asymmetric configuration... 119 Configure for symmetric configuration... 121 Bring up primary companion as a monitored resource... 122 Administering Sybase failover... 122 Failing back to the primary node... 122 Suspending companion mode... 124 Resuming normal companion mode... 125 Dropping companion mode... 126 Troubleshooting failover on TruCluster Server for HP Tru64... 127 Error message 18750... 127 Recovering from a failed prepare_failback... 128 Location of failover logs... 128 CHAPTER 10 Active-Active Configuration for Sun Cluster 2.2... 129 Configuring hardware and operating system requirements... 129 Prepare Adaptive Server to work with the HA Subsystem... 130 Install Adaptive Servers... 130 Add entries for both Adaptive Servers to the interfaces file.. 131 Make the value of $SYBASE the same for both companions 132 The sybha executable... 132 Create new default device other than master... 134 Add the local server to sysservers... 134 Run installhasvss to install HA stored procedures... 135 Assign ha_role to system administrator... 135 vi Adaptive Server Enterprise

Contents Verify configuration parameters... 135 Add thresholds to the master log... 136 Configuring the Sun Cluster subsystem for Sybase failover... 136 Configure companion servers for failover... 142 Run sp_companion with do_advisory option... 142 Configure for asymmetric configuration... 142 Configure for symmetric configuration... 144 Administrating Sybase s failover... 144 Failing back to the primary companion... 145 Suspending normal companion mode... 146 Resuming normal companion mode... 146 Dropping companion mode... 147 Troubleshooting failover for Sun Cluster... 147 Recovering from a failed prepare_failback... 149 Location of the logs... 150 CHAPTER 11 Active-Active Configuration for Sun Cluster 3.0... 151 Configuring hardware and operating system requirements... 151 Active-active setup in Sun Cluster 3.0... 152 Preparing Adaptive Server for active-active setup... 154 Installing Adaptive Servers... 154 Adding entries for both Adaptive Servers to the interfaces file 154 Making the value of $SYBASE the same for both companions 155 Executing sybha... 156 Creating new default devices... 157 Adding the local server to sysservers... 158 Assigning ha_role to system administrator... 158 Installing HA stored procedures... 158 Verifying configuration parameters... 159 Adding thresholds to the master log... 159 Add user and login for fault monitor... 160 Configuring the Sun Cluster 3.0 subsystem... 160 The syscadm script... 162 Adaptive Server Resource extension properties... 164 Configuring Adaptive Server resource groups... 166 Using SUNW.HAStoragePlus... 168 Configuring companion servers for failover... 170 Setting the HA services library within Adaptive Server... 170 Running sp_companion with do_advisory... 171 Configuring for asymmetric configuration... 172 Configuring for symmetric configuration... 174 Administering Sybase Failover... 175 Failing back to the primary companion... 175 Suspending normal companion mode... 176 Using Sybase Failover in a High Availability System vii

Contents Resuming normal companion mode... 177 Dropping companion mode... 177 Verifying high availability on Sun Cluster 3.0... 178 Configuring the resource groups manually... 180 Primary companion resource group... 180 Secondary companion resource group... 183 Troubleshooting... 185 Recovering from a failed prepare_failback... 185 Recovering from a secondary failover on the secondary companion... 186 Prevent failover of secondary companion... 186 Changing resource and resource group state... 186 Sample sysc_input_file... 187 Location of the logs... 189 CHAPTER 12 Active-Passive Configuration for Sun Cluster 3.0... 191 Hardware and Operating System requirements... 192 Active-passive setup in Sun Cluster 3.0... 192 Failing back in an active-passive configuration... 196 Clients in an active-passive configuration... 196 Preparing Adaptive Server for active-passive setup... 197 Installing Adaptive Server... 197 Passing environment to Adaptive Server... 198 Running License Manager in the Cluster... 198 Add entry for Adaptive Server to the interfaces file... 199 Verify configuration parameters... 202 Add thresholds to the master log... 202 Add user and login for fault monitor... 202 Configuring the Sun Cluster 3.0 subsystem... 203 The syscadm script... 205 Configuring Adaptive Server resource group... 207 Adaptive Server Resource extension properties... 208 Using SUNW.HAStoragePlus... 210 Verifying the active-passive configuration... 212 Working with a multi node cluster... 214 Multi node setup... 214 Configuring the resource group manually... 215 Sample sysc_input_file... 218 Location of the logs... 220 CHAPTER 13 Configuring Adaptive Server for Failover on Veritas, 1.3... 221 Hardware and operating system requirements... 221 Preparing Adaptive Server to work with the HA subsystem... 223 viii Adaptive Server Enterprise

Contents Installing Adaptive Servers... 224 Adding entries for both Adaptive Servers to the interfaces file 224 The sybha executable... 225 Creating a new default device... 226 Adding the local server to sysservers... 226 Assigning ha_role... 227 Installing HA stored procedures... 227 Verifying configuration parameters... 228 Adding thresholds to the master log... 228 Configuring the Veritas subsystem for Sybase Failover... 229 Installing the HAase agent... 229 Creating an Adaptive Server login file... 230 Importing the HAase resource type... 230 Starting the HAase agent... 231 Adding the HAase resource... 231 Configuring an instance of HAase resource for each service group 234 Configuring companion servers for Failover... 235 Adding user and login for HA monitor... 235 Running sp_companion with do_advisory... 236 Verifying the HA agent... 236 Configuring for asymmetric configuration... 237 Configuring for symmetric configuration... 239 Administering Sybase Failover... 240 During failover... 240 Failing back to the primary companion... 240 Suspending normal companion mode... 241 Resuming normal companion mode... 242 Dropping companion mode... 243 Troubleshooting Failover for Veritas Cluster... 243 Recovering from a failed prepare_failback... 244 Location of the logs... 245 Upgrading from an agent of resource type Sybase... 245 CHAPTER 14 Configuring Adaptive Server for Failover on Veritas, 3.5... 247 Hardware and operating system requirements... 247 Preparing Adaptive Server to work with the HA subsystem... 249 Installing Adaptive Servers... 250 Adding entries for both Adaptive Servers to the interfaces file 250 The sybha executable... 251 Creating a new default device... 252 Adding the local server to sysservers... 252 Assigning ha_role... 253 Installing HA stored procedures... 253 Using Sybase Failover in a High Availability System ix

Contents Verifying configuration parameters... 254 Adding thresholds to the master log... 254 Configuring the Veritas subsystem for Sybase Failover... 255 Installing the HAase agent... 255 Creating an Adaptive Server login file... 256 Importing the HAase resource type... 256 Starting the HAase agent... 257 Adding the HAase resource... 257 Configuring an instance of HAase resource for each service group 260 Configuring companion servers for Failover... 261 Adding user and login for HA monitor... 261 Running sp_companion with do_advisory... 262 Verifying the HA agent... 262 Configuring for asymmetric configuration... 263 Configuring for symmetric configuration... 265 Administering Sybase Failover... 266 During failover... 266 Failing back to the primary companion... 266 Suspending normal companion mode... 267 Resuming normal companion mode... 268 Dropping companion mode... 269 Troubleshooting Failover for Veritas Cluster... 269 Recovering from a failed prepare_failback... 270 Location of the logs... 271 Upgrading from an agent of resource type Sybase... 271 CHAPTER 15 Configuring Adaptive Server for Failover on SGI IRIX... 273 Configuring hardware and operating system for high availability. 273 Preparing Adaptive Server to work with the high availability subsystem 274 Planning the installation... 274 Make the value of $SYBASE the same for both companions 276 Install Adaptive Servers... 277 Selecting the server name... 277 Errorlog location... 277 HA login and password requirements... 277 Install Sybase licenses... 278 Build user databases on the primary companion... 278 Add Entries for Both Adaptive Servers to the Interfaces File 278 Create new default device other than master... 279 Add the local server to sysservers... 279 Assign ha_role to system administrator... 280 Run installhasvss to install HA stored procedures... 280 x Adaptive Server Enterprise

Contents Verify configuration parameters... 281 Add thresholds to the master log... 281 Configure companion servers for failover... 281 Run sp_companion with do_advisory option... 282 Configure for asymmetric configuration... 282 Configure for symmetric configuration... 284 Configure the IRIX failsafe with Sybase s failover... 285 Hardware configuration... 285 Install the FailSafe scripts... 287 Start the FailSafe configuration tool... 288 Define the primary node... 289 Define the secondary node... 291 Define the failover policies for the primary node... 293 Define the failover policy for the secondary node... 294 Define the cluster... 295 Define the logical volume resource for the primary node... 296 Define the logical volume resource for the secondary node. 297 Define the file system resource for the primary... 297 Define the file system resource for the secondary node... 299 Define the Adaptive Server resources on the primary... 300 Define the Adaptive Server resources for the secondary node 302 Define the resource groups on the primary node... 305 Define the resource group for the secondary node... 306 Start the high availability services... 307 Bring the primary resource group online... 308 Bring the secondary resource group online... 308 Administering the High-Availability Environment... 309 Failing over... 309 Failing back to the primary companion... 309 Suspending normal companion... 313 Tailoring IRIX FailSafe with Sybase s Failover... 315 The SWITCHES File... 315 Calls to Replication Server and other applications... 316 Example hook in start script... 316 Troubleshooting IRIX FailSafe with Sybase Failover... 317 Simulating a node failure... 317 Recovering from a failed manual prepare_failback... 318 Inadvertently shutting down the secondary companion... 319 Location of the IRIX FailSafe logs... 320 Errors from resource groups running on two nodes... 321 Manually mounting the file systems... 323 CHAPTER 16 Configuring Adaptive Server for Failover on Windows NT... 325 Configuring hardware and operating system for High Availability 325 Using Sybase Failover in a High Availability System xi

Contents Prepare Adaptive Server for HA configuration... 326 Install Adaptive Servers... 326 Add entries for both Adaptive Servers to sql.ini... 327 Create new default device other than master... 328 Add primary companion as a local server... 329 Run insthasv to install HA stored procedures... 329 Assign ha_role to system administrator... 329 Verify configuration parameters... 330 Run sp_companion with do_advisory option... 330 Configuring Windows NT for failover... 331 Configure for asymmetric configuration from the command Line. 331 Configure for symmetric setup from the command line... 333 Configure Windows NT for failover using cluster administrator... 334 Configuring and securing Microsoft Cluster Server... 336 Check the MSCS configuration... 337 Securing the MSCS cluster... 338 Troubleshooting Sybase failover on Windows NT... 338 Error message 18750... 339 Recovering from a failed prepare_failback... 340 APPENDIX A Troubleshooting Second Point of Failures... 341 Troubleshooting with dbcc ha_admin... 341 Re-Installing installmaster and installhasvss... 341 Using dbcc ha_admin to Address Second Point of Failures for Failover and prepare_failback... 343 Error Messages 18805, 18769, 18836... 344 APPENDIX B Changes to Commands, System Procedures, System Databases, and New dbcc Commands, and Functions... 347 Changes to commands in asymmetric and symmetric mode... 347 Changes to System Procedures in Adaptive Server Configured for Failover... 349 System Procedures Hold Table Lock When Modifying System Tables... 350 System procedures that synchronize changes between primary and secondary... 350 Changes to System Procedures in A Failover Configuration 351 dbcc Options for High Availability Systems... 354 dbcc dbrepair Option for Sybase Failover... 356 APPENDIX C Open Client Functionality in a Failover Configuration... 357 xii Adaptive Server Enterprise

Contents CTLIB application changes... 357 Glossary... 359 Index... 361 Using Sybase Failover in a High Availability System xiii

xiv Adaptive Server Enterprise

About This Book Audience How to use this book This manual is intended for Sybase System Administrators and Database Owners. This book describes how to install, configure, and use Sybase Failover in a high availability system. Chapter 1, What is High Availability? introduces the concepts of a high availability system and Sybase s Failover. Chapter 2, Failover and Failback provides an overview of the concepts of failing over and failing back between Adaptive Servers in a high availability system. Chapter 3, Asymmetric and Symmetric Setup discusses the differences between asymmetric and symmetric configurations. Chapter 4, Modes of Failover describes the different modes in which Adaptive Server operates when configured for failover. Chapter 5, Proxy Databases, User Databases, and Proxy System Tables discusses the concepts of proxy databases, the effect of failover on user databases, and the concepts of proxy system tables. Chapter 6, Running do_advisory describes how to configure two Adaptive Servers for failover. Chapter 7, Configuring Adaptive Server for Failover on HP describes how to configure Failover on HP. Chapter 8, Configuring Adaptive Server for Failover on IBM AIX describes how to configurefailover on IBM AIX. Chapter 9, Configuring Adaptive Server for Failover on HP Tru64 TruCluster Server 5.x describes how to configure Failover on Digital Unix TruCluster. Chapter 10, Active-Active Configuration for Sun Cluster 2.2 describes how to configure Failover on Sun. Chapter 11, Active-Active Configuration for Sun Cluster 3.0, describes the how to configure Failover on the Sun Cluster 3.0. Using Sybase Failover in a High Availability System xv

Related documents Chapter 12, Active-Passive Configuration for Sun Cluster 3.0, describes how to configurean active-passive setup for Sun Cluster 3.0. Chapter 13, Configuring Adaptive Server for Failover on Veritas, 1.3, describes how to configure Failover on Veritas. Chapter 14, Configuring Adaptive Server for Failover on Veritas, 3.5, describes how to configure Failover on Veritas version 3.5 and higher. Chapter 15, Configuring Adaptive Server for Failover on SGI IRIX, describes how to configure Failover on SGI IRIX. Chapter 16, Configuring Adaptive Server for Failover on Windows NT describes how to configure Failover on Windows NT. Appendix A, Troubleshooting Second Point of Failures describes methods of troubleshooting second point of failures. Appendix B, Changes to Commands, System Procedures, System Databases, and New dbcc Commands, and Functions describes how commands, system procedures, and system databases change when Adaptive Server is configured for failover. Appendix C, Open Client Functionality in a Failover Configuration describes changes required for Open Client to work with Sybase s Failover. The Glossary defines terms used specifically with Sybase s Failover. The Sybase Adaptive Server Enterprise documentation set consists of the following: The release bulletin for your platform contains last-minute information that was too late to be included in the books. A more recent version of the release bulletin may be available on the World Wide Web. To check for critical product or document information that was added after the release of the product CD, use the Sybase Technical Library. The Installation Guide for your platform describes installation, upgrade, and configuration procedures for all Adaptive Server and related Sybase products. What s New in Adaptive Server Enterprise? describes the new features in Adaptive Server version 12.5.1, the system changes added to support those features, and the changes that may affect your existing applications. xvi Adaptive Server Enterprise

About This Book ASE Replicator User s Guide describes how to use the ASE Replicator feature of Adaptive Server to implement basic replication from a primary server to one or more remote Adaptive Servers. Component Integration Services User s Guide explains how to use the Adaptive Server Component Integration Services feature to connect remote Sybase and non-sybase databases. Configuring Adaptive Server Enterprise for your platform provides instructions for performing specific configuration tasks for Adaptive Server. EJB Server User s Guide explains how to use EJB Server to deploy and execute Enterprise JavaBeans in Adaptive Server. Error Messages and Troubleshooting Guide explains how to resolve frequently occurring error messages and describes solutions to system problems frequently encountered by users. Full-Text Search Specialty Data Store User s Guide describes how to use the Full-Text Search feature with Verity to search Adaptive Server Enterprise data. Glossary defines technical terms used in the Adaptive Server documentation. Historical Server User s Guide describes how to use Historical Server to obtain performance information for SQL Server and Adaptive Server. Java in Adaptive Server Enterprise describes how to install and use Java classes as data types, functions, and stored procedures in the Adaptive Server database. Job Scheduler User s Guide provides instructions on how to install and configure, and create and schedule jobs on a local or remote Adaptive Server using the command line or a graphical user interface (GUI). Monitor Client Library Programmer s Guide describes how to write Monitor Client Library applications that access Adaptive Server performance data. Monitor Server User s Guide describes how to use Monitor Server to obtain performance statistics from SQL Server and Adaptive Server. Performance and Tuning Guide is a series of four books that explains how to tune Adaptive Server for maximum performance: Basics the basics for understanding and investigating performance questions in Adaptive Server. Using Sybase Failover in a High Availability System xvii

Locking describes how the various locking schemas can be used for improving performance in Adaptive Server. Optimizer and Abstract Plans describes how the optimizer processes queries and how abstract plans can be used to change some of the optimizer plans. Monitoring and Analyzing explains how statistics are obtained and used for monitoring and optimizing performance. Quick Reference Guide provides a comprehensive listing of the names and syntax for commands, functions, system procedures, extended system procedures, datatypes, and utilities in a pocket-sized book. Reference Manual is a series of four books that contains the following detailed Transact-SQL information: Building Blocks Transact-SQL datatypes, functions, global variables, expressions, identifiers and wildcards, and reserved words. Commands Transact-SQL commands. Procedures Transact-SQL system procedures, catalog stored procedures, system extended stored procedures, and dbcc stored procedures. Tables Transact-SQL system tables and dbcc tables. System Administration Guide provides in-depth information about administering servers and databases. This manual includes instructions and guidelines for managing physical resources, security, user and system databases, and specifying character conversion, international language, and sort order settings. System Tables Diagram illustrates system tables and their entity relationships in a poster format. Available only in print version. Transact-SQL User s Guide documents Transact-SQL, Sybase s enhanced version of the relational database language. This manual serves as a textbook for beginning users of the database management system. This manual also contains descriptions of the pubs2 and pubs3 sample databases. Using Adaptive Server Distributed Transaction Management Features explains how to configure, use, and troubleshoot Adaptive Server DTM features in distributed transaction processing environments. xviii Adaptive Server Enterprise

About This Book Other sources of information Sybase certifications on the Web Using Sybase Failover in a High Availability System provides instructions for using Sybase s Failover to configure an Adaptive Server as a companion server in a high availability system. Utility Guide documents the Adaptive Server utility programs, such as isql and bcp, which are executed at the operating system level. Web Services User s Guide explains how to configure, use, and troubleshoot Web Services for Adaptive Server. XA Interface Integration Guide for CICS, Encina, and TUXEDO provides instructions for using the Sybase DTM XA interface with X/Open XA transaction managers. XML Services in Adaptive Server Enterprise describes the Sybase native XML processor and the Sybase Java-based XML support, introduces XML in the database, and documents the query and mapping functions that comprise XML Services. Use the Sybase Getting Started CD, the Sybase Technical Library CD and the Technical Library Product Manuals Web site to learn more about your product: The Getting Started CD contains release bulletins and installation guides in PDF format, and may also contain other documents or updated information not included on the Technical Library CD. It is included with your software. To read or print documents on the Getting Started CD you need Adobe Acrobat Reader (downloadable at no charge from the Adobe Web site, using a link provided on the CD). The Technical Library CD contains product manuals and is included with your software. The DynaText reader (included on the Technical Library CD) allows you to access technical information about your product in an easy-to-use format. Refer to the Technical Library Installation Guide in your documentation package for instructions on installing and starting the Technical Library. The Technical Library Product Manuals Web site is an HTML version of the Technical Library CD that you can access using a standard Web browser. In addition to product manuals, you will find links to EBFs/Updates, Technical Documents, Case Management, Solved Cases, newsgroups, and the Sybase Developer Network. To access the Technical Library Product Manuals Web site, go to Product Manuals at http://www.sybase.com/support/manuals/. Technical documentation at the Sybase Web site is updated frequently. Using Sybase Failover in a High Availability System xix

v v Finding the latest information on product certifications 1 Point your Web browser to Technical Documents at http://www.sybase.com/support/techdocs/. 2 Select Products from the navigation bar on the left. 3 Select a product name from the product list and click Go. 4 Select the Certification Report filter, specify a time frame, and click Go. 5 Click a Certification Report title to display the report. Creating a personalized view of the Sybase Web site (including support pages) Set up a MySybase profile. MySybase is a free service that allows you to create a personalized view of Sybase Web pages. Sybase EBFs and software updates Conventions v 1 Point your Web browser to Technical Documents at http://www.sybase.com/support/techdocs/. 2 Click MySybase and create a MySybase profile. Finding the latest information on EBFs and software updates 1 Point your Web browser to the Sybase Support Page at http://www.sybase.com/support. 2 Select EBFs/Updates. Enter user name and password information, if prompted (for existing Web accounts) or create a new account (a free service). 3 Select a product. 4 Specify a time frame and click Go. 5 Click the Info icon to display the EBF/Update report, or click the product description to download the software. The following sections describe conventions used in this manual. SQL is a free-form language. There are no rules about the number of words you can put on a line or where you must break a line. However, for readability, all examples and most syntax statements in this manual are formatted so that each clause of a statement begins on a new line. Clauses that have more than one part extend to additional lines, which are indented. Complex commands are formatted using modified Backus Naur Form (BNF) notation. Table 1 shows the conventions for syntax statements that appear in this manual: xx Adaptive Server Enterprise

About This Book Element Command names,procedure names, utility names, and other keywords display in sans serif font. Database names and datatypes are in sans serif font. Book names, file names, variables, and path names are in italics. Variables or words that stand for values that you fill in when they are part of a query or statement, are in italics in Courier font. Type parentheses as part of the command. Double colon, equals sign indicates that the syntax is written in BNF notation. Do not type this symbol. Indicates is defined as. Curly braces mean that you must choose at least one of the enclosed options. Do not type the braces. Brackets mean that to choose one or more of the enclosed options is optional. Do not type the brackets. The comma means you may choose as many of the options shown as you want. Separate your choices with commas as part of the command. The pipe or vertical bar( ) means you may select only one of the options shown. An ellipsis (...) means that you can repeat the last unit as many times as you like. Table 1: Font and syntax conventions for this manual Example select sp_configure master database Syntax statements (displaying the syntax and all options for a command) appear as follows: sp_dropdevice [device_name] For a command with more options: select column_name from table_name where search_conditions System Administration Guide sql.ini file column_name $SYBASE/ASE directory select column_name from table_name where search_conditions compute row_aggregate (column_name) ::= {cash, check, credit} [cash check credit] cash, check, credit cash check credit buy thing = price [cash check credit] [, thing = price [cash check credit]]... You must buy at least one thing and give its price. You may choose a method of payment: one of the items enclosed in square brackets. You may also choose to buy additional things: as many of them as you like. For each thing you buy, give its name, its price, and (optionally) a method of payment. Using Sybase Failover in a High Availability System xxi

In syntax statements, keywords (commands) are in normal font and identifiers are in lowercase. Italic font shows user-supplied words. Examples showing the use of Transact-SQL commands are printed like this: select * from publishers Examples of output from the computer appear as follows: pub_id pub_name city state ------- --------------------- ----------- ----- 0736 New Age Books Boston MA 0877 Binnet & Hardley Washington DC 1389 Algodata Infosystems Berkeley CA (3 rows affected) In this manual, most of the examples are in lowercase. However, you can disregard case when typing Transact-SQL keywords. For example, SELECT, Select, and select are the same. Adaptive Server s sensitivity to the case of database objects, such as table names, depends on the sort order installed on Adaptive Server. You can change case sensitivity for single-byte character sets by reconfiguring the Adaptive Server sort order. For more information, see the System Administration Guide. If you need help Each Sybase installation that has purchased a support contract has one or more designated people who are authorized to contact Sybase Technical Support. If you cannot resolve a problem using the manuals or online help, please have the designated person contact Sybase Technical Support or the Sybase subsidiary in your area. xxii Adaptive Server Enterprise

CHAPTER 1 What is High Availability? This chapter includes the following sections: Name Page What is High Availability? 1 How does Sybase s failover work with high availability? 5 Single system presentation 7 Special considerations for Sybase failover 7 What is High Availability? A high availability cluster includes two or more machines that are configured so that, if one machine (or application) is brought down, the second machine assumes the workload of both machines. Each of these machines is called one node of the high availability cluster. A high availability cluster is typically used in an environment that must always be available, for example, a banking system to which clients must connect continuously, 365 days a year. Sybase s Failover product enables Adaptive Server to work in a high availability cluster in active-active or active-passive configuration. Active-active configuration An active-active setup is a two node configuration where both nodes in the cluster include Adaptive Servers managing independent workloads, and are capable of taking over each other s workload in the event of a failure. The Adaptive Server that takes over the workload is called a secondary companion, and the Adaptive Server that fails is called the primary companion. Together they are companion servers. This movement from one node to another is called failover. After the primary companion is ready to resume its workload, it is moved back to its original node. This movement is called failback. During failover clients connected to the primary companion using the failover property automatically reestablish their network connections to the secondary companion. Using Sybase Failover in a High Availability System 1

What is High Availability? You must tune your operating system to successfully manage both Adaptive Servers during failover. See your operating system documentation for information about reconfiguring your system for high availability. Note An Adaptive Server configured for failover in an active-active setup can be shut down using the shutdown command only after you have suspended Adaptive Server from the companion configuration, at both the server level and the platform level. For more information, see the configuration chapter of this manual for your platform. Active-passive configuration The active-passive configuration is a multi-node setup that involves a single Adaptive Server, a primary node on which the Adaptive Server primarily runs, and a set of secondary nodes which can potentially host the Adaptive Server and its resources. When the Adaptive Server can no longer continue to run on the primary node, failover occurs and the Adaptive Server is relocated and restarted on a secondary node. The Adaptive Server can be moved back to the primary node after it recovers and when it can successfully host the Adaptive Server and any associated resources. In the case of failover or failback, clients connected to the Adaptive Server reestablish their network connections and resubmit any uncommitted transactions when the Adaptive Server is restarted on the secondary node. Client connections using the failover property automatically reestablish their connections. Sybase provides active-passive configuration support for Sun Cluster 3.0. Contact your provider for other cluster platforms. See Chapter 12, Active- Passive Configuration for Sun Cluster 3.0, for detailed information on configuring Adaptive Server in the active-passive mode for Sun Cluster 3.0. Other chapters of this manual pertain to the active-active configuration unless otherwise specified. Note Adaptive Server configured for failover in an active-passive setup can be shut down using the shutdown command only after you disable monitoring on the Adaptive Server at the platform level. 2 Adaptive Server Enterprise

CHAPTER 1 What is High Availability? Differences between active-active and active-passive configurations Table 1-1 summarizes the differences between an active-active and an activepassive configuration. Table 1-1: Difference between active-active and active-passive Active-active Setup: Two Adaptive Servers are configured as companion servers, each with independent work loads. These companions run on the primary and secondary nodes, respectively, as individual servers until failover. Failover: When failover occurs, the secondary companion takes over the devices, client connections, and so on from the primary companion. The secondary companion services the failed-over clients, as well as any new clients, until the primary companion fails back and resumes its activities. Failback: Failback is a planned event during which the primary companion takes back its devices and client connections from the secondary companion to resume its services. Client Connection failover: During failover, clients connect to the secondary companion to resubmit their uncommitted transactions. During failback clients connect to the primary companion to resubmit their transactions. Clients with the failover property reestablish their connections automatically. Active-passive Setup: A single Adaptive Server runs either on the primary node or on the secondary node. The Adaptive Server runs on the primary node before failover and the secondary node after failover. Failover: When failover occurs, the Adaptive Server and its associated resources are relocated to, and restarted on, the secondary node. Failback: Failback is a planned failover or relocation of the Adaptive Server and its resources to the primary node. Failback is not required, but can be done for administrative purposes. Client Connection failover: During failover and failback, clients connect to the same Adaptive Server to resubmit uncommitted transactions. Clients with the failover property reestablish their connections automatically. Requirements for failover You must purchase the ASE_HA license option to use Adaptive Server with Failover. See the Installation Guide for information about enabling the ASE_HA license. Using Sybase Failover in a High Availability System 3

What is High Availability? The two Adaptive Servers in a high availability system must have similar, compatible configurations. Both must be Running Adaptive Server 12.0 or higher. Running the latest version of Open Client. At the same release level. The must have a compatible configuration. Running Component Integration Services (CIS). Running a high availability subsystem (for example Sun Cluster, Windows NT running the Microsoft Server Cluster, and so on). Configured for parallel or non-parallel processing. Resource requirements Adaptive Servers configured as companions in a high availability system have different resource requirements than Adaptive Servers that function individually. These different resource requirements exists because the secondary companion must process all the work during failover. This is true even if the companions are setup asymmetrically. Consequently, an Adaptive Server in a high availability system has higher resource requirements than it would have if it was a single server. For more information, see Single system presentation on page 7. The following are some of the resource requirements that you should consider when you configure Adaptive Server as a cluster companion (your site will have its own set of resource requirements that must be addressed). Logins, roles, and databases You must set the number of logins, roles, and databases for the cluster equal to the total number for one Adaptive Server. number of user connections Each companion must be configured for the total number of user connections required for the system. number of open databases Each companion must be configured for the total number of open databases required for the system. srids Each companion must be configured for the total number of srids required for the system. 4 Adaptive Server Enterprise

CHAPTER 1 What is High Availability? number of devices Each must be configured for the total number of devices used by the cluster, not the number of devices used individually. That is, if one companion uses 14 devices and the second uses 23, each Adaptive Server must be configured with 37 as the number of devices. The sp_configure option number of open databases on an Adaptive Server configured for Failover is reduced by two to ensure successful failover. That is, if you currently have the number of open databases set to 10, you will only be able to open eight databases. The sp_configure option number of user connections on an Adaptive Server configured for Failover is reduced by two to ensure successful failover. That is, if you currently have the number of user connections set to 50, you will only be able to use 48 user connections. Applications running with Sybase s failover Client applications that connect to companion servers must re-link their libraries with the libraries included with failover software. See CTLIB application changes on page 357 for more information about using Open Client with failover. How does Sybase s failover work with high availability? A high availability system includes the hardware and software necessary to limit the amount of downtime a system suffers. Sybase s Failover is one piece of software in this high availability system. It provides the ability for the companion to withstand a single point of failure in the cluster. Using Sybase Failover in a High Availability System 5

How does Sybase s failover work with high availability? A system that uses Sybase Failover includes only two machines. Each machine is one node of the high availability cluster. Each Adaptive Server is either a primary companion or secondary companion. Each companion performs the work during operations; the secondary companion takes over the workload when the primary companion fails or is brought down. The primary companion can be brought down for any number of reasons: scheduled maintenance, system failure, power outage, and so on. The event of the second server assuming another server s workload is called failover. The event of moving the workload back to the original server once it is up and running again is called failback. Figure 1-1 describes a typical configuration consisting of two Adaptive Servers. Included with the operating system is a high availability subsystem (for example, Sun Cluster for Sun, Microsoft Cluster Server for Windows NT, and so on) that detects and broadcasts to the cluster that part of the system is crashing or is being shut down for maintenance. When Adaptive Server goes down, the high availability subsystem tells the second machine to take over its workload. Any clients connected to the Adaptive Server going down are reconnected to the second Adaptive Server. Figure 1-1illustrates a high availability cluster is made up of two machines using Sybase s Failover: Figure 1-1: High availability system using Sybase s Failover 6 Adaptive Server Enterprise