SAP Knowledge Base Article - Preview

2185595 - SAP SRS: stopsap DB fails: SQLGetDiagRec: (9699) [ZZZZZ] [SAP][ASE ODBC Driver][Adaptive Server Enterprise]Shutdown failed: the primary server has not been deactivated.

Symptom

SAP SRS: stopsap DB fails: SQLGetDiagRec: (9699) [ZZZZZ] [SAP][ASE ODBC Driver][Adaptive Server Enterprise]Shutdown failed: the primary server has not been deactivated.
"stopdb" hangs with the same message in log file. It is called by "stopsap DB" command so this is not surprising


When trying to use stopsap to stop the complete environment.
It is returning a “shutdown failed” error since replication environment has been configured.
The aim is just to stop the system, not to make a failover.

The log should be drainned to be sure all transactions already committed are replicated.
Can we do that without having to deactivate the replication?
The error message suggest to use the “nowait_hadr” option for the shutdown, is there a way to indicate that option when using stopsap ?

> stopsap
Checking syb Database
Database is running
-------------------------------------------
stopping the SAP instance ...

Shutdown-Log is written to ...stopsap_....log
-------------------------------------------
sapcontrol -prot NI_HTTP -nr 00 -function
Stop
Instance on host xxxxx stopped
Waiting for cleanup of resources

replication server installed
stopping database  ...

 
=> stopsap hangs forever

In dev_sybctrl trace file :

2014 12/26 10:18:21 == file opened ==
read user/password from secstore
dbs/syb/user: sapsa
read password from secstore rc (0)
connected (14796192)
ExecDirect: set chained on
ExecDirect: shutdown with wait = '00:02:00'
SQLGetDiagRec 0
SQLGetDiagRec: (9699) [ZZZZZ] [SAP][ASE ODBC Driver][Adaptive Server
Enterprise]Shutdown failed: the primary server has not been
deactivated. Please use sp_hadr_admin to deactivate the primary server
and drain the transaction logs or use the shutdown option nowait_hadr.

How to stop properly a SAP system on Sybase with SRS?


Read more...

Environment

SRS 1571

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Replication Server 15.7

Keywords

stopsap , stopdb , dev_sybctrl, deactivated, drained, sp_hadr_admin , KBA , BC-SYB-REP-SAP , Replication with SAP Suite / SAP BW , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.