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-
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 (580) General (60) Unix (47) Script (41) Blog (23) OCI (3) SQL* Loader (3) Datapump (2) Software (1)
DBA Tips
 

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