- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron jobs - Shutdown of SAP & then Server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 12:31 AM
тАО04-26-2002 12:31 AM
Cron jobs - Shutdown of SAP & then Server
I am having a HP 9000 L1000 Server with SAP R/3 Installed on HP-Unix 11i.
Kindly if someone can guide me, if I need to shutdown SAP database & then Server at certian scheduled time, what is the way I can create CRON Jobs.
Awaiting replies..!
With Regards,
Naveen Shetty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 12:36 AM
тАО04-26-2002 12:36 AM
Re: Cron jobs - Shutdown of SAP & then Server
crontab -e
This will bring you to the cron editor interface.
It's vi based.
you enter the command as follows:
minute hour month day day_of_month weekday command
to shut down sap I'd look for /sbin/init.d/
this would be assuming that SAP follows the HPUX standard of putting startup and shutdown scripts in /sbin/init.d
hope this helps.
Scott.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 01:00 AM
тАО04-26-2002 01:00 AM
Re: Cron jobs - Shutdown of SAP & then Server
Thank you for your reply..!
Pls note to shutdown the SAP Database it is necessary to login as oracle user & also it is not thru /sbin/init.d/(script).
Kindly suggest..!
With Regds
Naveen Shetty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 02:45 AM
тАО04-26-2002 02:45 AM
Re: Cron jobs - Shutdown of SAP & then Server
as root-cron set
22 00 5 5 * su - sidadm -c "stopsap"
Hope this helps
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 03:00 AM
тАО04-26-2002 03:00 AM
Re: Cron jobs - Shutdown of SAP & then Server
create a script and place it in /sbin/init.d
command for stopping sap and oracle in this script like:
su - sapadm -c stopsap
hope that helps
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 03:10 AM
тАО04-26-2002 03:10 AM
Re: Cron jobs - Shutdown of SAP & then Server
You can set up a cron job using the cron -e command, tha sap script to startup or shutdown would be something like the following:
30 4 * * 1-6 /opt/omni/lbin/start_sap_production
where in your case obviously specify the path where the script is, in our case it is in /opt/omni/lbin and owned by root and group is sys. In the start_sap_production script we have the Database server and the app servers, which should be like:
remsh hp01base -n "su - c11adm -c startsap "
remsh hp02base -n "su - c11adm -c startsap &"
remsh hp05base -n "su - c11adm -c startsap &"
remsh hp04base -n "su - c11adm -c startsap &"
Just change the start with stop, and that should work to stop the DB and app servers. Hope this helps, thanks.
Regards
Khurram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 05:38 AM
тАО04-26-2002 05:38 AM
Re: Cron jobs - Shutdown of SAP & then Server
# Script shuts down OW and Oracle, performs a cold backup, then restarts them
# Su to jdeb7331 to shut down OneWorld
date > /cron_out/jde.out
su - jdeb7331 -c /u02/oneworld/b7331/system/bin32/EndOneWorld.sh >> /cron_out/jde.out
# Call script to shut down Oracle
date > /cron_out/ora.out
su - oracle -c /app/oracle/cron/orashut.sh >> /cron_out/ora.out
# Back up Oracle databse (/oradata01 and /oradata02)
/opt/omni/bin/omnib 2>&1 -host alphaerp -compress -exclude /stand -exclude /usr -exclude /var -exclude /opt -exclude /tmp -exclude /app -exclude /home -exclude /u02 -exclude /archive -exclude /sbin -exclude /dev -exclude /oraexport -exclude /arc_tmp -exclude /omnidb -exclude /u02/oneworld/b7331/packages -device L180_alphaerp_d1 -protect weeks 3 -keepcatalog weeks 3 -pool production_dlt
echo "The Oracle cold backup on Alphaerp finished on" `date "+%a %m-%d%n"` at `date "+%I:%M %p%n"` | mailx -s "Alphaerp
Cold Backup Complete" root
echo "The Oracle cold backup on Alphaerp finished on" `date "+%a %m-%d%n"` at `date "+%I:%M %p%n"` | mailx -s "Alphaerp
Cold Backup Complete" oracle
# Call script to restart Oracle
date >> /cron_out/ora.out
su - oracle -c /app/oracle/cron/orastart.sh >> /cron_out/ora.out
# Su to jdeb7331 to restart OneWorld
date >> /cron_out/jde.out
su - jdeb7331 -c /u02/oneworld/b7331/system/bin32/rmics.sh >> /cron_out/jde.out
su - jdeb7331 -c /u02/oneworld/b7331/system/bin32/RunOneWorld.sh >> /cron_out/jde.out
Here is the Oracle shutdown script that is called:
svrmgrl mode=line <
shutdown immediate
exit
EOFDBA
lsnrctl stop
And here is the Oracle startup script that is called:
svrmgrl mode=line <
startup open
exit
EOFDBA
lsnrctl start
I'm not sure how SAP is started and stopped, but I'd assume it's through a basic command(s) that could be replaced in the first script. Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2002 05:57 AM
тАО04-26-2002 05:57 AM
Re: Cron jobs - Shutdown of SAP & then Server
Kaise ho aap ?
I think you should write a script for SAP startup and shutdown, test it with Oracle user id and place it in the cron file. Btw, why do you want to do this ? If this is part of the backup, then look for Backup's pre and post commands/scripts ( like in OB, Legato etc). By doing this, you don't need to setup the cron job; instead configure the start and stop scripts of backup.
HTH,
Shiju