This post was updated on .
Oracle Database 11.2.0.4
Hi Erman, I am planning to restore backup from tape on 10th May 2018to a server. I have done a list backup of database and archivelog on production. listbackupdatabase.txt listbackupofcontrolfile.txt Can you please advise how I can modify my script for point in time recovery? export NLS_DATE_FORMAT='dd-mon-rr hh24:mi:ss' rman connect target / ; connect auxiliary /; set DBID=3908658873 run { ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE'; SEND 'NSR_ENV=(NSR_SERVER=rhis-nwdd-1202,NSR_CLIENT=comptel-scan.mauritiustelecom.com)'; restore until time 'sysdate-11' controlfile from autobackup; } Please advise. Regards, Roshan |
This post was updated on .
Is the script below ok if I specify the backup piece handle?
rman connect target / ; connect auxiliary /; set DBID=3908658873 run { ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE'; SEND 'NSR_ENV=(NSR_SERVER=rhis-nwdd-1202,NSR_CLIENT=comptel-scan.mauritiustelecom.com)'; restore until time 'sysdate-11' controlfile from autobackup; } Result: RMAN> connect target *; connected to target database: RECONDB (not mounted) RMAN> connect auxiliary * connected to auxiliary database: RECONDB (not mounted) RMAN> set DBID=3908658873 executing command: SET DBID RMAN> RMAN> run { 2> ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE'; 3> 4> SEND 'NSR_ENV=(NSR_SERVER=rhis-nwdd-1202,NSR_CLIENT=comptel-scan.mauritiustelecom.com)'; 5> #restore clone primary controlfile to '/archicom/ora12c/oradata/control1.ctl'; 6> restore until time 'sysdate-11' controlfile from autobackup; 7> } using target database control file instead of recovery catalog allocated channel: CH1 channel CH1: SID=156 device type=SBT_TAPE channel CH1: NMDA Oracle v8.2.3 sent command to channel: CH1 Starting restore at 22-MAY-18 channel CH1: looking for AUTOBACKUP on day: 20180511 channel CH1: looking for AUTOBACKUP on day: 20180510 channel CH1: looking for AUTOBACKUP on day: 20180509 channel CH1: looking for AUTOBACKUP on day: 20180508 channel CH1: looking for AUTOBACKUP on day: 20180507 channel CH1: looking for AUTOBACKUP on day: 20180506 channel CH1: looking for AUTOBACKUP on day: 20180505 channel CH1: no AUTOBACKUP in 7 days found released channel: CH1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 05/22/2018 13:36:11 RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece RMAN> RMAN> **end-of-file** I see if I set the date to 'sysdate-4', controlfile is being restored RMAN> @restorecontrol2.sql RMAN> connect target *; connected to target database: RECONDB (not mounted) RMAN> connect auxiliary * connected to auxiliary database: RECONDB (not mounted) RMAN> set DBID=3908658873 executing command: SET DBID RMAN> RMAN> run { 2> ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE'; 3> 4> SEND 'NSR_ENV=(NSR_SERVER=rhis-nwdd-1202,NSR_CLIENT=comptel-scan.mauritiustelecom.com)'; 5> #restore clone primary controlfile to '/archicom/ora12c/oradata/control1.ctl'; 6> restore until time 'sysdate-4' controlfile from autobackup; 7> } using target database control file instead of recovery catalog allocated channel: CH1 channel CH1: SID=156 device type=SBT_TAPE channel CH1: NMDA Oracle v8.2.3 sent command to channel: CH1 Starting restore at 22-MAY-18 channel CH1: looking for AUTOBACKUP on day: 20180518 channel CH1: AUTOBACKUP found: c-3908658873-20180518-00 channel CH1: restoring control file from AUTOBACKUP c-3908658873-20180518-00 channel CH1: control file restore from AUTOBACKUP complete output file name=/u02/recondb/oradata/recondb/control01.ctl output file name=/u02/recondb/oradata/recondb/control02.ctl Finished restore at 22-MAY-18 released channel: CH1 |
Administrator
|
Yes you can use that syntax for restoring a controlfile backup from tape.
ex: RESTORE CONTROLFILE FROM 'blabla_BLABLA_034343943'; |
Free forum by Nabble | Edit this page |