STORE DATA TILL MARCH1
https://taliphakanozturken.wordpress.com/tag/rman/
A. Time-Based incomplete recovery;
cd /TJPSB004_BACKUP/TJTGHRP/DB
scp -r * orahris@172.16.2.65:/GSTDB/orahris/bkphris/rman
nOTE:Prior to start restore , plz transfer all rman file to test RMAN directory server.
in recover operation time , all archive log sequence will be apply.
$ sqlplus "/ as sysdba"
SQL> shutdown immediate;
SQL> startup mount;
$rman target /
RMAN>catalog start with '/GSTDB/orahris/bkphris/rman/';
or
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16064_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16063_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16062_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16065_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606005_16060_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606007_16061_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606004_16059_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606004_16058_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606004_16057_1';
RMAN>restore database until time "to_date('02/03/18 13:0:00','DD/MM/YY HH24:MI:SS')";
RMAN>recover database until time "to_date('02/03/18 13:00:00','DD/MM/YY HH24:MI:SS')";
SQL> alter database open resetlogs;
==============================
RESTORE TILL MIDNIGHT:
RMAN>restore database until time "to_date('01/03/18 23:0:00','DD/MM/YY HH24:MI:SS')";
RMAN>recover database until time "to_date('01/03/18 23:00:00','DD/MM/YY HH24:MI:SS')";
SQL> alter database open resetlogs;
RMAN> restore database until time "to_date('01/03/18 18:0:00','DD/MM/YY HH24:MI:SS')";
Starting restore at 02-MAR-18
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/02/2018 13:24:10
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
select open_mode from v$database;
select log_mode from v$database;
restore controlfile from '/GSTDB/orahris/bkphris/rman/TJTGHRP_Control_file969693078_16088_1';
run {
allocate channel icmt_t1 type disk;
restore archivelog
from time = "to_date('Feb 27 2018 19:20:00','Mon DD YYYY HH24:MI:SS')"
until time = "to_date('Mar 02 2018 22:30:00','Mon DD YYYY HH24:MI:SS')";
}
RMAN-06496: must use the TO clause when the database is mounted or open
https://taliphakanozturken.wordpress.com/tag/rman/
A. Time-Based incomplete recovery;
cd /TJPSB004_BACKUP/TJTGHRP/DB
scp -r * orahris@172.16.2.65:/GSTDB/orahris/bkphris/rman
nOTE:Prior to start restore , plz transfer all rman file to test RMAN directory server.
in recover operation time , all archive log sequence will be apply.
$ sqlplus "/ as sysdba"
SQL> shutdown immediate;
SQL> startup mount;
$rman target /
RMAN>catalog start with '/GSTDB/orahris/bkphris/rman/';
or
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16064_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16063_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16062_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_Arch_Log969606385_16065_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606005_16060_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606007_16061_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606004_16059_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606004_16058_1';
catalog backuppiece '/GSTDB/orahris/bkphris/rman/TJTGHRP_969606004_16057_1';
RMAN>restore database until time "to_date('02/03/18 13:0:00','DD/MM/YY HH24:MI:SS')";
RMAN>recover database until time "to_date('02/03/18 13:00:00','DD/MM/YY HH24:MI:SS')";
SQL> alter database open resetlogs;
==============================
RESTORE TILL MIDNIGHT:
RMAN>restore database until time "to_date('01/03/18 23:0:00','DD/MM/YY HH24:MI:SS')";
RMAN>recover database until time "to_date('01/03/18 23:00:00','DD/MM/YY HH24:MI:SS')";
SQL> alter database open resetlogs;
RMAN> restore database until time "to_date('01/03/18 18:0:00','DD/MM/YY HH24:MI:SS')";
Starting restore at 02-MAR-18
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/02/2018 13:24:10
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
select open_mode from v$database;
select log_mode from v$database;
restore controlfile from '/GSTDB/orahris/bkphris/rman/TJTGHRP_Control_file969693078_16088_1';
run {
allocate channel icmt_t1 type disk;
restore archivelog
from time = "to_date('Feb 27 2018 19:20:00','Mon DD YYYY HH24:MI:SS')"
until time = "to_date('Mar 02 2018 22:30:00','Mon DD YYYY HH24:MI:SS')";
}
RMAN-06496: must use the TO clause when the database is mounted or open
No comments:
Post a Comment