|
-
I wrote a shell one script (UNIX):
1. tnsping to make certain the standby is alive - end script if dB is unreachable.
2. gzip all archive logs that currently are not zipped (minus 1 - the latest)
3. scp (secure copy) all archives.gz to standby box
4. remote shell pri --> sec (ssh standby.k): issuing the gunzip command
5. remote shell pri --> sec (ssh standby.k): enter sqlplus on the standby box, recover the log file.
6. sleep 60
7 go to 1
Additional Notes: I have received a memo of an undocumented feature in 9.2 where we can tunnel ssh and therefore, compress the archive logs under the auspices of Data Guard. This will be documented under 10i. I will read the doc and finally go with Data Guard after I test it out.
### One iteration of the loop
###################
## 1. zip the log #
###################
gzip $file
ls -l $file* | awk '{print $5 " " $6 " " $7 " " $8 " " $9}'
echo `date` "zip done..now send to oracle@${STANDBY_BOX}:${STANDBY_DIR}/."
####################
## 2. send the log #
####################
scp -rp $file.gz oracle@${STANDBY_BOX}:${STANDBY_DIR}/.
echo `date` "send done.... "
########################################################
## 3-4. unzip the log at the remote site and recover ##
########################################################
echo "the target box: " $STANDBY_BOX
$BIN/ssh -l oracle drdb "/d01/oracle/admin/scripts/standby.k"
echo `date` "$i End: $file "
echo "----------------------------------------------------------"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|