Which databases are running on the machine

From dbawiki
Revision as of 08:22, 3 May 2016 by Stuart (talk | contribs)
Jump to: navigation, search

From Unix

ps -ef|grep [o]ra_smon|sed -e 's/.*_//'|sort|uniq

From Windows

sc query | perl -00 -ne 'print "$1 $2\n"  if /^SERVICE_NAME: OracleService(\w+).DISPLAY.+?STATE\s+:\s+\d\s+(\w+)/s'

How to see what databases have been defined (running or not)

cat /var/opt/oracle/oratab (Solaris)

cat /etc/oratab (others)