Re: expiration Oracle backups

2005-10-14 Thread Jurjen Oskam
On Thu, Oct 13, 2005 at 07:38:18AM -0700, Neil Rasmussen wrote:

 When deleting Rman objects on the TSM Server, TDP Oracle uses the delete
 function on objectsthe objects do not move to inactive they are just
 simply deleted from the TSM Server.

While the manual says to create nodes for RMAN with Delete Backup
permission set to yes, the manual also says to use a managementclass that
has Versions Data Deleted = 0 and Retain Only Version = 0. If what you say
is true (and I have no reason to doubt that :) ), then these settings are
not relevant, since there are no inactive RMAN objects. Am I right?

--
Jurjen Oskam


Re: expiration Oracle backups

2005-10-14 Thread Rainer Holzinger
Hello,

I'm running 18 Oracle systems on HP-UX which are backed up by TDP for
Oracle.
The TDP for Oracle version is 5.2.1.0, the TSM servers 5.2.4.1 on AIX
5.2 ML05. Oracle serves are at level 9i and 10g.
Our Oracle administrators have written a RMAN script that deletes
obsolete backups. I was monitoring the first deletes from RMAN and seen
that the delete from RMAN inactivates the TDPO objects on the TSM
server. The next expire inventory process will delete the TDPO objects
from the TSM database and managed storage. I think this is the reason
for BACKDEL=yes, Versions Data Deleted = 0 and Retain Only Version = 0.

In general this works fine in our installation. But in the meantime
there is one Oracle system where we have found 'old' TDPO objects in TSM
storage but no entries in the RMAN recovery catalog. Even a 'TDPOSYNC
SYNCDB' did not remove or inactivate the TDPO objects which should be
there anymore. I will test some other things and come back to the list
if there's a solution.

best regards,
Rainer


 -Original Message-
 From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf
 Of Jurjen Oskam
 Sent: Friday, October 14, 2005 9:13 AM
 To: ADSM-L@VM.MARIST.EDU
 Subject: Re: [ADSM-L] expiration Oracle backups

 On Thu, Oct 13, 2005 at 07:38:18AM -0700, Neil Rasmussen wrote:

  When deleting Rman objects on the TSM Server, TDP Oracle uses the
 delete
  function on objectsthe objects do not move to inactive they are
 just
  simply deleted from the TSM Server.

 While the manual says to create nodes for RMAN with Delete Backup
 permission set to yes, the manual also says to use a managementclass
 that
 has Versions Data Deleted = 0 and Retain Only Version = 0. If what you
 say
 is true (and I have no reason to doubt that :) ), then these settings
 are
 not relevant, since there are no inactive RMAN objects. Am I right?

 --
 Jurjen Oskam


Re: expiration Oracle backups

2005-10-14 Thread Allen S. Rout
== On Fri, 14 Oct 2005 09:41:34 +0200, Rainer Holzinger [EMAIL PROTECTED] 
said:


 In general this works fine in our installation. But in the meantime there is
 one Oracle system where we have found 'old' TDPO objects in TSM storage but
 no entries in the RMAN recovery catalog. Even a 'TDPOSYNC SYNCDB' did not
 remove or inactivate the TDPO objects which should be there anymore. I will
 test some other things and come back to the list if there's a solution.

This sounds like what we're getting.

If you want a guinea pig, let me know. :)

- Allen S. Rout


Re: expiration Oracle backups

2005-10-13 Thread Neil Rasmussen
Kurt,

When deleting Rman objects on the TSM Server, TDP Oracle uses the delete
function on objectsthe objects do not move to inactive they are just
simply deleted from the TSM Server. So if you are certain that Rman is
deleting the objects from the controlfile, then my guess is that your TSM
Node is not configured with backdel=yes. One simple way to know what is
going on during the deletion is to look in the tdpoerror.log this should
tell you if the objects are being deleted or if there is an error
occurring during the delete. Unfortunately, Oracle ignores errors that
come from the delete functions so any error that TDP Oracle gives during
deletion is lost, the only way to know for sure is the tdpoerror.log


Regards,

Neil Rasmussen
Software Development
Data Protection for Oracle
[EMAIL PROTECTED]




