Day before yesterday i completed a build and handovered to the client , i never know that the client was waiting to hand over and to try a app upgrade, unfortunately that went wrong and he approached for a recover point in time, luckly i had sheduled the rman job on the cron ( ushually this will be sheduled in a automated tool and that will take nearly a week time to set up)
i have taken the db in mount state .
Shutdown immediate;
startup nomount;
Refference :
export NLS_LANG = american_america.us7ascii
export NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"
connect catalog xx/xx@xx
run {
allocate channel t1 type 'sbt_tape' maxpiecesize 4000m parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.xxx.opt)';
allocate channel t2 type 'sbt_tape' maxpiecesize 4000m parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.xxx.opt)';
sql 'alter session set NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"';
SET UNTIL TIME 'Feb 14 2012 21:00:00';
restore database;
recover database;
release channel t1;
release channel t2;
}
The opt files were by default for my environment pls change accordingly and as per ur environment
i had completed the restore and recover ..
Logs for your refference:
connected to recovery catalog database
RMAN>
RMAN> run {
2> allocate channel t1 type 'sbt_tape' maxpiecesize 4000m parms 'ENV=
(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.metap5.opt)';
3> allocate channel t2 type 'sbt_tape' maxpiecesize 4000m parms 'ENV=
(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.metap5.opt)';
sql 'alter session set NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"';
4> 5> SET UNTIL TIME 'Feb 14 2012 21:00:00';
restore database;
6> 7> recover database;
8> release channel t1;
9> release channel t2;
10> }
allocated channel: t1
channel t1: sid=1088 devtype=SBT_TAPE
channel t1: Tivoli Data Protection for Oracle: version 5.2.0.0
allocated channel: t2
channel t2: sid=1087 devtype=SBT_TAPE
channel t2: Tivoli Data Protection for Oracle: version 5.2.0.0
sql statement: alter session set NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"
executing command: SET until clause
Starting restore at 15-FEB-12
channel t1: starting datafile backupset restore
channel t1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/metap5/system_01.dbf
restoring datafile 00004 to /u02/oradata/metap5/metap5_tools_01.dbf
restoring datafile 00005 to /u02/oradata/metap5/metap5_users_01.dbf
restoring datafile 00007 to /u02/oradata/metap5/metap5_meta_index_01.dbf
restoring datafile 00008 to /u03/oradata/metap5/metap5_meta_index_03.dbf
restoring datafile 00010 to /u03/oradata/metap5/metap5_meta_index_035dbf
restoring datafile 00013 to /u03/oradata/metap5/metap5_meta_data_04.dbf
restoring datafile 00015 to /u03/oradata/metap5/metap5_meta_data_06.dbf
restoring datafile 00017 to /u03/oradata/metap5/metap5_meta_data_08.dbf
restoring datafile 00019 to /u03/oradata/metap5/metap5_meta_data_10.dbf
channel t1: reading from backup piece df_METAP5_775200607_9_1
channel t1: restored backup piece 1
piece handle=df_METAP5_775200607_9_1 tag=TAG20120214T053006
channel t1: restore complete, elapsed time: 00:02:56
channel t1: starting datafile backupset restore
channel t1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u02/oradata/metap5/undo_01.dbf
restoring datafile 00003 to /u01/oradata/metap5/sysaux_01.dbf
restoring datafile 00006 to /u01/oradata/metap5/metap5_meta_data_01.dbf
restoring datafile 00009 to /u03/oradata/metap5/metap5_meta_index_04.dbf
restoring datafile 00011 to /u03/oradata/metap5/metap5_meta_index_034dbf
restoring datafile 00012 to /u03/oradata/metap5/metap5_meta_data_02.dbf
restoring datafile 00014 to /u03/oradata/metap5/metap5_meta_data_05.dbf
restoring datafile 00016 to /u03/oradata/metap5/metap5_meta_data_07.dbf
restoring datafile 00018 to /u03/oradata/metap5/metap5_meta_data_09.dbf
restoring datafile 00020 to /u03/oradata/metap5/metap5_meta_data_11.dbf
channel t1: reading from backup piece df_METAP5_775200606_8_1
channel t1: restored backup piece 1
piece handle=df_METAP5_775200606_8_1 tag=TAG20120214T053006
channel t1: restore complete, elapsed time: 00:03:16
Finished restore at 15-FEB-12
Starting recover at 15-FEB-12
starting media recovery
channel t1: starting archive log restore to default destination
channel t1: restoring archive log
archive log thread=1 sequence=45
channel t1: reading from backup piece arc_METAP5_775201925_12_1
channel t1: restored backup piece 1
piece handle=arc_METAP5_775201925_12_1 tag=TAG20120214T055205
channel t1: restore complete, elapsed time: 00:00:55
channel t1: starting archive log restore to default destination
channel t1: restoring archive log
archive log thread=1 sequence=44
channel t1: reading from backup piece arc_METAP5_775201925_11_1
channel t1: restored backup piece 1
piece handle=arc_METAP5_775201925_11_1 tag=TAG20120214T055205
channel t1: restore complete, elapsed time: 00:00:03
archive log filename=/opt/oracle/admin/metap5/arch/metap544_1_773984687.arclog thread=1
sequence=44
archive log filename=/opt/oracle/admin/metap5/arch/metap545_1_773984687.arclog thread=1
sequence=45
channel t1: starting archive log restore to default destination
channel t1: restoring archive log
archive log thread=1 sequence=46
channel t1: reading from backup piece arc_METAP5_775289526_16_1
channel t1: restored backup piece 1
piece handle=arc_METAP5_775289526_16_1 tag=TAG20120215T061206
channel t1: restore complete, elapsed time: 00:01:06
archive log filename=/opt/oracle/admin/metap5/arch/metap546_1_773984687.arclog thread=1
sequence=46
media recovery complete, elapsed time: 00:00:01
Finished recover at 15-FEB-12
released channel: t1
released channel: t2
Wednesday, February 15, 2012
Subscribe to:
Posts (Atom)
How to Trouble shoot Logfile_sync wait event
First Identify and break down LGWR wait events. Query wait events for LGWR. In this instance LGWR sid is 3 (and usually it is). select s...
-
Refference with the document How to Clean Up Duplicate Objects Owned by SYS and SYSTEM Schema [ID 1030426.6] Hi Had faced an issue where ...
-
Login to the first node column is_recovery_dest_file format a25 column name format a60 set linesize 160 select status, name, is_recover...
-
SQL> SELECT LOG_MODE FROM SYS.V$DATABASE; LOG_MODE ------------ NOARCHIVELOG show parameter archive will tell u the archive...