David, maybe this KSH sample helps your DBAs
herfried
#!/bin/ksh
#
# call script SID RECUNDANCY e.g zots 3
#
TEMPDIR=/tmp
LOGDIR=/home/oracle/log
SID=$1
REDUNDANCY=$2
SCRIPT=$TEMPDIR/delete_$$_$SID.rman
TMPFILE=$TEMPDIR/report_$$_$SID.tmp
CZOTS="allocate channel for delete type 'sbt_tape' parms
'ENV=(DSMI_ORC_CONFIG=/usr/lpp/adsm/bin/dsm.opt,
DSMO_AVG_SIZE=1024, DSMO_NODE=ZOTS, DSMO_PSWDPATH=/usr/lpp/adsm/bin,
DSMO_AVG_SIZE=5, DSMO_FS=adsmzots)';"
_get_old_backups()
{
echo "report obsolete redundancy = $REDUNDANCY;" |rman target
internal/Pass@$SID rcvcat rman/pass@rman | grep RMAN-06285
}
_create_script()
{
case $SID in
zots) echo "$CZOTS\n";;
esac
while read A B C D E THEFILE
do
echo "change backuppiece '"$THEFILE"' delete;"
done < $TMPFILE
echo "release channel;"
}
_get_old_backups > $TMPFILE
_create_script > $SCRIPT
rman target internal/Pass@$SID rcvcat rman/Pass@rman cmdfile $SCRIPT msglog
$LOGDIR/del_$$.log
David Longo <David.Longo AT HEALTH-FIRST DOT ORG>@VM.MARIST.EDU> on 19.07.2001
17:36:24
Please respond to "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
cc:
Subject: Oracle RMAN backups - deleting backups
We have Oracle 8.1.7 64bit and 8.0.6 32 bit with RMAN, running on AIX 4.3.3
servers. Have the TSM 4.1 agents and TDP for Oracle 2.1.0.10 and TSM
server 3.7.4.0. The Oracle servers are new. The backups through RMAN are
working o.k. and we have tested restores o.k.
But, our DBA's are having trouble with setting RMAN up to delete backups.
Apparently this changed significantly from the way EBU did it.
Does someone have some scripts they have setup to automatically delete
backups or can you point me to where to get this info?
Thanks,
David B. Longo
System Administrator
Health First, Inc.
3300 Fiske Blvd.
Rockledge, FL 32955-4305
PH 321.434.5536
Pager 321.634.8230
Fax: 321.434.5525
david.longo AT health-first DOT org
"MMS <health-first.org>" made the following
annotations on 07/19/01 11:41:11
------------------------------------------------------------------------------
This message is for the named person's use only. It may contain
This message is for the named person's use only. It may contain
confidential, proprietary, or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it, and notify
the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Health First reserves the right to monitor all e-mail
communications through its networks. Any views or opinions expressed in
this message are solely those of the individual sender, except (1) where
the message states such views or opinions are on behalf of a particular
entity; and (2) the sender is authorized by the entity to give such views
or opinions.
=============================================================================
****************************************************************************
The information contained in this transmission, which may be
confidential and proprietary, is only for the intended recipients.
Unauthorized use is strictly prohibited. If you receive this
transmission in error, please notify me immediately by telephone
or electronic mail and confirm that you deleted this transmission
and the reply from your electronic mail system.
****************************************************************************
|