Difference between revisions of "Which databases are running on the machine"
From dbawiki
(→From Unix) |
(→How to see what databases have been defined (running or not)) |
||
| Line 8: | Line 8: | ||
<pre> | <pre> | ||
sc query | perl -00 -ne 'print "$1 $2\n" if /^SERVICE_NAME: OracleService(\w+).DISPLAY.+?STATE\s+:\s+\d\s+(\w+)/s' | sc query | perl -00 -ne 'print "$1 $2\n" if /^SERVICE_NAME: OracleService(\w+).DISPLAY.+?STATE\s+:\s+\d\s+(\w+)/s' | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</pre> | </pre> | ||
Revision as of 13:31, 20 June 2017
From Unix
The 'uniq' should not be necessary!
ps -ef|grep [o]ra_pmon|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'