Kurt Beyers [EMAIL PROTECTED]
Sent by: ADSM: Dist Stor Manager ADSM-L@VM.MARIST.EDU
10/13/2005 06:19 AM
Please respond to
ADSM: Dist Stor Manager


To
ADSM-L@VM.MARIST.EDU
cc

Subject
expiration Oracle backups






Hello,

My environment is the following:

TSM 5.3.2 server on Windows2003
Sun Solaris 5.8 with Oracle 8.1.7.4 with a TSM BA client 5.3.x and the TDP
for databases 5.3

The backup of the Oracle databases is already working. The metadata of the
backups is written in the control files of the Oracle database.

The backups are bound to a mgmt class with the correct settings (as every
object receives a unique name in TSM).

The expiration must first be done in Oracle with a script, eg expire the
backups older than X days. Could anybody share a working script? I'm still
struggling to get it working as it should.

But how are the backups made inactive in the TSM database after they have
been deleted in Oracle? The 'tdposync' tool only works when the metadata
is stored in a recovery catalog database. And after a forced deletion of
the backups in RMAN, they do not become inactive in TSM either. How can
the metadata in the TSM database be synchronized with the metadata in
Oracle (control file) .

I know this must have been discussed in the past already, but a search of
the old threads didn't  clear it out yet.

thanks a lot,
Kurt


Re: expiration Oracle backups

2005-10-13 Thread Kurt Beyers
Neil,
 
Here is the output of 'list backups' and 'crosscheck backup of databases' for 
the ERK oracle instance:
 
# rman target rman/rman nocatalog
Recovery Manager: Release 8.1.7.4.0 - Production
RMAN-06005: connected to target database: ERK (DBID=39192858)
RMAN-06009: using target database controlfile instead of recovery catalog
RMAN list backup;
RMAN-03022: compiling command: list
RMAN allocate channel for delete type 'sbt_tape'
2 parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_erk.opt)';
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: delete
RMAN-08500: channel delete: sid=12 devtype=SBT_TAPE
RMAN-08526: channel delete: Tivoli Data Protection for Oracle: version 5.2.0.0
RMAN crosscheck backup of database;
RMAN-03022: compiling command: XCHECK
RMAN-03023: executing command: XCHECK
RMAN
 
No backups are found any more. The TSM node name for the Oracle backup is 
server_ORA_ERK. Here is the output of two queries in TSM:
 
q node server_ORA_ERK f=d;
 Node Name: server_ORA_ERK
  Platform: TDP Oracle SUN
   Client OS Level: 5.8
Client Version: Version 5, Release 3, Level 0.11
Policy Domain Name: POL_client
 Last Access Date/Time: 10/13/2005 15:04:17
Days Since Last Access: 1
Password Set Date/Time: 10/12/2005 14:34:14
   Days Since Password Set: 1
 Invalid Sign-on Count: 0
   Locked?: No
   Contact:
   Compression: Client
   Archive Delete Allowed?: Yes
Backup Delete Allowed?: Yes
Registration Date/Time: 10/12/2005 11:42:20
 Registering Administrator: ADMIN
Last Communication Method Used: Tcp/Ip
   Bytes Received Last Session: 2,073
   Bytes Sent Last Session: 2,170
  Duration of Last Session: 4.00
   Pct. Idle Wait Last Session: 0.00
select state, ll_name, backup_date from backups where 
node_name='server_ORA_ERK';
 STATE LL_NAME   BACKUP_DATE
-- -- --
ACTIVE_VERSION df_571506337_1_1   2005-10-12
 15:44:32.00
ACTIVE_VERSION df_571506339_2_1   2005-10-12
 15:44:32.00
...
 
The node is allowed to delete it's own backups and all of the backups are still 
active. No errors are found in the tdpoerror.log file.
 
During the deletion of the backups in RMAN, new sessions are opened and closed 
in the activity log for the node but no other messages are logged.
 
Any other ideas about what might be the issue? If required, I'll log a PMR of 
course.
 
thanks,
Kurt



From: ADSM: Dist Stor Manager on behalf of Neil Rasmussen
Sent: Thu 13/10/2005 16:38
To: ADSM-L@VM.MARIST.EDU
Subject: Re: [ADSM-L] expiration Oracle backups



Kurt,

