Thursday, June 30, 2016

Script for stopping all Oracle RAC instances using awk command

ps -fu oracle | grep pmon | grep -v grep | sed -e 's/.*_//' | sort -u |awk '{print "srvctl stop instance -d " substr($1,1,length($1)-1) " -i " $1}'

No comments: