Difference between revisions of "Which databases are running on the machine"

From dbawiki
Jump to: navigation, search
(From Windows)
(From Windows)
Line 4: Line 4:
  
 
==From Windows==
 
==From Windows==
Start,run... then:
+
<pre>
services.msc
+
sc query | perl -00 -ne 'print "$1 $2\n"  if /^SERVICE_NAME: OracleService(\w+).DISPLAY.+?STATE\s+:\s+\d\s+(\w+)/s'
Look through list for services beginning with OracleService<SID>
+
</pre>
When I get the hang of bat files, I'll write a script for it.
 
  
 
==How to see what databases have been defined (running or not)==
 
==How to see what databases have been defined (running or not)==

Revision as of 08:20, 3 May 2016

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)