When deleting Rman objects on the TSM Server, TDP Oracle uses the delete
function on objectsthe objects do not move to inactive they are just
simply deleted from the TSM Server. So if you are certain that Rman is
deleting the objects from the controlfile, then my guess is that your TSM
Node is not configured with backdel=yes. One simple way to know what is
going on during the deletion is to look in the tdpoerror.log this should
tell you if the objects are being deleted or if there is an error
occurring during the delete. Unfortunately, Oracle ignores errors that
come from the delete functions so any error that TDP Oracle gives during
deletion is lost, the only way to know for sure is the tdpoerror.log


Regards,

Neil Rasmussen
Software Development
Data Protection for Oracle
[EMAIL PROTECTED]




Kurt Beyers [EMAIL PROTECTED]
Sent by: ADSM: Dist Stor Manager ADSM-L@VM.MARIST.EDU
10/13/2005 06:19 AM
Please respond to
ADSM: Dist Stor Manager


To
ADSM-L@VM.MARIST.EDU
cc

Subject
expiration Oracle backups






Hello,

My environment is the following:

TSM 5.3.2 server on Windows2003
Sun Solaris 5.8 with Oracle 8.1.7.4 with a TSM BA client 5.3.x and the TDP
for databases 5.3

The backup of the Oracle databases is already working. The metadata of the
backups is written in the control files of the Oracle database.

The backups are bound to a mgmt class with the correct settings (as every
object receives a unique name in TSM).

The expiration must first be done in Oracle with a script, eg expire the
backups older than X days. Could anybody share a working script? I'm still
struggling to get it working as it should.

But how are the backups made inactive in the TSM database after they have
been deleted in Oracle? The 'tdposync' tool only works when the metadata
is stored in a recovery catalog database. And after a forced deletion of
the backups in RMAN, they do not become inactive in TSM either. How can
the metadata in the TSM database be 

Re: expiration Oracle backups

2005-10-13 Thread Allen S. Rout
== On Thu, 13 Oct 2005 15:19:53 +0200, Kurt Beyers [EMAIL PROTECTED] said:

 My environment is the following:

 TSM 5.3.2 server on Windows2003
 Sun Solaris 5.8 with Oracle 8.1.7.4 with a TSM BA client 5.3.x and the TDP 
 for databases 5.3

 [ ... ]

 But how are the backups made inactive in the TSM database after they have
 been deleted in Oracle? The 'tdposync' tool only works when the metadata is
 stored in a recovery catalog database. And after a forced deletion of the
 backups in RMAN, they do not become inactive in TSM either. How can the
 metadata in the TSM database be synchronized with the metadata in Oracle
 (control file) .


Oracle's delete-obsolete-backups function does not work.  We're chasing this
with Oracle Support right now, and they have confirmed that they have a bug.

Our solution is to periodically switch TSM nodes to which a given Oracle DB is
backing up, and once our recovery period has passed, we discard the old node.

We've lovingly documented the state before and after various operations, so if
you want help proving your case to Oracle, let me know.

Alternately, if you come up with a procedure that zaps stuff, do tell. :)

- Allen S. Rout


Re: expiration Oracle backups

2005-10-13 Thread Allen S. Rout
== On Thu, 13 Oct 2005 07:38:18 -0700, Neil Rasmussen [EMAIL PROTECTED] said:


 When deleting Rman objects on the TSM Server, TDP Oracle uses the delete
 function on objectsthe objects do not move to inactive they are just
 simply deleted from the TSM Server.

Hmm, I thought they did move to inactive; They have their 'inactivate date'
set to the 1900, so unless you are retaining NOLIMIT, they'll dissapear next
expiration.  [ rustle through Oracle problem-trace logs ]  Here's an example.

These are from

 'select * from backups where node_name='WEBCT-DB' order by 
filespace_name,backup_date'



Before: [ query taken at 09:58 ]
WEBCT-DB/webct-db   1   ACTIVE_VERSION  FILE//  
df_WEBCT_4416_1_568435025   124553476   2005-09-08 02:42:02.00  
oracle  DEFAULT

After: [ query taken at 10:01 ]
WEBCT-DB/webct-db   1   INACTIVE_VERSIONFILE//  
df_WEBCT_4416_1_568435025   124553476   2005-09-08 02:42:02.00  
1900-01-01 00:00:00.00 oracle  DEFAULT


