Stop/Start windows services using .bat files

195 views
Skip to first unread message

sarah.k

unread,
Jun 28, 2010, 10:24:57 AM6/28/10
to Oracle Apps Technology
Hello,

I am trying to script 2 batch files, one to stop services and one to
start services.

So far I have the folloing for the stop script:

Stop services:
set ORACLE_HOME=e:\oracle\<sid>ora\8.0.6
set ORACLE_SID=<SID>

NET STOP "Oracle Reports Server [Rep60_HPP1]"
NET STOP OracleApacheServerHPP1_spud
NET STOP OracleFulfillmentServerHPP1_spud
NET STOP OracleMetricsClientHPP1_spud
NET STOP OracleMetricsServerHPP1_spud
NET STOP OracleConcMgrHPP1_spud
NET STOP OracleHPP1Ora806_1TNSListener80APPS_HPP1

However sometimes the concurrent manager fails to stop correctly and I
have to issue a 2nd command to forcefully shut it down. Does anyone
know how I can write this into my script? before it moves onto the
Apps Listener?

Any advise would be appreciated.

Thank you

Sarah

Mostafa Eletriby

unread,
Jun 29, 2010, 2:53:40 AM6/29/10
to ski...@hallmark-uk.com, oracle-apps...@googlegroups.com
Dear Sarah,
Hope you are fine.

Please try this script, it works fine with the appropriate sequence.

To stop Apps service:
===============
Ex:
===


Date /T
Time /T


set ORACLE_HOME=e:\oracle\<sid>ora\8.0.6
set ORACLE_SID=<SID>

Net stop "OracleApacheServerHPP1_spud"
Net stop OracleFormsServer-Forms60PROD_spud
Net stop OracleConcMgrPROD_spud
Net stop "Oracle Reports Server [Rep60_spud]"
Net stop OraclePRODOra806_2TNSListener80APPS_spud

D:\oracle\proddb\9.2.0\bin\sqlplus  /nolog @d:\script\sh.sql
Net stop OraclePROD_db920_RDBMSTNSListenerPROD
Net stop OracleServicePROD


Script at  d:\script\sh.sql
===================
conn / @prod as sysdba
shutdown immediate
exit

To start having backup , & then starting Apps services:
This should be added at the script, then all the script should be scheduled by windows schedule.
==========================
EX:
===

XCOPY D:\Oracle\ProdData\*.* D:\OraBackup\prodData\*.*  /v /r /h /y
Net start OraclePROD_db920_RDBMSTNSListenerPROD
Net start OracleServicePROD
Net start OraclePRODOra806_2TNSListener80APPS_PROD
Net start OracleFormsServer-Forms60PROD_spud
Net start "Oracle Reports Server [Rep60_spud]"
Net start OracleConcMgrPROD_spud
Net start "Oracle Apache Server PROD_spud"

Date /T
Time /T

==========================================
These services can be disabled if they have no work to do.


NET STOP OracleFulfillmentServerHPP1_spud
NET STOP OracleMetricsClientHPP1_spud
NET STOP OracleMetricsServerHPP1_spud


Foe any further queries please don't hesitate to contact me.

Thanks and Best Regards
Mostafa Eletriby

 

 
 
 
--- On Mon, 6/28/10, sarah.k <ski...@hallmark-uk.com> wrote:

From: sarah.k <ski...@hallmark-uk.com>
Subject: Stop/Start windows services using .bat files
To: "Oracle Apps Technology" <oracle-apps...@googlegroups.com>
Date: Monday, June 28, 2010, 10:24 AM

Hello,

I am trying to script 2 batch files, one to stop services and one to
start services.

So far I have the following for the stop script:


Stop services:
set ORACLE_HOME=e:\oracle\<sid>ora\8.0.6
set ORACLE_SID=<SID>

NET STOP "Oracle Reports Server [Rep60_HPP1]"
NET STOP OracleApacheServerHPP1_spud
NET STOP OracleFulfillmentServerHPP1_spud
NET STOP OracleMetricsClientHPP1_spud
NET STOP OracleMetricsServerHPP1_spud
NET STOP OracleConcMgrHPP1_spud
NET STOP OracleHPP1Ora806_1TNSListener80APPS_HPP1

However sometimes the concurrent manager fails to stop correctly and I
have to issue a 2nd command to forcefully shut it down. Does anyone
know how I can write this into my script? before it moves onto the
Apps Listener?

Any advise would be appreciated.

Thank you

Sarah

--
You received this message because you are subscribed to the Google Groups "Oracle Apps Technology" group.
To post to this group, send email to oracle-apps...@googlegroups.com.
To unsubscribe from this group, send email to oracle-apps-technology+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/oracle-apps-technology?hl=en.


Reply all
Reply to author
Forward
0 new messages