[62246] in SAPr3-news

home help back first fref pref prev next nref lref last post

Re: ups shutdowns scripts for sap / oracle on win 2003

daemon@ATHENA.MIT.EDU (Werner Flamme)
Tue Nov 3 11:23:22 2009

To: sapr3-news@mit.edu
Date: Tue, 03 Nov 2009 17:16:28 +0100
From: Werner Flamme <werner.flamme@ufz.de>
Message-ID: <7lb3atF3cpr58U1@mid.dfncis.de>

riggor9999 [03.11.2009 16:34]:
> Hello -
> 
> We normally run Unix / Oracle but I now have a sandbox running two SAP 
> instances (Sol Man 7.0 and NetWeaver 7.0) on Windows 2003.
> 
> I am trying write windows scripts to stop SAP and stop Oracle when the UPS 
> senses a power failure / low battery.  This was very easy with Unix as 
> "stopsap" will stop SAP and Oracle.  While in windows "stopsap" only stops 
> SAP, not Oracle.

Do the parameters r3 and db not work with Windows? I used "stopsap r3"
to fire up my system after the DB was running (which I did with "lsnrctl
stop" plus the scripted sqlplus shutdown command - but "stopsap db" has
worked sometimes, too). But I did this with Linux, I was never condamned
to run SAP on Windows :->

> The other factor is that I have two SAP instances and two Oracle instances - 
> which probably need two diff scripts running under diff userids.

I think so, yes, because the Unix' "su" command is not widespread under
Windows ;-) And since each SAP instance and DB instance has its own
owner, you will have to run multiple scripts.

> Bottom line is - I need a windows 2003 cmd script to run an automated sap 
> and oracle shutdown when the OS / UPS sense a power loss  /  low battery 
> condition.

Can't you use the "net stop %SAPSERVICENAME%" command? AFAIK there are
SAP Services in the system control board, and they usually can be
started an stopped via Windows' "net" command. I do not know about
Oracle, though.

HTH
Werner

home help back first fref pref prev next nref lref last post