Skip to main content

Posts

Showing posts from January, 2021

Create dynamic stop/start db instances and TAF services script

My coworker created this script that can dynamically generate stop/start many database instances registered in /etc/oratab, this is a RAC server that has 12c and 11g oracle_homes RDBMS, the generated scripts will loop /etc/oratab and stop the TAF services gracefully first then stop the instances:  -sh-4.1$ more stop_all_instances.sh #!/bin/sh # # Program: stopallinstances.sh # Purpose: stop all database instances on the server # ----------------------------------------------------------------------------- # # History # # Date      Rev  Who                  Comments # --------- ---- -------------- ----------------------------------------------- # 04Jan2018 1.0  Bing Ge   Created # 03Sep2019 2.0  Bing Ge   change to start the db in parallel. # # --------------------------------------------------- # LOCATION=/home/oracle/bge STARTDB=$LOCATION/scripts/start_db.sh STOPDB=$LOCATION/scripts/stop_db.sh timestamp=`date  +%Y_%m_%d_%H_%M_%S` hostname=`hostname` LOG_LOCATION=$LOCATION/logs LOG_FIL