Hello Tim, I am using next script to restore database with incomplete recovery: =================================================================== #!/bin/sh # # Restore specified database to point in time # Recover database to specified time (incomplete recovery) # # Input paramaters: # 1 - database SID; # 2 - time stamp in format YYYY-MM-DD:HH24:MI:SS; # 3 - control file copy. # export ORACLE_SID=$1 export ORACLE_HOME=`grep "$1:" /etc/oratab | head -n1 | cut -f2 -d":"` export TNS_ADMIN=$ORACLE_HOME/network/admin export PATH=$ORACLE_HOME/bin:$PATH # rman <<EOF # # Connect to Recovery Catalog database connect catalog $RC_USER/$rc_passw...@$rc_service; # # Connect to target database connect target; # # Restore control file and database run { # # Startup database instance startup nomount; # # Allocate channel for restore and recovery allocate channel t1 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"'; # # Set recovery time set until time '$2'; # # Restore control file restore controlfile to '$3'; # # Replicate control file replicate controlfile from '$3'; # # Mount database alter database mount; # # Restore database restore database; # # Incomplete media recovery for database recover database; # # Open database and reset logs alter database open resetlogs; # # Release channel release channel t1; } exit; EOF
exit 0 =================================================================== This script is working fine. In addition, you can use "recover database using backup controlfile;". Sometimes it helps to resolve problems with archived redo logs. I hope you have backups for archived redo logs? Kindest regards, Grigori G. Solonovitch Senior Technical Architect Information Technology Bank of Kuwait and Middle East http://www.bkme.com Phone: (+965) 2231-2274 Mobile: (+965) 99798073 E-Mail: g.solonovi...@bkme.com Please consider the environment before printing this Email -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ads...@vm.marist.edu] On Behalf Of Tim Brown Sent: Tuesday, July 28, 2009 10:42 PM To: ADSM-L@VM.MARIST.EDU Subject: [ADSM-L] TSM restore of Oracle via TDP and RMAN I was wondering if anyone has any insight to my issue. I'm doing a restore/recover for a windows 2003 server (oracle db 10g). We do incremental backups with a full backup every Friday. This is the script i've tried for the restore (among the other tries): run { #if not already done, do a shutdown. I was doing shutdown at the RMAN prompt. #shutdown immediate; startup nomount; #--restore the controlfile restore controlfile from autobackup; ##mount the database using the restored control file. alter database mount; allocate channel t1 type 'sbt_tape' parms 'ENV=(tdpo_optfile=C:\Program Files\Tivoli\TSM\AgentOBA\tdpo.opt)'; ##SCN=system change number (it's like a counter) ##when using the 'until' command, it should restore 'up to but not including' ##restore database; ##restore database until scn 9699232120; ##restore database until sequence=277 thread=1 force; restore database until sequence=291 thread=1 force; ##do a list backup of archivelog from time = 'sysdate-7'; to find sequence #. ##-do a list recoverable backup of database; to get the most recent scn #. ##recover database until sequence=291; ##recover database until scn 9699232120; ##recover database until sequence=277 thread=1; recover database until sequence=291 thread=1; alter database open resetlogs; release channel t1; } The restore seems to work fine, but no matter how I do the restore, I always get this error on the recover: channel t1: reading from backup piece df_688689807_164_1 channel t1: restored backup piece 1 piece handle=df_688689807_164_1 tag=TAG20090604T224327 channel t1: restore complete, elapsed time: 00:02:25 starting media recovery unable to find archive log archive log thread=1 sequence=1 released channel: t1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 06/16/2009 15:23:38 RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 9698800 261 Recovery Manager complete. I have to manually open the database and it does open and all the .dbf, .log, and .ctl files are restored and we can log onto the database fine and use it, but I always get this error about unable to find archive log. Any thoughts or suggestions?? thanks. Tim Brown Systems Specialist - Project Leader Central Hudson Gas & Electric 284 South Ave Poughkeepsie, NY 12601 Email: tbr...@cenhud.com <mailto:tbr...@cenhud.com> Phone: 845-486-5643 Fax: 845-486-5921 Cell: 845-235-4255 This message contains confidential information and is only for the intended recipient. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please notify the sender immediately by replying to this note and deleting all copies and attachments. Thank you. Please consider the environment before printing this Email. "This email message and any attachments transmitted with it may contain confidential and proprietary information, intended only for the named recipient(s). If you have received this message in error, or if you are not the named recipient(s), please delete this email after notifying the sender immediately. BKME cannot guarantee the integrity of this communication and accepts no liability for any damage caused by this email or its attachments due to viruses, any other defects, interception or unauthorized modification. The information, views, opinions and comments of this message are those of the individual and not necessarily endorsed by BKME."