Re: keep until rman
Date: Fri, 6 Dec 2013 13:55:23 -0800
Message-ID: <CAORjz=PBE4G3E793iENdgj=LSiyF3AHHqREbcHckPKtvRAYJYQ_at_mail.gmail.com>
On Fri, Dec 6, 2013 at 11:20 AM, max scalf <oracle.blog3_at_gmail.com> wrote:
> the syntax is correct i have tried that, but the problem is i DO NOT HAVE
> recover catalog...that command will not work if i do not have a recovery
> catalog...that command will only work if you have recovery catalog...the
> only way to restore is using(restore spfile from
> 'LOCATION/FILE_NAME')...but i do not know the file name as there maybe
> hunderds of file there.....
A more complete example:
Hope it helps
#### Create Backup
RMAN> backup datafile 1 include current controlfile spfile tag 'SYS';
Starting backup at 12/06/2013 13:42:16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 instance=oravm1 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001
name=+DATA/oravm/datafile/system.256.770316143 channel ORA_DISK_1: starting piece 1 at 12/06/2013 13:42:18 channel ORA_DISK_1: finished piece 1 at 12/06/2013 13:42:43 piece
handle=+FRA/oravm/backupset/2013_12_06/nnndf0_tag20131206t134217_0.470.833463739 tag=TAG20131206T134217 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup setincluding current control file in backup set including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 12/06/2013 13:42:44 channel ORA_DISK_1: finished piece 1 at 12/06/2013 13:42:45 piece
handle=+FRA/oravm/backupset/2013_12_06/ncsnf0_tag20131206t134217_0.471.833463765 tag=TAG20131206T134217 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup setincluding current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 12/06/2013 13:42:45 channel ORA_DISK_1: finished piece 1 at 12/06/2013 13:42:46 piece handle=+FRA/oravm/backupset/2013_12_06/nnsnf0_sys_0.472.833463765 tag=SYS comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 12/06/2013 13:42:46
#### List Controlfile
RMAN> list backup of controlfile ;
List of Backup Sets
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ------------------- 2 Full 20.55M DISK 00:00:01 12/06/2013 11:01:31 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: SYS Piece Name:
+FRA/oravm/backupset/2013_12_06/ncsnf0_sys_0.467.833454091 Control File Included: Ckp SCN: 208714738 Ckp time: 12/06/2013 11:01:30
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ------------------- 4 Full 20.55M DISK 00:00:01 12/06/2013 13:42:44 BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20131206T134217 Piece Name:
+FRA/oravm/backupset/2013_12_06/ncsnf0_tag20131206t134217_0.471.833463765 Control File Included: Ckp SCN: 208750758 Ckp time: 12/06/2013 13:42:43
#### Restore the controlfile
RMAN> _at_test.rman
RMAN>
RMAN> run {
2> allocate channel CH1 device type disk format
'+FRA/oravm/backupset/2013_12_06/ncsnf0_tag20131206t134217_0.471.833463765';
3> restore controlfile to '/tmp/restored_cf.ctl' channel 'CH1';
4> }
using target database control file instead of recovery catalog
allocated channel: CH1
channel CH1: SID=157 instance=oravm1 device type=DISK
Starting restore at 12/06/2013 13:52:33
channel CH1: starting datafile backup set restore
channel CH1: restoring control file
output file name=/tmp/restored_cf.ctl
channel CH1: reading from backup piece
+FRA/oravm/backupset/2013_12_06/ncsnf0_tag20131206t134217_0.471.833463765
channel CH1: piece
handle=+FRA/oravm/backupset/2013_12_06/ncsnf0_tag20131206t134217_0.471.833463765
tag=TAG20131206T134217
channel CH1: restored backup piece 1
channel CH1: restore complete, elapsed time: 00:00:01
Finished restore at 12/06/2013 13:52:34
released channel: CH1
> ssh oravm01 'ls -l /tmp/restored_cf.ctl'
Host key fingerprint is b9:6f:85:a5:a2:d6:63:4b:f6:f7:8e:1c:e1:36:37:88
+--[ RSA 2048]----+
| | | | | | | . . | | S +. | | ..oo.o | | o+.E.* o | | oo+o.o.= . | | . ..+o.ooo | +-----------------+
basename: extra operand `tty'
Try `basename --help' for more information.
/home/jkstill/.bashrc: line 600: bs: command not found
/home/jkstill/.bashrc: line 603: unalias: ls: not found
-rw-r----- 1 oracle dba 21479424 Dec 6 13:52 /tmp/restored_cf.ctl
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Dec 06 2013 - 22:55:23 CET