Command to List the Oracle Databases Running on Linux Server

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Generally we use ps -ef|grep pmon command to list the databases running on the database server. 

In this post I am going to mention
the commands to display only the database instances running on the Linux / Unix server. 

Commands:

ps -ef|grep pmon | awk '{print $8}'|grep -v "grep"|  grep -v "ASM"| cut -d"_" -f3

ps -eaf | grep _pmon_ | grep -v grep | grep -v + | grep -v "^#" | awk '{print $NF}' | cut -c 10-
advertisements
 
Demo

[oracle@TESTBOX exp]$ ps -ef|grep pmon | awk '{print $8}'|grep -v "grep"|  grep -v "ASM"| cut -d"_" -f3
cdb
PRODDEV1
PRODDEV2
[oracle@TESTBOX exp]$ ps -eaf | grep _pmon_ | grep -v grep | grep -v + | grep -v "^#" | awk '{print $NF}' | cut -c 10-
cdb
PRODDEV1
PRODDEV2

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer