Home » RDBMS Server » Server Utilities » Finding oracle instances
Finding oracle instances [message #72238] Tue, 22 April 2003 00:11 Go to next message
T. Sri Sai Krishna
Messages: 17
Registered: May 2002
Junior Member
Hi,

How does one find out the different oracle instances
that have been started up? Especially if more than
one instance of oracle is up and running.

Can this be done from server manager?

I know about using the "ps -ef | grep oracle". But
besides this is there another way.

Also how is this done for oracle instances on Windows?

Thanks in advance
Sri Sai
Re: Finding oracle instances [message #72239 is a reply to message #72238] Tue, 22 April 2003 04:07 Go to previous messageGo to next message
Uwe
Messages: 260
Registered: February 2003
Location: Zürich, Switzerland
Senior Member
Hi,

I just use the following script. I'm not sure that you can figure out if the database is up in server manager without clicking on the database. Than it will show if the instance is up (SHM is initialized)
Take a look on that script:
#! /bin/ksh

# -----------------------------------------------------------------------
# Filename: dbup.ksh
# Purpose: Check if DB's background processes are started
# Author: Frank Naude (frank@ibi.co.za)
# -----------------------------------------------------------------------

VERBOSE=0
shift OPTIND-1

for INSTANCE in $DB
do
FAILED=0; INSTANCEDOWN=0
if [[ ${VERBOSE} -eq "1" ]] ; then
echo "Checking instance ${INSTANCE}...n"
fi
for PROCESS in pmon smon
do
RC=$(ps -ef | egrep ${INSTANCE} | egrep -v 'grep' | egrep ${PROCESS})
if [[ "${RC}" = "" ]] ; then
INSTANCEDOWN=1
if [[ ${VERBOSE} -eq "1" ]] ; then
echo "tERROR: Instance ${INSTANCE} ${PROCESS} down!"
fi
fi
done
if [[ ${INSTANCEDOWN} = "1" ]] ; then
echo "`date` - Instance ${INSTANCE} is DOWN!!!n"
FAILED=1
else
echo "`date` - Instance ${INSTANCE} is running.n"
fi
done

if [[ ${FAILED} = 1 ]] ; then
return -1
else
return 0
fi

regards
Uwe
Re: Finding oracle instances [message #72241 is a reply to message #72238] Tue, 22 April 2003 07:30 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
there are a few things u can look into.
1. goto control panel /serivices for the available 
   oracle serivices.
2. u can also use pulist.exe 
   available for download [url=http://windows.about.com/gi/dynamic/offsite.htm?site=http://www.microsoft.com/windows2000/library/resources/reskit/tools/existing/pulist%2Do.asp]here[/url]

C:Program FilesResource Kit>pulist
Process           PID  User
Idle              0
System            8
SMSS.EXE          172  NT AUTHORITYSYSTEM
CSRSS.EXE         192  NT AUTHORITYSYSTEM
WINLOGON.EXE      140  NT AUTHORITYSYSTEM
SERVICES.EXE      240  NT AUTHORITYSYSTEM
LSASS.EXE         252  NT AUTHORITYSYSTEM
svchost.exe       424  NT AUTHORITYSYSTEM
spoolsv.exe       456  NT AUTHORITYSYSTEM
svchost.exe       516  NT AUTHORITYSYSTEM
inetd32.exe       532  NT AUTHORITYSYSTEM
jconfigdnt.exe    548  NT AUTHORITYSYSTEM
hjavaw.exe        580  NT AUTHORITYSYSTEM

----------------------------------------------------------------------

or simple solution is, use an unix emulator ( my favorite tool)
C:>ps -ef | grep ora
  SYSTEM   692   240  0   Apr 16 CONIN$  0:04 c:oracleora81binORACLE.EXE LOCAL
magvivek  1176   988  0   Apr 17 CONIN$  0:17 "C:Program FilesInternet ExplorerIEXPLORE.EXE" http:
magvivek  1708   988  0   Apr 18 CONIN$  1:22 "C:Program FilesInternet ExplorerIEXPLORE.EXE" http:
magvivek   884   988  0 08:28:01 CONIN$  0:11 "C:Program FilesInternet ExplorerIEXPLORE.EXE" http:
magvivek  1264   988  0 08:48:51 CONIN$  0:02 "C:Program FilesInternet ExplorerIEXPLORE.EXE" http:

Previous Topic: INFORMATION OF BACK
Next Topic: Oracle RedoLog File ERROR
Goto Forum:
  


Current Time: Sat Jun 08 08:56:43 CDT 2024