How to Set Up HA/DR and Manage SAP Sybase Replication Server

RDP243
How to Set Up HA/DR and Manage SAP Sybase
Replication Server
Andrew Bonner – Engineering Manager, replication products
October 21, 2013
Disclaimer
This presentation outlines our general product direction and should not be relied on in making a
purchase decision. This presentation is not subject to your license agreement or any other agreement
with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to
develop or release any functionality mentioned in this presentation. This presentation and SAP's
strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document is provided without a warranty of any kind, either
express or implied, including but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this
document, except if such damages were caused by SAP intentionally or grossly negligent.
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
2
Agenda
Overview
Setting up a Disaster Recovery Site
Monitoring Disaster Recovery
Failover – Switching to the Standby Site
Troubleshooting
Feedback
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
3
Overview
Presentation Objectives
Describe how to setup a Business Suite disaster recovery environment
 For Business on SAP Sybase ASE
 Using SAP Sybase Replication Server
Demonstrate key features for managing and monitoring disaster recovery
 Integration into the Business Suite SAP Tooling
Provide advanced troubleshooting solutions
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
4
What is Business Suite Disaster Recovery?
Customers now have the ability to easily create an integrated, highly available environment that allows
them to continue to operate at full speed while mission-critical business data is synchronized
continuously to a warm standby site, enabling a near zero downtime environment, should the
production system fail for any reason.
Key features include:
 Implemented for the Business Suite on SAP Sybase ASE
 Based on an extensible SAP Sybase Replication Server architecture rather than simply automating database
transaction log backup and restore
 Avoids downtime during system disruptions, such as database upgrades, hardware failure, power outages,
natural disaster or human error
 Integrated into the SAP Business Suite tooling
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
5
SAP Sybase Replication Server
For those who don’t know Replication Server,






Log based transactional replication
Transactional consistency produces a warm-standby solution
Near zero data loss
Very limited impact on primary database
Distribute and synchronize data across geographies
Extensible architecture to support reporting, data warehousing, data migration, and of course
disaster recovery
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
6
Disaster Recovery Topology
SAP Primary Site
SAP Standby Site
ASE Host
RS Host
RS Host
ASE Host
Primary
ASE
Databases
Replication
Server
Replication
Server
Standby
ASE
Databases
DR Agent
DR Agent
Management
Clients
(SAP Installer,
DBA Cockpit,
Open Client)
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
7
Disaster Recovery Topology – Shared Hosts
SAP Primary Site
Primary Host
Primary
ASE
Databases
Management
Clients
SAP Standby Site
Standby Host
Replication
Server
Replication
Server
DR Agent
DR Agent
Standby
ASE
Databases
(SAP Installer,
DBA Cockpit,
Open Client)
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
8
Setting up a Disaster Recovery Site
Using the SAP Installer to setup replication to a standby site
Steps to Setup Disaster Recovery
Use the SAP Installer to:
1.
2.
3.
4.
5.
Install a standby SAP system using ASE
Define the location of the ASE Servers
Define the hosts for the Replication Servers
Estimate the Replication Server disk buffer size
Select the materialization methods to synchronize the databases
Next, execute the process!
 That’s it!
 Once the process completes, the disaster recovery system will be setup, configured, and replicating
 The process can take several hours depending on the specified materialization method and the size of
the primary database
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
10
Estimating Disk Buffer Size
It is recommended that you examine the size and number of your transaction log dumps over time to
approximate log volume
Measure log volume during peak system usage (possibly end of the month or during nightly batch processing)
Log volume = Total space on disk of the dump files / Length of time to generate dump files (in hours)
Buffer Size = Log volume * Hours of delay desired * Buffer
where Buffer is a range from 2 – 10 representing a low disk usage (versus higher risk), to high disk
usage (versus lower risk), decision.
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
11
Materializing the Standby Database
Three options to materialize the standby database
•
manual dump/load – Utilize the existing primary database and transaction log dumps to load the
standby database
•
automatic dump/load – DR Agent will use the ASE backup server to automatically dump the primary
and load the standby database. Only recommended for small primary databases
•
external database load – Use snapshots of database device files to materialize the standby
database
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
12
Demo
Setting up a Business Suite disaster recovery site
Monitoring Disaster Recovery
Using the SAP DBA Cockpit to monitor the disaster recovery environment
SAP DBA Cockpit
DBA Cockpit can monitor the disaster recovery environment




Replication monitoring status
Replication resource usage
Latency heartbeat
Replication log messages
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
15
Monitoring Environment Status
Replication status is monitored for each path (from a primary database to its standby)
Status
Description
Defined
The state expected after setup and before materialization.
Suspended
The state expected during materialization, when data flow is suspended while waiting for load activities
to complete.
Error
An unexpected error condition. Additional manual review of the Replication Servers and Replication
Server logs may be required to understand the error.
Active
The replication path is supporting replication.
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
16
Latency Heartbeat
Latency is generated using the Replication Server rs_ticket feature
 DBA Cockpit sends a trace ticket at a specified interval
 Latency is collected at locations along the replication path and graphed by DBA Cockpit
 Actual rs_ticket records can be found in the standby database, in the rs_ticket_history table
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
17
Demo
Monitoring the disaster recovery site
Failover – Switching to the Standby Site
Using the SAP tooling to failover the end users to the standby site
Planned vs. Unplanned Failover
Failover is switching activity to the standby site in the event of a failure on the primary site
Planned Failover
 Occurs on a schedule, as a part of a test or other exercise
 Allows for an orderly sequence of steps to move processing to the standby site
