#!/bin/bash

#echo "** This script is no longer used if this db has a dr side"
#echo "** Please use the one in /home/oracle/flashback"
#exit 0

export DATABASE=bcmspqa
export ORACLE_SID=bcmspqa1
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3.14
export PATH=$PATH:$PATH:$ORACLE_HOME/bin

echo "*** Stopping database"
srvctl stop database -d $DATABASE

echo "*** Creating new GOLD Flashback running"
sqlplus "/ as sysdba" @create_GOLD_flashback.sql

echo "*** Starting database normal"
srvctl start database -d $DATABASE

#echo -e "Subject: Automated message: Setting of new Flashback point for ertload has completed\n\nAutomated message: Setting of new Flashback point for ertload has completed" | /usr/sbin/sendmail "seth_hartbecke@mcgraw-hill.com,craig_willner@mcgraw-hill.com,anas_madharsha@mcgraw-hill.com,travis_michels@mcgraw-hill.com,sravan_kumar@mcgraw-hill.com,sachin_deshpande@mcgraw-hill.com"

