on 03-25-2011 7:16 PM
What is the best way to automatically restart SAP on a system with a CI and multiple app servers? Currently, we simply use the Windows task scheduler to run a script that runs the command line to stop SAP on each system (CI and multiple App Servers). But, there is no dependencies built in to the script. Meaning, the CI doesn't know if the app servers are stopped/started and vice versa.
I am not well versed in command line scripting in Windows, but I think I can figure it out if someone can tell me this is possible and what the best method to use might be.
How do I connect to the app servers from the CI server to run the stop/start scripts and to verify the status of SAP (whether it is indeed stopped or is indeed started)? Basically, how do I do via the command line what the SAP Management Console does automatically when you tell it to stop/start all servers for a system? Or is there a way to schedule the SAP Management Console to stop/start a system?
Hi Michael,
I assume that you have 1 CI and DI in your SAP installation. So, you can execute the script below in order to start SAP system,
D:\usr\sap\<SID>\SYS\exe\nuc\NTAMD64\sapsrvkill.exe <ci_hostname>_<SID>_<instance#>
D:\usr\sap\<SID>\SYS\exe\nuc\NTAMD64\sapsrvkill.exe <SID>_D<instance#>_<di_hostname>
D:\usr\sap\<SID>\SYS\exe\nuc\NTAMD64\sapntwaitforhalt pf=D:\usr\sap\<SID>\SYS\profile\START_DVEBMGS<instance#>_<ci_hostname> SAPDIAHOST=<ci_hostname> 120
D:\usr\sap\<SID>\SYS\exe\nuc\NTAMD64\brconnect -u / -c -f dbshut
net stop Oracle<SID>102TNSListener
net stop OracleService<SID>
net stop SAP<SID>_00
net stop SAPOsCol
After the stop operation completed respectfully, in order to start the system, execute the script below;
net start Oracle<SID>102TNSListener
net start OracleService<SID>
net start SAP<SID>_00
net start SAPOsCol
@rem D:\usr\sap\<SID>\SYS\exe\nuc\NTAMD64\brconnect -f dbstart
D:\usr\sap\<SID>\SYS\exe\nuc\NTAMD64\sapstart.exe pf=D:\usr\sap\<SID>\SYS\profile\START_DVEBMGS<instance#>_<ci_hostname> SAPDIAHOST=<ci_hostname>
D:\usr\sap\<SID>\SYS\exe\nuc\NTAMD64\sapstart.exe pf=D:\usr\sap\<SID>\SYS\profile\START_D<instance#>_<di_hostname> SAPDIAHOST=<di_hostname>
Please note that you should execute these scripts on CI. By doing so, at the first stage, your application server will be down. Then the CI will be shutdown. After these operations, the DB will be shutdown automatically. Then. you can restart the system. At the startup stage, CI will start DB automatically. Then the DI will be started. I hope that it solves your problem.
Best regards,
Orkun Gedik
SAP Senior Netweaver and Development Consultant
SAP Technical Architect
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
try to set "Autostart = 1" (it's case sensitive) in the Start Profile.
Regards
Edited by: David Trivino on Mar 29, 2011 8:26 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
To check is SAP system is alive, you can use the sapinfo program that comes with the sapgui
The syntax of SAPINFO is: sapinfo ashost=host sysnr=nn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.