Basics commands for DBA part 1 - finding instance

Hi, In the next few blogs I will discuss on scripting technics that DBA usually needs. I am concentrating in the commands, that are usually part of larger script. Later on I will submit some scripts that uses these technics. Identifying all instances running on the current machine Option 1: # ps -ef |grep smon oracle 3025 1 0 2016 ? 00:00:48 asm_smon_+ASM oracle 11459 1 0 17:24 ? 00:00:00 ora_smon_ fdb root 12763 11332 0 17:52 pts/1 00:00:00 grep --color=auto smon SID is fdb and process id is 11459 Option 2: # pgrep -lf _pmon_ 3025 asm_pmon_+asm 11459 ora_pmon_ fdb SID is fdb and process id is 11459 Option 3: Cleaner way for sid: $ ps -ef |grep 'ora_smon_.*$' | grep -v grep | awk -F_ '/ora_smon/{print $NF}' fdb SID is fdb Op...