ADSM-L

Re: [ADSM-L] AUto Sync of TDP backup and RMAN catalog

2013-01-18 01:47:16
Subject: Re: [ADSM-L] AUto Sync of TDP backup and RMAN catalog
From: "Lakshminarayanan, Rajesh" <Rajesh.Lakshminarayanan AT DFS DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 18 Jan 2013 14:39:52 +0800
Hi,

   Thank you for the detailed explanation.   We even follow the steps
you have highlighted to backup the oracle db to TSM server. We missed
out running "crosscheck backup" & "resync catalog" command after the
backup schedule , so that the TSM has the same set of image as in RMAN
catalog.   Now we have added these commands to the backup script.  

We wanted to monitor whether the RMAN catalog & TSM are in syn.  I felt
that instead of running "tdposync" manually once a while, we can
automate this process.

   When I ran the below command in my script and redirecting to output
to a file.  It was generating a huge file and was going on indefinite
loop.   If you have automated this tdposync process, do share you
process.

/usr/tivoli/tsm/client/oracle/bin64/tdposync syncdb
-tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo_prd.opt <<
'start'
rmancat
<password>
rmancat


'start'


 Thanx for your detailed mail.
  
Regards,

Rajesh

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Grigori Solonovitch
Sent: Friday, January 18, 2013 12:48 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] AUto Sync of TDP backup and RMAN catalog

Hello,
Maybe I do not understand your request, but I will try to give you some
solution.

To enable automatic retention in RMAN catalog you need to set recovery
window for each database (in my case it is for Oracle instance ifns and
31 DAYS is a recovery window, which has to be in sync with TSM retention
period for the same database):
#!/bin/sh
#
export ORACLE_SID=ifns
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=`grep "ifns:" /etc/oratab | head -n1 | cut -f2 -d":"`
export PATH=$ORACLE_HOME/bin:$PATH export
TNS_ADMIN=$ORACLE_HOME/network/admin
#
# Configure backup policy
rman <<EOF
#
# Connect to Recovery Manager Catalog Database connect catalog
$RC_USER/$RC_PASSWORD@$RC_SERVICE;
#
# Connect to target database
connect target;
#
# Set retention policy
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS; # # Set
compression mode #CONFIGURE DEVICE TYPE sbt_tape BACKUP TYPE TO
COMPRESSED BACKUPSET; # EOF exit

In addition, you need to run  daily RMAN crosscheck for each database,
something like this (key command in this script is "crosscheck backup":
#!/bin/sh
#
# Cross-check Recovery Catalog and TSM database # # Input parameters:
#   1 - database SID.
#
export ORACLE_SID=$1
export ORACLE_HOME=`grep "$1:" /etc/oratab | head -n1 | cut -f2 -d":"`
export PATH=$ORACLE_HOME/bin:$PATH export
TNS_ADMIN=$ORACLE_HOME/network/admin
#
#######################################################################
# Remove expired datafiles, control files and archived redo log files #
#######################################################################
rman <<EOF
#
# Connect to Recovery Catalog database
connect catalog $RC_USER/$RC_PASSWORD@$RC_SERVICE;
#
# Connect to target database
connect target;
#
# Allocate channel for maintenance
allocate channel for maintenance type 'sbt_tape' parms
        'ENV=(TDPO_OPTFILE=/home/oracle/admin/tdpo/$1.opt)';
#
# Set date and time format
sql 'alter session set NLS_DATE_FORMAT = "YYYY-MM-DD:HH24:MI:SS"'; # #
Resynchronize catalog resync catalog; # # List database incarnations
list incarnation; # # List backups list backup summary; # # Crosscheck
backups crosscheck backup; # # List expired backups list expired backup
summary; # # Delete expired backups delete noprompt expired backup; # #
Delete obsolete backups delete noprompt obsolete; # # Release channel
release channel; # # Allocate channel for maintenance allocate channel
for maintenance type disk; # # Check archived logs on disk crosscheck
archivelog all; # # Remove obsolete archived redo logs delete noprompt
expired archivelog all; # # Release channel release channel; # exit; EOF
exit 0

After implementing this solution I never use tdposync except some crazy
cases.
Kindest regards,

Grigori G. Solonovitch
Senior Technical Architect  Ahli United Bank Kuwait
www.ahliunited.com.kw

Please consider the environment before printing this E-mail

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Lakshminarayanan, Rajesh
Sent: 18 01 2013 6:21 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] AUto Sync of TDP backup and RMAN catalog

Hi,



    We have been backing the Oracle db to TSM through TDP api.  And we
have been syncing the RMAN catalog and TSM through  "TDPOSYNC" command
manually.



     Just want to check with you, it there a way to automate this
process and has any one tired it before.

Regards,

Rajesh Lakshminarayanan


Please consider the environment before printing this Email.

CONFIDENTIALITY AND WAIVER: The information contained in this electronic
mail message and any attachments hereto may be legally privileged and
confidential. The information is intended only for the recipient(s)
named in this message. If you are not the intended recipient you are
notified that any use, disclosure, copying or distribution is
prohibited. If you have received this in error please contact the sender
and delete this message and any attachments from your computer system.
We do not guarantee that this message or any attachment to it is secure
or free from errors, computer viruses or other conditions that may
damage or interfere with data, hardware or software.

<Prev in Thread] Current Thread [Next in Thread>