o Mount – Controlfile
o Open – Datafile | Archivelog
Version 19.22.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: MAXCDB (DBID=2565367265)
ALLOCATE CHANNEL chl2 TYPE DISK MAXPIECESIZE 10G;
ALLOCATE CHANNEL chl3 TYPE DISK MAXPIECESIZE 10G;
BACKUP
FORMAT '/u01/backup/%d_D_LEVEL0_%T_%u_s%s_p%p'
INCREMENTAL LEVEL 0 DATABASE
CURRENT CONTROLFILE
FORMAT '/u01/backup/%d_C_LEVEL0_%T_%u'
SPFILE
FORMAT '/u01/backup/%d_S_LEVEL0_%T_%u'
PLUS ARCHIVELOG
FORMAT '/u01/backup/%d_A_LEVEL0_%T_%u_s%s_p%p';
RELEASE CHANNEL chl1;
RELEASE CHANNEL chl2;
RELEASE CHANNEL chl3;
}
using target database control file instead of recovery catalog
allocated channel: chl1
channel chl1: SID=281 device type=DISK
allocated channel: chl2
channel chl2: SID=49 device type=DISK
allocated channel: chl3
channel chl3: SID=283 device type=DISK
Starting backup at 30-JUL-24
current log archived
released channel: chl1
released channel: chl2
released channel: chl3
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 31 10:08:54 2024
Version 19.22.0.0.0
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 2365584784 bytes
Fixed Size 9180560 bytes
Variable Size 536870912 bytes
Database Buffers 1811939328 bytes
Redo Buffers 7593984 bytes
Database mounted.
Database dropped.
[oracle@prod ~]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Sat Mar 16 10:32:35 2024
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
LRM-00109: could not open parameter file '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/initorclcdb.ora'
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area 1073737800 bytes
Fixed Size 8904776 bytes
Variable Size 276824064 bytes
Database Buffers 784334848 bytes
Redo Buffers 3674112 bytes
RMAN> restore spfile from '/u01/rman/ORCLCDB_S_LEVEL0_20240316_6b2lr2j6_s203_p1';
database closed
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
Total System Global Area 2365584784 bytes
Fixed Size 9180560 bytes
Variable Size 536870912 bytes
Database Buffers 1811939328 bytes
Redo Buffers 7593984 bytes
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/ORCLCDB/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/ORCLCDB/control02.ctl
Finished restore at 16-MAR-24
released channel: ORA_DISK_1
Statement processed
Starting implicit crosscheck backup at 16-MAR-24
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=45 device type=DISK
Crosschecked 15 objects
Finished implicit crosscheck backup at 16-MAR-24
Starting recover at 16-MAR-24
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCLCDB/archivelog/2024_03_16/o1_mf_1_4_lzb6w8v4_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/ORCLCDB/archivelog/2024_03_16/o1_mf_1_4_lzb6w8v4_.arc thread=1 sequence=4
unable to find archived log
archived log thread=1 sequence=5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/16/2024 10:48:31
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5 and starting SCN of 5565499
Statement processed
Version 19.22.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: MAXCDB (DBID=2565367265)
ALLOCATE CHANNEL chl2 TYPE DISK MAXPIECESIZE 10G;
ALLOCATE CHANNEL chl3 TYPE DISK MAXPIECESIZE 10G;
BACKUP
FORMAT '/u01/backup/%d_D_LEVEL0_%T_%u_s%s_p%p'
INCREMENTAL LEVEL 0 DATABASE
CURRENT CONTROLFILE
FORMAT '/u01/backup/%d_C_LEVEL0_%T_%u'
SPFILE
FORMAT '/u01/backup/%d_S_LEVEL0_%T_%u'
PLUS ARCHIVELOG
FORMAT '/u01/backup/%d_A_LEVEL0_%T_%u_s%s_p%p';
RELEASE CHANNEL chl1;
RELEASE CHANNEL chl2;
RELEASE CHANNEL chl3;
}
Version 19.22.0.0.0
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/MAXCDB/maxpdb/sysaux01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/system01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/undotbs01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/users01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/apex01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/users02.dbf
ALLOCATE CHANNEL chl2 TYPE DISK MAXPIECESIZE 10G;
ALLOCATE CHANNEL chl3 TYPE DISK MAXPIECESIZE 10G;
BACKUP
FORMAT '/u01/backup/%d_D_LEVEL1_LEVEL1_%T_%u_s%s_p%p'
INCREMENTAL LEVEL 1 DATABASE
CURRENT CONTROLFILE
FORMAT '/u01/backup/%d_C_LEVEL1_%T_%u'
SPFILE
FORMAT '/u01/backup/%d_S_LEVEL1_%T_%u'
PLUS ARCHIVELOG
FORMAT '/u01/backup/%d_A_LEVEL1_%T_%u_s%s_p%p';
RELEASE CHANNEL chl1;
RELEASE CHANNEL chl2;
RELEASE CHANNEL chl3;
}
allocated channel: chl1
channel chl1: SID=283 device type=DISK
allocated channel: chl2
channel chl2: SID=272 device type=DISK
allocated channel: chl3
channel chl3: SID=44 device type=DISK
Starting backup at 31-JUL-24
current log archived
released channel: chl1
released channel: chl2
released channel: chl3
Version 19.22.0.0.0
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 2365584784 bytes
Fixed Size 9180560 bytes
Variable Size 536870912 bytes
Database Buffers 1811939328 bytes
Redo Buffers 7593984 bytes
Database mounted.
Version 19.22.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
LRM-00109: could not open parameter file '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/initmaxcdb.ora'
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area 1073739904 bytes
Fixed Size 8947840 bytes
Variable Size 276824064 bytes
Database Buffers 780140544 bytes
Redo Buffers 7827456 bytes
RMAN> restore spfile from '/u01/backup/MAXCDB_S_LEVEL1_20240731_24319qpc';
Starting restore at 31-JUL-24
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/backup/MAXCDB_S_LEVEL1_20240731_24319qpc
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 31-JUL-24
Oracle instance started
Total System Global Area 2365584784 bytes
Fixed Size 9180560 bytes
Variable Size 536870912 bytes
Database Buffers 1811939328 bytes
Redo Buffers 7593984 bytes
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/MAXCDB/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/MAXCDB/control02.ctl
Finished restore at 31-JUL-24
Statement processed
Starting implicit crosscheck backup at 31-JUL-24
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=22 device type=DISK
Crosschecked 23 objects
Finished implicit crosscheck backup at 31-JUL-24
Starting implicit crosscheck copy at 31-JUL-24
using channel ORA_DISK_1
Finished implicit crosscheck copy at 31-JUL-24
searching for all files in the recovery area
cataloging files...
cataloging done
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 31-JUL-24
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/MAXCDB/system01.dbf
destination for restore of datafile 00004:
archived log file name=/u01/archive/1_2_1175771414.dbf thread=1 sequence=2
archived log file name=/u01/archive/1_3_1175771414.dbf thread=1 sequence=3
archived log file name=/u01/archive/1_4_1175771414.dbf thread=1 sequence=4
unable to find archived log
archived log thread=1 sequence=5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/31/2024 12:47:17
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5 and starting SCN of 3056593
Version 19.22.0.0.0
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/MAXCDB/maxpdb/system01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/sysaux01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/undotbs01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/users01.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/users02.dbf
/u01/app/oracle/oradata/MAXCDB/maxpdb/apex01.dbf
r
Scenario 03: Point-in-Time Recovery
(PITR)
o
Achieved
in three levels:
§ Database [DBPITR]
§ Tablespace [TSPITR]
§ Table
o Required recovery Point:
§ SCN
§ Log sequence
§ Restore point
§ Time
[oracle@dbserver ~]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Wed
Jul 31 16:58:14 2024
Version 19.22.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: MAXCDB (DBID=2565367265)
RMAN> RUN {
ALLOCATE CHANNEL chl1 TYPE DISK MAXPIECESIZE 10G;
ALLOCATE CHANNEL chl2 TYPE DISK MAXPIECESIZE 10G;
ALLOCATE CHANNEL chl3 TYPE DISK MAXPIECESIZE 10G;
BACKUP
FORMAT '/u01/backup/%d_D_LEVEL0_%T_%u_s%s_p%p'
INCREMENTAL LEVEL 0 DATABASE
CURRENT CONTROLFILE
FORMAT '/u01/backup/%d_C_LEVEL0_%T_%u'
SPFILE
FORMAT '/u01/backup/%d_S_LEVEL0_%T_%u'
PLUS ARCHIVELOG
FORMAT '/u01/backup/%d_A_LEVEL0_%T_%u_s%s_p%p';
RELEASE CHANNEL chl1;
RELEASE CHANNEL chl2;
RELEASE CHANNEL chl3;
}
§ Database [DBPITR]
§ Tablespace [TSPITR]
§ Table
o Required recovery Point:
§ SCN
§ Log sequence
§ Restore point
§ Time
Version 19.22.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: MAXCDB (DBID=2565367265)
ALLOCATE CHANNEL chl1 TYPE DISK MAXPIECESIZE 10G;
ALLOCATE CHANNEL chl2 TYPE DISK MAXPIECESIZE 10G;
ALLOCATE CHANNEL chl3 TYPE DISK MAXPIECESIZE 10G;
BACKUP
FORMAT '/u01/backup/%d_D_LEVEL0_%T_%u_s%s_p%p'
INCREMENTAL LEVEL 0 DATABASE
CURRENT CONTROLFILE
FORMAT '/u01/backup/%d_C_LEVEL0_%T_%u'
SPFILE
FORMAT '/u01/backup/%d_S_LEVEL0_%T_%u'
PLUS ARCHIVELOG
FORMAT '/u01/backup/%d_A_LEVEL0_%T_%u_s%s_p%p';
RELEASE CHANNEL chl1;
RELEASE CHANNEL chl2;
RELEASE CHANNEL chl3;
}
Starting backup at 31-JUL-24
current log archived
channel chl1: starting archived log backup set
channel chl1: specifying archived log(s) in backup set
input archived log thread=1 sequence=1 RECID=20 STAMP=1175775292
channel chl1: starting piece 1 at 31-JUL-24
channel chl2: starting archived log backup set
name=/u01/app/oracle/oradata/MAXCDB/sysaux01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/MAXCDB/users01.dbf
Version 19.22.0.0.0
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
-----------------------------
31-JUL-2024 20:15:53
Version 19.22.0.0.0
database closed
database dismounted
Oracle instance shut down
Oracle instance started
database mounted
Variable Size 536870912 bytes
Database Buffers 1811939328 bytes
Redo Buffers 7593984 bytes
--------------------
31-JUL-2024 20:39:39
RUN {
SET UNTIL TIME 'DD-MON-YYYY HH24:MI:SS';
RESTORE DATABASE;
RECOVER DATABASE;
}
******************************************
SET UNTIL TIME '31-JUL-2024 20:39:39';
RESTORE DATABASE;
RECOVER DATABASE;
}
Starting restore at 31-JUL-24
using channel ORA_DISK_1
media recovery complete, elapsed time: 00:00:03
Finished recover at 31-JUL-24
Tags
RMAN