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

From dbawiki
Jump to: navigation, search
(From Windows)
Line 1: Line 1:
 
==From Unix==
 
==From Unix==
ps -ef|grep [o]ra_smon|sed -e 's/.*_//'|sort|uniq
+
<pre>
 
+
ps -ef|grep [o]ra_smon|sed -e 's/.*_//'|sort|uniq
 +
</pre>
  
 
==From Windows==
 
==From Windows==
Line 9: Line 10:
  
 
==How to see what databases have been defined (running or not)==
 
==How to see what databases have been defined (running or not)==
cat /var/opt/oracle/oratab (Solaris)
+
<pre>
 +
cat /var/opt/oracle/oratab (Solaris)
  
cat /etc/oratab (others)
+
cat /etc/oratab (others)
 +
</pre>

Revision as of 08:22, 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)