Recovery Manager: Release 12.1.0.1.0 - Production on Thu Sep 6 21:24:48 2018
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
connected to target database: ACME (DBID=2033062067, not open)
SET UNTIL SCN
RMAN> run
2> {
3> set until scn = 5352316;
4> restore database;
5> recover database;
6> }
RMAN> list incarnation;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 ACME 2033062067 PARENT 1 2013-05-24:11:51:11
2 2 ACME 2033062067 PARENT 1720082 2014-05-26:17:42:12
3 3 ACME 2033062067 CURRENT 2285882 2018-09-06:21:30:30
UNTIL SEQUENCE
RMAN> run {
2> set until sequence=4;
3> restore database;
4> recover database;
5> }
RMAN>alter database open read only;
UNTIL TIME
UNTIL TIME
export NLS_DATE_FORMAT="yyyy-mm-dd:hh24:mi:ss"
RMAN> shutdown immediate
RMAN> startup mount
RMAN> run
2> {
3> set until time="to_date('2020-12-04:19:07:32','yyyy-mm-dd:hh24:mi:ss')";
4> restore database;
5> recover database;
6> }
RMAN> shutdown immediate
RMAN> startup mount
RMAN> run
2> {
3> set until time="to_date('2020-12-04:19:07:32','yyyy-mm-dd:hh24:mi:ss')";
4> restore database;
5> recover database;
6> }
executing command: SET until clause
Starting restore at 04-DEC-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hwjdb5xz_.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_hwjdb5y7_.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hwjdb5xv_.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_9qwmf6kp_.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hwjdb5yc_.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_9qwmf54t_.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2020_12_04/o1_mf_nnndf_TAG20201204T190331_hwomlo34_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2020_12_04/o1_mf_nnndf_TAG20201204T190331_hwomlo34_.bkp tag=TAG20201204T190331
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 04-DEC-20
Starting recover at 04-DEC-20
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 265 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2020_12_04/o1_mf_1_265_hwomnodw_.arc
archived log for thread 1 with sequence 266 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2020_12_04/o1_mf_1_266_hwomys3o_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2020_12_04/o1_mf_1_265_hwomnodw_.arc thread=1 sequence=265
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2020_12_04/o1_mf_1_266_hwomys3o_.arc thread=1 sequence=266
media recovery complete, elapsed time: 00:00:00
Finished recover at 04-DEC-20
RMAN> alter database open resetlogs;
Statement processed
RMAN> exit
No hay comentarios:
Publicar un comentario