start / stop oracle services on solaris / windows

hi all,
I need to start/stop oracle services on solaris/windows
platforms from my java application.
What should I do ?
(if I have to execute any scripts please let me know which).
thanks
Eran
raichelAsked:
Who is Participating?
 
p_yaroslavConnect With a Mentor Commented:
Hi!

There are two scripts for start/stop databases.
1. $ORACLE_HOME/bin/dbstart (start databases)
2. $ORACLE_HOME/bin/dbshut (stop databases)

These scripts look for database names in file /var/opt/oracle/oratab .

You may copy these scripts and change them for appropriate needs.

Best regards!

Yaroslav.
0
 
raichelAuthor Commented:
hi and thanks,
I guess these scripts are for Solaris ?
what should I do for windows ?
and to what should I change them ?
Eran
0
 
p_yaroslavCommented:
Hi!
Yes, these scripts for solaris.

For example, this script stops Oracle DB "ORCL" (for any UNIX systems) :
------------------------------
#!/bin/ksh
export ORACLE_SID=ORCL
export ORACLE_HOME=/mount_point/ora8

$ORACLE_HOME/bin/sqlplus /nolog <<EOD
connect internal
shutdown immediate
exit
EOD
------------------------------
ORACLE_HOME - environment variable where you install your Oracle software.


For windows you may write similar script.
Unfortunaly, I don't remember exactly windows syntax.

Best regards!
Yarodlav.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
waynezhuCommented:
On windows, the Services are the counterparts of S/K scripts of Solaris. When setting to auto, the OS
will take care of it at the time of startup/shutdown the machine.
0
 
waynezhuConnect With a Mentor Commented:
On Windows, from command line, you can do either

net start OracleServiceSID
net stop OracleServiceSID

or

oradim -startup -sid SID
oradim -shutdown -sid SID [-shutmode [i|a|n]]
0
 
FelixSasiKumarCommented:
Very simple, go to controlpanel->service, stop the oracleservice<SID>.

0
 
MoondancerCommented:
Please update and finalize this question.  I am happy to help split points or otherwise help you with special handling needs.  Expert input always appreciated.
Moondancer - EE Moderator
0
 
anand_2000vCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Points split between p_yaroslav  and waynezhu
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

anand_2000v
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.