Is there something I'm missing about this?  Or is that just what happens in
the DB when the API issues a 'Delete this file' request?


 So if you are certain that Rman is deleting the objects from the
 controlfile, then my guess is that your TSM Node is not configured with
 backdel=yes.

Second the motion.  We ran into this.


- Allen S. Rout


Re: expiration Oracle backups

2005-10-13 Thread Helder Garcia
Here is a script I use to expire RMAN backups. Note that I filter
(egrep) the backup pieces based on tags. This way I have separated
expiring scripts for daily, weekly, and monthly backups.



#!/usr/bin/bash
export ORACLE_BASE=/oracle/product/920/admin
export ORACLE_HOME=/oracle/product/920
export LD_LIBRARY_PATH=/oracle/product/920/lib32:/usr/dt/lib:/usr/openwin/lib
export TNS_ADMIN=/oracle/product/920/network/admin
export LD_LIBRARY_PATH_64=/oracle/product/920/lib
export ORA_NLS33=/oracle/product/920/ocommon/nls/admin/data
export NLS_DATE_FORMAT=dd/mm/ hh24:mi:ss
export ARQLOG=/opt/tivoli/tsm/client/log/ORACLE_SIDobsolete_`date
'+%Y%m%d%H%M%S'`.log
export ORACLE_SID=ORACLE_SID

target=user/[EMAIL PROTECTED]

parms=parms 
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_restore.opt)'
catalog='rmanuser/[EMAIL PROTECTED]'

#Registra log de inicio
date '+Inicio do script de remocao de objetos obsoletos em %d/%m/%Y as
%H:%M:%S' $ARQLOG


dbobsolete_tape=/tmp/ob_tape.log
cmdfile=/tmp/delete.cmd

if [ -f $dbobsolete_tape ]
then
rm $dbobsolete_tape
fi

if [ -f $cmdfile ]
then
rm $cmdfile
fi
# Get a list of obsolete tape files
$ORACLE_HOME/bin/rman msgno target $target rcvcat $catalog msglog
$dbobsolete_tape  EOF  /dev/null
run {
  allocate channel t1 type 'sbt_tape'
  parms 
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_restore.opt)';
  report obsolete redundancy=45;
  release channel t1;
}
EOF

# sed options
del_bpiece=-e /RMAN-06285/ s/\(.* \)\(.*\)$/change backuppiece '\2' delete;/

# Create the RMAN command to delete the obsolete files
echo allocate channel for delete type 'sbt_tape' $parms ;  $cmdfile
grep RMAN-06285 $dbobsolete_tape | egrep 'bkp_full|ctl_|arc_' | sed
$del_bpiece  $cmdfile
echo release channel;  $cmdfile

# Execute the RMAN command file to delete the obsolete files
$ORACLE_HOME/bin/rman msgno target $target rcvcat $catalog msglog
$ARQLOG cmdfile $cmdfile

if [ $? -gt 0 ]
then
date '+Termino do script com erro em %d/%m/%Y as %H:%M:%S' $ARQLOG
exit 1
else
date '+Termino do script com sucesso em %d/%m/%Y as %H:%M:%S' $ARQLOG
fi


On 10/13/05, Kurt Beyers [EMAIL PROTECTED] wrote:
 Hello,

 My environment is the following:

 TSM 5.3.2 server on Windows2003
 Sun Solaris 5.8 with Oracle 8.1.7.4 with a TSM BA client 5.3.x and the TDP 
 for databases 5.3

 The backup of the Oracle databases is already working. The metadata of the 
 backups is written in the control files of the Oracle database.

 The backups are bound to a mgmt class with the correct settings (as every 
 object receives a unique name in TSM).

 The expiration must first be done in Oracle with a script, eg expire the 
 backups older than X days. Could anybody share a working script? I'm still 
 struggling to get it working as it should.

 But how are the backups made inactive in the TSM database after they have 
 been deleted in Oracle? The 'tdposync' tool only works when the metadata is 
 stored in a recovery catalog database. And after a forced deletion of the 
 backups in RMAN, they do not become inactive in TSM either. How can the 
 metadata in the TSM database be synchronized with the metadata in Oracle 
 (control file) .

 I know this must have been discussed in the past already, but a search of the 
 old threads didn't  clear it out yet.

 thanks a lot,
 Kurt





--
Helder Garcia