Command to List the Oracle Databases Running on Linux Server

_____________________________________________________________________________________________________________________

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-


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

_____________________________________________________________________________________________________________________

0 comments:

Post a comment

 

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