About Me

My photo
I am Suresh Chinta, working on SAP HANA Cloud & SAP BTP Cloud/ AWS/Azure cloud consultant.I have experience in SAP Basis/Netweaver , S4HANA Cloud implementations / Support. I'm certified Microsoft Azure cloud & AWS professional. I have started this blog to share my knowledge with all those who are interested to learn & enhance their career.

Monday, March 30, 2020

(Un)lock the shadow instance/Starting and stopping the shadow instance manually

Symptom

When trying to logon to the shadow instance with a user other then DDIC ( in one of the MAIN_SHDPREPUT*, MAIN_SHDRUN/* , MAIN_SHDIMP/SUBMOD_SHD2_RUN/* phases)
 you get the message "Upgrade in progress: no login is possible".
In this case the shadow instance needs to be unlocked.

Solution

To unlock the shadow system, enter the following commands

UNIX:
cd /<update directory>/abap/bin   (e.g. /usr/sap/PRD/SUM/abap/bin)
./SAPup unlockshd
WINDOWS:
<drive>
cd \<update directory>\abap\bin   (e.g. \usr\sap\PRD\SUM\abap\bin)         
.\SAPup unlockshd
REMARK:
If the shadow instance is not working in the current upgrade phase, one of the following message will be displayed:
At this time of the procedure, the shadow instance does not yet exist since you are before phase START_SHDI_*!
or
At this time of the procedure, the shadow instance does not exist anymore since you are passed phase STOP_SHDI_*!"
Conclusion: Depending on the update phase another instance needs to be (un)locked.
Please follow the guide
Lock/unlock the standard instance during update.

Log on to the shadow system and correct the error.

To lock the  shadow system again, enter the following command:

UNIX:
./SAPup lockshd
WINDOWS:
.\SAPup lockshd

Related SAP notes/KBAs

SAP KBA 1901463 - How to unlock the SAP system to perform correction(s) during an upgrade.


Starting and stopping the shadow instance manually

 

Symptom

The shadow instance start/stop is controlled by the upgrade.
 Attention! Start/stop the shadow instance manually only, if it is really requested, unwanted start/stop can impact the whole update.
Possible situations, when the shadow instance needs to be started/stopped manually:
REMARK: Some instance parameter can be activated dinamically without instance restart, check the parameter documentation in the transaction RZ11.
  • Restart the shadow instance in the nZDM scenario  

Solution

To stop the shadow instance manually, proceed as follows:

Step 1

UNIX:           cd <update directory>/abap/bin           example:     cd  /usr/sap/PRD/SUM/abap/bin    
WINDOWS: <drive>                                                 example:     D:                     
                    cd <update directory>\abap\bin           example:     cd \usr\sap\SUM\abap\bin

Step 2

UNIX:            ./SAPup stopshd    
WINDOWS:  .\SAPup stopshd

Step 3

The following output can be displayed:
Enter the path of your root directory [D:\usr\sap\SUM\abap]: Root directory = 
Confirm if the correct SUM directory is displayed and press Enter
The following output will be displayed:
Stopping shadow system ...
Stopping service ...

To start the shadow instance manually, proceed as follows:

Step 1

UNIX:           cd <update directory>/abap/bin           example:     cd  /usr/sap/PRD/SUM/abap/bin    
WINDOWS: <drive>                                                 example:     D:                                            
                     cd <update directory>\abap\bin           example:     cd \usr\sap\SUM\abap\bin

Step 2

UNIX:            ./SAPup startshd    
WINDOWS:  .\SAPup startshd

Step 3

The following output will be displayed:
 Starting shadow system ...
Starting service ...
waiting 4 seconds for system to come up ...
testing if system is available ...
REMARK: If the shadow instance is not working in the current upgrade phase, one of the following message will be displayed:
  At this time of the procedure, the shadow instance does not yet exist since you are before phase START_SHDI_*!
or
At this time of the procedure, the shadow instance does not exist anymore since you are passed phase STOP_SHDI_*!"
Conclusion: Depending on the update phase another instance needs to be started or stopped.
To identify the currently used instance or to analyse other start/stop errors please follow the troubleshooting guide
 Troubleshooting instance start-stop situations during update

Caution when using IBM i (AS/400, iSeries, i5/os)!
Before the actual command for starting and stopping the shadow instance for the platform IBM i, you must start a QP2TERM session and supplement the execution environment, for example, in the following way:
1. Perform the following steps as <SID>OFR or as <SID>ADM (depending on the user concept that is active).
2. Call QP2TERM. Then in the QP2TERM session:
3. cd <upgrade_directory>/bin
4. export LIBPATH=.
5. Execute the command R3up/SAPup/SAPehpi specified below.
6. You can exit the QP2TERM session using F12/F3.
  • Starting the shadow instance
           Start SAPup   as the user <sid>adm as follows:
              SAPup  startshd
  • Stopping the shadow instance
           Stop SAPup   as the user <sid>adm as follows:
             SAPup   stopshd



Troubleshooting shadow instance start problems  

If the instance terminates with error during startup, troubleshooting steps can be found on the wiki page
Troubleshooting instance start-stop situations during updateChapter  Typical upgrade phases, where the shadow instance is used:     

Related SAP notes/KBAs

SAP note 398100 - Shadow instance during upgrade
SAP note 525677 - Problems when starting shadow instance 


Troubleshooting instance start-stop situations during update

Purpose

During update we have various situations when an instance will be started/stopped by the update tool and troubleshooting is needed.
Follow this guide to find symptoms and solutions.

Solution

1. Identify the upgrade phase

It is shown on the SUM GUI or can be found at the end of the upgrade log file
UNIX: <update directory>/log/SAPupConsole.log or <update directory>/log/SAPup.log
WINDOWS: <update directory>\log\SAPupConsole.log or <update directory>\log\SAPup.log

2. Select the upgrade phase where the start/stop situation should be checked:

Typical upgrade phases, where the shadow instance is used:
START_SHDI_PREPUT
START_SHDI_FIRST
ACT_UPG
START_SHDI_SHD2
STOP_SHDI_RES
Typical upgrade phases where the standard instance is used:
STARTSAP_TRANS
STOPSAP_TRANS
STARTSAP_NBAS
STARTSAP_PUPG or STARTSAP_TBUPG

3. If the instance needs to be started or stopped manually

please follow the steps on the pages
Starting and stopping the shadow instance manually
Starting and stopping the standard instance during update manually


Start/stop the instance manually only, if it is really requested, unwanted start/stop can impact the whole update.

Related documents

SAP Startup Troubleshooting Guide for Netweaver Application Server