Technology Blog Posts by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
matthias_hollstein
Participant
0 Kudos
538

In the past it was possible to start NetWeaver together with Sybase DB when executing startsap. Since startsap is not recommended by SAP and other security related changes, the startup of the sybase DB is not easy going.

According SAP Note 1902347 - Unable to start database with startsap - SAP ASE for Business Suite and following Notes for execution of startup (and shutdown) of the Sybase Database, Hostcontrol is recommended now ("sybctrl is removed from saproot.sh starting SAP Kernel 7.53").

I've figured out an example that you can use in crontab to enable autostart of Sybase DB (and NetWeaver) after system has booted and a shutdown procedure before system shutdown execution.

You have to create two text files in specific location that will be used by crontab for execution.

startup script file content:
date
sleep 5m
date
csh -c '/usr/sap/hostctrl/exe/saphostctrl -function StartDatabase -dbname <DBNAME> -dbtype syb'
date
sudo -H -u <sid>adm csh -c '/usr/sap/<SID>/SCS01/exe/sapcontrol -nr 01 -function StartSystem ALL'
date

shutdown script file content:
date
sudo -H -u <sid>adm csh -c '/usr/sap/<SID>/J00/exe/sapcontrol -nr 00 -function StopSystem ALL'
date
csh -c '/usr/sap/hostctrl/exe/saphostctrl -function StopDatabase -dbname <DBNAME> -dbtype syb'
date
sleep 1m
date
sudo su -c "shutdown now"

Remarks:

  • date is only for observing execution
  • enter your own SID instead of <SID> or <sid>
  • enter your own DB name instead of <DBNAME>

Crontab content:
# m h d M wd #
#45 10 * * * /scripts/startup > /scripts/startup.log
* 20 * * * /scripts/shutdown
@reboot /scripts/startup > /scripts/startup.log

Remark: crontab is created for root user.

Here you can see execution of autostart on our system:

nwdi_startup.png

and the shutdown procedure:

nwdi_shutdown.png

Hopefully this is helpful for you, since it tooks me several triales and errors to solve that issue and became the system automatically started and stopped, since sybctrl was removed from saproot.sh.

Regards
Matthias