SAP Knowledge Base Article - Preview

3229480 - Getting "Database in use" error while performing ASE server upgrade or stop ASE server - SAP ASE

Symptom

  • Nobody is accessing the database and all App servers are shutdown
  • Running upgrade using saphostctrl and getting following error:

    /usr/sap/hostctrl/exe/saphostctrl -user sapadm xxxxx -function LiveDatabaseUpdate -dbname XXX -dtype syb -updatemethod
    Execute -updateoption TASK=UPDATE_ASE -updateoption DROP_LOCTION''/home/basis/sybase_patch/sybase_patch" -updateoption UPDATE_FORCE=1

    Error: Command execution failed. : Database is in use. Please make sure nobody is using the database or use force option. (fault code: 127)
    Operation ID: 000D3AD9FE33E1EDCBDF52A22EE70041E

    ---- log messages ----
    Info: saphostcontrol: Executing LiveDatabaseUpdate
    Error: sapdbctrl: Database is in use. Please make sure nobody is using the database or use force option
    Error: saphostcontrol: LiveDatabaseUpdate failed (sapdbctrl exit code = 1)

  • dev_sapdbctrl shows the following error:

    [PID 71509] SigISetDefaultAction : default handling for signal SIGCHLD
    [PID 71509] ERROR AT sybOpenClient.cpp:openConnection:1696 TIME: 2021 Jun 08 17:57:20 DESCRIPTION: ct_connect failed RC=CS_FAIL using aseuserstore: sapgrpcs3 LAST OS-ERROR: (111) : Connection refused
    [PID 71509] ERROR AT sybOpenClient.cpp:openConnection:1741 TIME: 2021 Jun 08 17:57:20 DESCRIPTION: Client message: LAYER = 5 ORIGIN = 3 SEVERITY = 5 NUMBER = 4 --- Message string: ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints failed --- Operating System Error: Socket connect failed - errno 111 Connection refused LAST OS-ERROR: (111) : Connection refused
    [PID 71509] ERROR AT sybOpenClient.cpp:openConnection:1747 TIME: 2021 Jun 08 17:57:20 DESCRIPTION: Failed to open connection to 'XXX' with user 'sapsa'. Please confirm that credentials are valid and server is running LAST OS-ERROR: (111) : Connection refused
    [PID 71509] ERROR AT sybServer.cpp:openOcsConToAseAsSapsa:34677 TIME: 2021 Jun 08 17:57:20 DESCRIPTION: Failed to find credentials for sapsa user LAST OS-ERROR: (111) : Connection refused
    [PID 71509] ERROR AT sybServer.cpp:luAppendResult:39724 TIME: 2021 Jun 08 17:57:20 DESCRIPTION: Database is in use. Please make sure nobody is using the database or use force option LAST OS-ERROR: (0) : Success
    [PID 71509] *** ERROR => 'Database live update' failed: Database is in use. Please make sure nobody is using the database or use force option. [sapdbctrl.cp 4572]

  • You are trying to stop ASE server with saphostctrl command but failed with error below:
    saphostctrl -user sapadm - -function StopDatabase -dbname <SID>  -dbtype syb
    Error: Command execution failed. : Database is in use: Database is in use. Please ensure no Clients are connected and no jobs are scheduled when stopping the database. Try a force stop to shutdown the database regardless of any open connections. PLEASE NOTE: A force stop may result in data loss! (fault code: 127)

    But this ASE server can be stopped manually without any issue.


Read more...

Environment

  • SAP HOST AGENT 7.21
  • Business Suite on Adaptive Server Enterprise 16 SP04 PL02

Product

SAP Solution Manager 7.2

Keywords

Database in use, saphostctrl, StopDatabase, upgrade , KBA , BC-DB-SYB , Business Suite on Adaptive Server Enterprise , 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.