You are on page 1of 3

2018-06-10 2165143 Page 1/3

2165143 - How to perform a planned or unplanned failover -


SAP ASE and SRS
SAP Knowledge Base
Version 3 Type
Article
Master
Language English English
Language
Release
Released to Customer Category How To
Status
BC-SYB-REP-SAP (Replication with SAP Suite /
Component Released On 02.05.2016
SAP BW)

Please find the original document at https://launchpad.support.sap.com/#/notes/2165143

Symptom

How to perform a planned or unplanned failover?


You need a detailed procedure to proceed.

Environment

SAP Adaptive Server Enterprise (ASE) for Business Suite 15.7 SP121 and higher
Disaster Recovery with SAP Replication Server (SRS) 15.7.1 SP 121 and higher

Resolution

Planned failover

1. Suspend business activity if possible, to ensure a clean transition to the standby site. Make sure that
there are no batch processes running or long running transaction, which would prevent failover to go
through.
2. Log in to to the DR Agent: isql -UDR_admin -S<hostname>:<DR agent port> -X
3. Execute sap_failover:
sap_failover <primary_logical_host_name>, <standby_logical_host_name>,<timeout> [,force]
where
a. timeout - is the number of seconds the process will wait for transactions to commit. If the timeout is
reached, while there are still active transactions, the failover process will be aborted and the server
will be reinstated as primary.
b. force - (Optional) causes the failover process to continue if the timeout value is reached. In this
case active transaction will be canceled and rolled back.

The Replication Server is reconfigured to accept activity from the standby database. sap_failover executes
asynchronously in the background.

1. Use sap_status task to check for successful completion of the sap_failover request.
2. Redirect clients and applications to the standby site.
Once sap_failover executes successfully, the standby databases contain the same content as the
primary. Application or client activity can now be directed to the standby server.
3. Then execute:
sap_host_available <former_primary_logical_host_name>

© 2018 SAP SE or an SAP affiliate company. All rights reserved


2018-06-10 2165143 Page 2/3

This command executes synchronously.

1. Use sap_status path to check for successful completion of the sap_failover request.

Unplanned failover

It is required when the primary SAP ASE is unavailable. If the primary DR Agent is also unavailable, connect to
the standby DR Agent to execute the commands below.

Note the 'unplanned' option is available since SAP Replication Server 15.7.1 SP 121.

1. Log in to to the DR Agent: isql -UDR_admin -S<hostname>:<DR agent port> -X


2. Execute sap_failover with the unplanned option:
sap_failover <primary_logical_host_name>, <standby_logical_host_name>,<timeout>, unplanned

Once the unplanned failover has finished the SAP application can connect to the new primary site and
work can continue.

1. Repair and restart the former primary SAP ASE and the former primary SAP Replication Server to start
and become available and ensure that all servers in the HADR system are available for replication.
2. Reconfigure the former primary SAP ASE database as the new standby for the activity occurring at the
former standby SAP ASE database site:
sap_host_available <primary_logical_host_name>
3. Stop replication from the former standby SAP ASE (current primary) to the former primary SAP ASE
(current standby):
sap_disable_replication <current_primary_logical_host_name>
4. Reset replication from the former standby SAP ASE (current primary) to the former primary SAP ASE
(current standby):
sap_enable_replication <current_primary_logical_host_name>

After an unplanned failover we must assume that some application data was lost and the two databases
are not synchronized anymore. Therefore, you will need to rematerialize the former primary site. You
must reset replication to prepare for rematerialization of the former primary SAP ASE.

5. Rematerialize the databases from the current primary site to the former primary site:

See KBA 2089569

Keywords

Failover, "Disaster Recovery", HADR

Products

SAP Adaptive Server Enterprise 15.7


SAP Replication Server 15.7

© 2018 SAP SE or an SAP affiliate company. All rights reserved


2018-06-10 2165143 Page 3/3

This document refers to

SAP Note/KBA Title

2089569 How to re-materialize master or SID databases - SAP ASE and SRS

Terms of use | Copyright | Trademark | Legal Disclosure | Privacy

© 2018 SAP SE or an SAP affiliate company. All rights reserved

You might also like