Unplanned Failover
 Unscheduled, occurring unintentionally and without warning
 Similar sequence of events as a planned failover
After the replication part of failover is executed, the direction of replication is reversed
 Activity captured at the standby databases is held to be applied at the primary site when it becomes
available
 The original primary site becomes the disaster recovery location for the standby site
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
20
What Happens During Failover?
Failover is divided into two steps
Moving applications to the standby site




Monitor replication to verify all paths from the primary to the standby database are drained
Suspend the Replication Server at the standby site from applying any additional data from the primary
Start the Replication Agent threads for each database in the standby server
Reconfigure the Replication Server to accept activity from the standby database
When available, reconfigure the primary site as the new backup




Disable the Replication Agent threads on the primary databases so that no data is replicated from that site
Reconfigure the Replication Server to not accept activity from the requested site
Purge the Replication Server queues of any possible in-flight data
Reset the Replication Server at the current standby site to allow application of activity, in the event a subsequent
failover back to the primary site is needed
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
21
Performing a Planned Failover
Steps to fail over to the standby site
1.
Suspend business activity at the primary databases
2.
Shut down the SAP system (SAP system may generate activity internally)
3.
Use sapdbctrl utility to execute the failover process
4.
Redirect clients and applications to the standby site
Once failover executes successfully, the standby databases contain the same content as the primary
When the primary databases are ready to come back online
1.
Use sapdbctrl to connect the primary site as the new standby site
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
22
Performing an Unplanned Failover
The steps to perform an unplanned failover are similar to a planned failover
The time required to ensure all in-flight data has been replicated can take longer than a planned
failover
Transactions that were committed at the primary database at the time of the failure but not transferred
to the Replication Server are lost
 Lost data must be reconciled
 The primary databases must be resynchronized with the standby databases
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
23
Monitoring Resources During Failover
The backlog of the database transaction logs and Replication Server device buffers must be
monitored during failover





Transactions are stored, but cannot be committed until the primary is available
If the transaction logs fill up, the ASE will stop accepting new transactions
Disable replication if the resources become too full
Primary databases will need to be resynchronized when the site becomes available
Use DBA Cockpit to monitor backlog
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
24
Failback
Failing back so that the primary site is active is the same process as a planned failover, only in
reverse
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
25
Demo
Failover to the standby site
Troubleshooting
Solving problems
Working Directly with DR Agent
DR Agent provides the commands that SAP tooling uses to setup, manage, and monitor
disaster recovery
Connect directly into DR Agent using isql
Isql –U<DR_admin> -P<Password> -S<host:port> -X
Tasks that might be run directly from DR Agent








Re-execute failed commands
Display environment properties
Rematerialize a standby database
Temporarily suspend replication
Disable replication
Add additional buffer space
Change replication related passwords
Manually upgrade DR Agent
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
28
Disabling Replication
During a failover, if the transaction logs become full, the active databases will stop accepting
transactions
Log into the DR Agent and disable replication
1> sap_disable_replication <primary logical host>, [database]
2> go
Once disabled, the primary and standby databases will be out-of-sync
Enable replication and rematerialize the standby databases
1>
2>
1>
2>
1>
2>
sap_enable_replication <primary logical host>, [database]
go
sap_materialize start, primary, standby, D01
go
sap_materialize finish, primary, standby, D01, [,user,password]
go
Review the DR Setup and Configuration Guide for materialization options
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
29
Viewing Logs
When an error occurs
Review the SAP Install Log
Review the DR Agent Log at the primary site
 Located at $SYBASE/SCC-3_2/plugins/DR/log
Use DBA Cockpit to review the Replication Server logs
Review the ASE log
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
30
Additional Documentation
SAP Note on Troubleshooting
Contains the DR Setup and Configuration Guide
Contains the HADR Guide
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
31
Demo
Interacting with the DR Agent
Further Information
SAP Public Web
scn.sap.com
www.sap.com
SAP Education and Certification Opportunities
www.sap.com/education
Watch SAP TechEd Online
www.sapteched.com/online
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
33
SAP TechEd Virtual Hands-on Workshops and SAP TechEd Online
Continue your SAP TechEd education after the event!
SAP TechEd Virtual Hands-on Workshops
SAP TechEd Online
 Access hands-on workshops post-event
 Available January – March 2014
 Complementary with your SAP TechEd registration
 Access replays of keynotes, Demo Jam, SAP TechEd
LIVE interviews, select lecture sessions, and more!
 View content only available online
http://saptechedhandson.sap.com/
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
http://sapteched.com/online
34
Feedback
Please complete your session evaluation for RDP243
Thanks for attending this SAP TechEd session.
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
National product specifications may vary.
These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and
SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth
in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and
other countries.
Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
36