Skip to main content

How to Restore a Single PDB from RMAN Backup

Introduction

In this article, we will restore a single PDB from an RMAN backup. This is useful when the source database has multiple PDBs, but you only need to restore one specific PDB onto the target machine, without pulling across the others.

Prerequisites

  • A valid RMAN full backup.

Environment used here

Source Database
Hostname orcl.oraeasy.com
Database Name ORCL
PDB Name ORCLPDB
Database Version 19c (19.27)

Target Database
Hostname uat.oraeasy.com
Database Version 19c (19.27)

On the source, we have two PDBs, ORCLPDB and TESTPDB. We will restore only ORCLPDB on the target machine.

Now let's proceed to restore the single PDB via RMAN, step by step.

Step 1: Run a Precheck So Data Can Be Verified Post-Restoration

Before backing anything up, capture a snapshot of the current state of ORCLPDB: data size, segment size, object validity, and a row count from a test table. Once the restore is complete, comparing against these numbers confirms the PDB came across intact.


SQL> DEF
DEFINE _DATE           = "15-SEP-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldc" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1927000000" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0" (CHAR)
DEFINE _O_RELEASE      = "1927000000" (CHAR)
SQL>
SQL> show pdbs
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO
         4 TESTPDB                        READ WRITE NO
SQL> select name from v$datafile where con_id=3;

NAME
--------------------------------------------------
/u01/app/oracle/oradata/ORCL/orclpdb/system01.dbf
/u01/app/oracle/oradata/ORCL/orclpdb/sysaux01.dbf
/u01/app/oracle/oradata/ORCL/orclpdb/undotbs01.dbf
/u01/app/oracle/oradata/ORCL/orclpdb/users01.dbf
/u01/app/oracle/oradata/ORCL/orclpdb/users02.dbf
/u01/app/oracle/oradata/ORCL/orclpdb/OGGPDB01.dbf
/u01/app/oracle/oradata/ORCL/orclpdb/audit_data01.dbf
7 rows selected.

SQL> select name from v$tempfile where con_id=3;
NAME
--------------------------------------------------
/u01/app/oracle/oradata/ORCL/orclpdb/temp01.dbf

SQL> alter session set container=ORCLPDB;
Session altered.

SQL> select sum(BYTES)/1024/1024/1024 as "Size(GB)" from dba_data_files;
  Size(GB)
----------
2.43359375

SQL> select sum(BYTES)/1024/1024/1024 as "Size(GB)" from dba_segments;
  Size(GB)
----------
1.11358643

SQL> select status,count(*) from dba_objects group by status;

STATUS    COUNT(*)
------- ----------
VALID        73176
INVALID         12

SQL> select USERNAME,ACCOUNT_STATUS,EXPIRY_DATE,PROFILE 
      from dba_users where oracle_maintained='N';

USERNAME    ACCOUNT_STATUS     EXPIRY_DA PROFILE
----------  -----------------  --------- --------------------
PDBADMIN    OPEN               21-JUL-25 DEFAULT
C##CLONE    OPEN                         DEFAULT
CDBTEST     OPEN                         DEFAULT
TESTAUDIT   OPEN               19-FEB-26 DEFAULT
C##TEST     OPEN                         DEFAULT
TEST        OPEN               26-NOV-25 DEFAULT
C##OGG      OPEN                         DEFAULT
OGG         OPEN               29-NOV-25 DEFAULT

8 rows selected.

SQL> select count(*) from test.COMPANY;

  COUNT(*)
----------
         7
SQL>

Step 2: Take a Full Database Backup Using RMAN

Since RMAN's PDB-level restore still relies on the full database backup, we back up the entire CDB, all archived logs, and the current control file. Two channels are allocated here to parallelize the backup and cut down on total runtime.

 
[oracle@orcl rman]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Sep 15 11:47:16 2025
Version 19.27.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1718803653)

RMAN> report schema;
report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name ORCLDC

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    1343     SYSTEM               YES     /u01/app/oracle/oradata/ORCL/system01.dbf
3    1195     SYSAUX               NO      /u01/app/oracle/oradata/ORCL/sysaux01.dbf
4    87       UNDOTBS1             YES     /u01/app/oracle/oradata/ORCL/undotbs01.dbf
5    650      PDB$SEED:SYSTEM      NO      /u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
6    450      PDB$SEED:SYSAUX      NO      /u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
7    3        USERS                NO      /u01/app/oracle/oradata/ORCL/users01.dbf
8    230      PDB$SEED:UNDOTBS1    NO      /u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf
9    685      ORCLPDB:SYSTEM       YES     /u01/app/oracle/oradata/ORCL/orclpdb/system01.dbf
10   533      ORCLPDB:SYSAUX       NO      /u01/app/oracle/oradata/ORCL/orclpdb/sysaux01.dbf
11   228      ORCLPDB:UNDOTBS1     YES     /u01/app/oracle/oradata/ORCL/orclpdb/undotbs01.dbf
12   10       ORCLPDB:USERS        NO      /u01/app/oracle/oradata/ORCL/orclpdb/users01.dbf
15   2        ORCLPDB:USERS        NO      /u01/app/oracle/oradata/ORCL/orclpdb/users02.dbf
18   3        OGG                  NO      /u01/app/oracle/oradata/ORCL/OGGCDB01.dbf
19   10       ORCLPDB:OGG          NO      /u01/app/oracle/oradata/ORCL/orclpdb/OGGPDB01.dbf
21   1024     ORCLPDB:AUDIT_DATA   NO      /u01/app/oracle/oradata/ORCL/orclpdb/audit_data01.dbf
22   10       USERS                NO      /u01/app/oracle/oradata/ORCL/users02.dbf
23   685      TESTPDB:SYSTEM       YES     /u01/app/oracle/oradata/ORCL/testpdb/system01.dbf
24   533      TESTPDB:SYSAUX       NO      /u01/app/oracle/oradata/ORCL/testpdb/sysaux01.dbf
25   228      TESTPDB:UNDOTBS1     YES     /u01/app/oracle/oradata/ORCL/testpdb/undotbs01.dbf
26   10       TESTPDB:USERS        NO      /u01/app/oracle/oradata/ORCL/testpdb/users01.dbf
27   2        TESTPDB:USERS        NO      /u01/app/oracle/oradata/ORCL/testpdb/users02.dbf
28   10       TESTPDB:OGG          NO      /u01/app/oracle/oradata/ORCL/testpdb/OGGPDB01.dbf
29   1024     TESTPDB:AUDIT_DATA   NO      /u01/app/oracle/oradata/ORCL/testpdb/audit_data01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    201      TEMP                 32767       /u01/app/oracle/oradata/ORCL/temp01.dbf
2    202      PDB$SEED:TEMP        32767       /u01/app/oracle/oradata/ORCL/pdbseed/temp012025-01-22_00-17-43-687-AM.dbf
3    202      ORCLPDB:TEMP         32767       /u01/app/oracle/oradata/ORCL/orclpdb/temp01.dbf
4    202      TESTPDB:TEMP         32767       /u01/app/oracle/oradata/ORCL/testpdb/temp01.dbf

RMAN> run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
backup as compressed backupset database format '/u01/app/oracle/rman/Fullback_%T_%U';
backup as compressed backupset archivelog all format '/u01/app/oracle/rman/Archive_%T_%U';
backup current controlfile format '/u01/app/oracle/rman/Controlback_%T_%U';
release channel ch1;
release channel ch2;
} run
2> {
3> allocate channel ch1 device type disk;
4> allocate channel ch2 device type disk;
5> backup as compressed backupset database format '/u01/app/oracle/rman/Fullback_%T_%U';
6> backup as compressed backupset archivelog all format '/u01/app/oracle/rman/Archive_%T_%U';
7> backup current controlfile format '/u01/app/oracle/rman/Controlback_%T_%U';
8> release channel ch1;
9> release channel ch2;
10>
}
using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: SID=302 device type=DISK
allocated channel: ch2
channel ch2: SID=66 device type=DISK
Starting backup at 15-SEP-25
channel ch1: starting compressed full datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/ORCL/orclpdb/system01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/ORCL/orclpdb/sysaux01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/ORCL/orclpdb/undotbs01.dbf
channel ch1: starting piece 1 at 15-SEP-25
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00023 name=/u01/app/oracle/oradata/ORCL/testpdb/system01.dbf
input datafile file number=00024 name=/u01/app/oracle/oradata/ORCL/testpdb/sysaux01.dbf
input datafile file number=00025 name=/u01/app/oracle/oradata/ORCL/testpdb/undotbs01.dbf
channel ch2: starting piece 1 at 15-SEP-25
channel ch1: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5m43nta5_182_1_1 tag=TAG20250915T114924 comment=NONE
channel ch1: backup set complete, elapsed time: 00:02:25
channel ch1: starting compressed full datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/system01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL/users01.dbf
input datafile file number=00018 name=/u01/app/oracle/oradata/ORCL/OGGCDB01.dbf
channel ch1: starting piece 1 at 15-SEP-25
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5n43nta5_183_1_1 tag=TAG20250915T114924 comment=NONE
channel ch2: backup set complete, elapsed time: 00:02:26
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf
input datafile file number=00022 name=/u01/app/oracle/oradata/ORCL/users02.dbf
channel ch2: starting piece 1 at 15-SEP-25
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5p43nten_185_1_1 tag=TAG20250915T114924 comment=NONE
channel ch2: backup set complete, elapsed time: 00:01:05
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00021 name=/u01/app/oracle/oradata/ORCL/orclpdb/audit_data01.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/ORCL/orclpdb/users01.dbf
input datafile file number=00019 name=/u01/app/oracle/oradata/ORCL/orclpdb/OGGPDB01.dbf
input datafile file number=00015 name=/u01/app/oracle/oradata/ORCL/orclpdb/users02.dbf
channel ch2: starting piece 1 at 15-SEP-25
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5q43ntgq_186_1_1 tag=TAG20250915T114924 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00029 name=/u01/app/oracle/oradata/ORCL/testpdb/audit_data01.dbf
input datafile file number=00026 name=/u01/app/oracle/oradata/ORCL/testpdb/users01.dbf
input datafile file number=00028 name=/u01/app/oracle/oradata/ORCL/testpdb/OGGPDB01.dbf
input datafile file number=00027 name=/u01/app/oracle/oradata/ORCL/testpdb/users02.dbf
channel ch2: starting piece 1 at 15-SEP-25
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5r43ntgr_187_1_1 tag=TAG20250915T114924 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf
channel ch2: starting piece 1 at 15-SEP-25
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5s43ntgt_188_1_1 tag=TAG20250915T114924 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:35
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
channel ch2: starting piece 1 at 15-SEP-25
channel ch1: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5o43nten_184_1_1 tag=TAG20250915T114924 comment=NONE
channel ch1: backup set complete, elapsed time: 00:02:40
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Fullback_20250915_5t43nti0_189_1_1 tag=TAG20250915T114924 comment=NONE
channel ch2: backup set complete, elapsed time: 00:01:25
Finished backup at 15-SEP-25

Starting backup at 15-SEP-25
current log archived
channel ch1: starting compressed archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=761 RECID=907 STAMP=1211886893
input archived log thread=1 sequence=762 RECID=908 STAMP=1211887793
input archived log thread=1 sequence=763 RECID=909 STAMP=1211888691
channel ch1: starting piece 1 at 15-SEP-25
channel ch2: starting compressed archived log backup set
channel ch2: specifying archived log(s) in backup set
input archived log thread=1 sequence=764 RECID=910 STAMP=1211888760
input archived log thread=1 sequence=765 RECID=911 STAMP=1211888823
input archived log thread=1 sequence=766 RECID=912 STAMP=1211888824
input archived log thread=1 sequence=767 RECID=913 STAMP=1211888828
channel ch2: starting piece 1 at 15-SEP-25
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Archive_20250915_5v43ntkp_191_1_1 tag=TAG20250915T115504 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:03
channel ch2: starting compressed archived log backup set
channel ch2: specifying archived log(s) in backup set
input archived log thread=1 sequence=768 RECID=914 STAMP=1211889304
channel ch2: starting piece 1 at 15-SEP-25
channel ch1: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Archive_20250915_5u43ntkp_190_1_1 tag=TAG20250915T115504 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:04
channel ch2: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Archive_20250915_6043ntks_192_1_1 tag=TAG20250915T115504 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
Finished backup at 15-SEP-25

Starting backup at 15-SEP-25
channel ch1: starting full datafile backup set
channel ch1: specifying datafile(s) in backup set
including current control file in backup set
channel ch1: starting piece 1 at 15-SEP-25
channel ch1: finished piece 1 at 15-SEP-25
piece handle=/u01/app/oracle/rman/Controlback_20250915_6143ntku_193_1_1 tag=TAG20250915T115510 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 15-SEP-25

Starting Control File and SPFILE Autobackup at 15-SEP-25
piece handle=/u01/app/oracle/fast_recovery_area/ORCLDC/autobackup/2025_09_15/o1_mf_s_1211889314_ndhdbc89_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 15-SEP-25

released channel: ch1
released channel: ch2
RMAN> exit

Step 3: Create a Pfile

 
SQL> create pfile='/u01/app/oracle/rman/pfile.ora' from spfile;

File created.

Step 4: Transfer the Backup

Copy the backup pieces, the control file backup, and the pfile across to the target server. Everything the restore needs travels in this one transfer.

  
[oracle@orcl rman]$ scp * oracle@192.168.1.30:/home/oracle/rman
The authenticity of host '192.168.1.30 (192.168.1.30)' can't be established.
ED25519 key fingerprint is SHA256:u4/mMv+QalzEK9glLrODTQ8fSwZgtxo3dxg/vMO0L9s.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.30' (ED25519) to the list of known hosts.
oracle@192.168.1.30's password:
Archive_20250915_5u43ntkp_190_1_1      100%   14MB  20.4MB/s   00:00
Archive_20250915_5v43ntkp_191_1_1      100% 6989KB  14.7MB/s   00:00
Archive_20250915_6043ntks_192_1_1      100%  252KB   4.3MB/s   00:00
Controlback_20250915_6143ntku_193_1_1  100%   19MB  27.2MB/s   00:00
Fullback_20250915_5m43nta5_182_1_1     100%  490MB  15.0MB/s   00:32
Fullback_20250915_5n43nta5_183_1_1     100%  503MB   8.7MB/s   00:57
Fullback_20250915_5o43nten_184_1_1     100%  614MB  10.2MB/s   00:59
Fullback_20250915_5p43nten_185_1_1     100%  148MB   8.5MB/s   00:17
Fullback_20250915_5q43ntgq_186_1_1     100% 1072KB   2.2MB/s   00:00
Fullback_20250915_5r43ntgr_187_1_1     100% 1072KB  10.2MB/s   00:00
Fullback_20250915_5s43ntgt_188_1_1     100%  140MB   8.8MB/s   00:15
Fullback_20250915_5t43nti0_189_1_1     100%  420MB   8.2MB/s   00:51
pfile.ora                              100% 1739     5.9KB/s   00:00
[oracle@orcl rman]$

Step 5: Modify the Parameters for the Target Server and Create Required Directories

The pfile still has the source server's paths and unique name baked in. Adjust the relevant parameters for the target environment, then create the directories the new instance will need.


[oracle@uat rman]$ cat pfile.ora
orcldc.__data_transfer_cache_size=0
orcldc.__db_cache_size=62914560
orcldc.__inmemory_ext_roarea=0
orcldc.__inmemory_ext_rwarea=0
orcldc.__java_pool_size=8388608
orcldc.__large_pool_size=4194304
orcldc.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcldc.__pga_aggregate_target=104857600
orcldc.__sga_target=524288000
orcldc.__shared_io_pool_size=20971520
orcldc.__shared_pool_size=301989888
orcldc.__streams_pool_size=109051904
orcldc.__unified_pga_pool_size=0
*.archive_lag_target=900
*.audit_file_dest='/u01/app/oracle/admin/orcldc/adump'
*.audit_trail='DB','EXTENDED'
*.compatible='19.0.0'
*.control_files='/u01/app/oracle/oradata/orcldc/control01.ctl','/u01/app/oracle/fast_recovery_area/orcldc/control02.ctl'
*.db_block_size=8192
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=8192m
*.db_unique_name='ORCLDC'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcldcXDB)'
*.enable_goldengate_replication=TRUE
*.enable_pluggable_database=true
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.PGA_AGGREGATE_TARGET=100M
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.SGA_TARGET=500M
*.standby_file_management='AUTO'
*.streams_pool_size=104857600
*.undo_tablespace='UNDOTBS1'

[oracle@uat rman]$ mkdir -p /u01/app/oracle/admin/orcldc/adump
[oracle@uat rman]$ mkdir -p /u01/app/oracle/oradata/orcldc/
[oracle@uat rman]$ mkdir -p /u01/app/oracle/fast_recovery_area/orcldc/
[oracle@uat rman]$ mkdir -p /u01/app/oracle/oradata/orcldc/pdbseed
[oracle@uat rman]$ mkdir -p /u01/app/oracle/oradata/orcldc/orclpdb
[oracle@uat rman]$

Step 6: Set the Environment and Start the Database in Nomount State


[oracle@uat ~]$ . oraenv
ORACLE_SID = [oracle] ? orcldc
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19c/dbhome_1
The Oracle base has been set to /u01/app/oracle
[oracle@uat ~]$
[oracle@uat ~]$
[oracle@uat ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Sep 15 14:19:12 2025
Version 19.27.0.0.0
Copyright (c) 1982, 2024, Oracle.  All rights reserved.
Connected to an idle instance.

SQL> def
DEFINE _DATE           = "15-SEP-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldc" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1927000000" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "" (CHAR)
DEFINE _O_RELEASE      = "" (CHAR)

SQL> startup nomount pfile='/home/oracle/rman/pfile.ora';
ORACLE instance started.

Total System Global Area  524284552 bytes
Fixed Size                  9179784 bytes
Variable Size             423624704 bytes
Database Buffers           83886080 bytes
Redo Buffers                7593984 bytes
SQL>

Step 7: Restore the Control File and Mount the Database

With the instance up in nomount state, restore the control file from the backup piece we copied over, then mount the database. The report schema output below shows zero-byte sizes at this point, that's expected, since only the control file has been restored so far, not the actual datafiles.


[oracle@uat ~]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Sep 15 14:20:53 2025
Version 19.27.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (not mounted)

RMAN> restore controlfile from '/home/oracle/rman/Controlback_20250915_6143ntku_193_1_1';
restore controlfile from '/home/oracle/rman/Controlback_20250915_6143ntku_193_1_1';
Starting restore at 15-SEP-25
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: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
output file name=/u01/app/oracle/oradata/orcldc/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/orcldc/control02.ctl
Finished restore at 15-SEP-25

RMAN>
RMAN> alter database mount;
alter database mount;
released channel: ORA_DISK_1
Statement processed

RMAN> report schema;
report schema;
Starting implicit crosscheck backup at 15-SEP-25
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 device type=DISK
Crosschecked 12 objects
Finished implicit crosscheck backup at 15-SEP-25

Starting implicit crosscheck copy at 15-SEP-25
using channel ORA_DISK_1
Finished implicit crosscheck copy at 15-SEP-25

searching for all files in the recovery area
cataloging files...
no files cataloged

RMAN-06139: warning: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name ORCLDC

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    0        SYSTEM               ***     /u01/app/oracle/oradata/ORCL/system01.dbf
3    0        SYSAUX               ***     /u01/app/oracle/oradata/ORCL/sysaux01.dbf
4    0        UNDOTBS1             ***     /u01/app/oracle/oradata/ORCL/undotbs01.dbf
5    0        PDB$SEED:SYSTEM      ***     /u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
6    0        PDB$SEED:SYSAUX      ***     /u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
7    0        USERS                ***     /u01/app/oracle/oradata/ORCL/users01.dbf
8    0        PDB$SEED:UNDOTBS1    ***     /u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf
9    0        ORCLPDB:SYSTEM       ***     /u01/app/oracle/oradata/ORCL/orclpdb/system01.dbf
10   0        ORCLPDB:SYSAUX       ***     /u01/app/oracle/oradata/ORCL/orclpdb/sysaux01.dbf
11   0        ORCLPDB:UNDOTBS1     ***     /u01/app/oracle/oradata/ORCL/orclpdb/undotbs01.dbf
12   0        ORCLPDB:USERS        ***     /u01/app/oracle/oradata/ORCL/orclpdb/users01.dbf
15   0        ORCLPDB:USERS        ***     /u01/app/oracle/oradata/ORCL/orclpdb/users02.dbf
18   0        OGG                  ***     /u01/app/oracle/oradata/ORCL/OGGCDB01.dbf
19   0        ORCLPDB:OGG          ***     /u01/app/oracle/oradata/ORCL/orclpdb/OGGPDB01.dbf
21   0        ORCLPDB:AUDIT_DATA   ***     /u01/app/oracle/oradata/ORCL/orclpdb/audit_data01.dbf
22   0        USERS                ***     /u01/app/oracle/oradata/ORCL/users02.dbf
23   0        TESTPDB:SYSTEM       ***     /u01/app/oracle/oradata/ORCL/testpdb/system01.dbf
24   0        TESTPDB:SYSAUX       ***     /u01/app/oracle/oradata/ORCL/testpdb/sysaux01.dbf
25   0        TESTPDB:UNDOTBS1     ***     /u01/app/oracle/oradata/ORCL/testpdb/undotbs01.dbf
26   0        TESTPDB:USERS        ***     /u01/app/oracle/oradata/ORCL/testpdb/users01.dbf
27   0        TESTPDB:USERS        ***     /u01/app/oracle/oradata/ORCL/testpdb/users02.dbf
28   0        TESTPDB:OGG          ***     /u01/app/oracle/oradata/ORCL/testpdb/OGGPDB01.dbf
29   0        TESTPDB:AUDIT_DATA   ***     /u01/app/oracle/oradata/ORCL/testpdb/audit_data01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    20       TEMP                 32767       /u01/app/oracle/oradata/ORCL/temp01.dbf
2    36       PDB$SEED:TEMP        32767       /u01/app/oracle/oradata/ORCL/pdbseed/temp012025-01-22_00-17-43-687-AM.dbf
3    174      ORCLPDB:TEMP         32767       /u01/app/oracle/oradata/ORCL/orclpdb/temp01.dbf
4    202      TESTPDB:TEMP         32767       /u01/app/oracle/oradata/ORCL/testpdb/temp01.dbf

Step 8: Catalog the Backup Files

RMAN needs to know about the backup pieces sitting in the transferred directory before it can restore from them. The catalog start with command registers everything it finds. The pfile and log file fail to catalog, that's expected, they aren't RMAN backup pieces, so RMAN correctly rejects them.


RMAN> catalog start with '/home/oracle/rman';
catalog start with '/home/oracle/rman';
searching for all files that match the pattern /home/oracle/rman

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/rman/Archive_20250915_5u43ntkp_190_1_1
File Name: /home/oracle/rman/Archive_20250915_5v43ntkp_191_1_1
File Name: /home/oracle/rman/Archive_20250915_6043ntks_192_1_1
File Name: /home/oracle/rman/Controlback_20250915_6143ntku_193_1_1
File Name: /home/oracle/rman/Fullback_20250915_5m43nta5_182_1_1
File Name: /home/oracle/rman/Fullback_20250915_5n43nta5_183_1_1
File Name: /home/oracle/rman/Fullback_20250915_5o43nten_184_1_1
File Name: /home/oracle/rman/Fullback_20250915_5p43nten_185_1_1
File Name: /home/oracle/rman/Fullback_20250915_5q43ntgq_186_1_1
File Name: /home/oracle/rman/Fullback_20250915_5r43ntgr_187_1_1
File Name: /home/oracle/rman/Fullback_20250915_5s43ntgt_188_1_1
File Name: /home/oracle/rman/Fullback_20250915_5t43nti0_189_1_1
File Name: /home/oracle/rman/pfile.ora
File Name: /home/oracle/rmanrestore.log

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/rman/Archive_20250915_5u43ntkp_190_1_1
File Name: /home/oracle/rman/Archive_20250915_5v43ntkp_191_1_1
File Name: /home/oracle/rman/Archive_20250915_6043ntks_192_1_1
File Name: /home/oracle/rman/Controlback_20250915_6143ntku_193_1_1
File Name: /home/oracle/rman/Fullback_20250915_5m43nta5_182_1_1
File Name: /home/oracle/rman/Fullback_20250915_5n43nta5_183_1_1
File Name: /home/oracle/rman/Fullback_20250915_5o43nten_184_1_1
File Name: /home/oracle/rman/Fullback_20250915_5p43nten_185_1_1
File Name: /home/oracle/rman/Fullback_20250915_5q43ntgq_186_1_1
File Name: /home/oracle/rman/Fullback_20250915_5r43ntgr_187_1_1
File Name: /home/oracle/rman/Fullback_20250915_5s43ntgt_188_1_1
File Name: /home/oracle/rman/Fullback_20250915_5t43nti0_189_1_1

List of Files Which Were Not Cataloged
=======================================
File Name: /home/oracle/rman/pfile.ora
  RMAN-07517: Reason: The file header is corrupted
File Name: /home/oracle/rmanrestore.log
  RMAN-07517: Reason: The file header is corrupted
  
RMAN>

Step 9: Execute the Restoration Script

This is the core of the process. We restore the root container, the PDB seed, and specifically ORCLPDB, then recover the database while explicitly skipping TESTPDB, since we don't want that PDB restored. The SET NEWNAME commands redirect every datafile to its new path on the target server before the restore runs.

Here's the syntax behind the key commands used in this step:


RESTORE DATABASE ROOT; -- restore root container
RESTORE DATABASE "PDB$SEED"; -- restore PDBSEED
RESTORE PLUGGABLE DATABASE ORCLPDB; -- restore PDB ORCLPDB
RECOVER DATABASE SKIP FOREVER TABLESPACE -- recover Database and below will be skipped during recovery.
    TESTPDB:SYSTEM,
    TESTPDB:SYSAUX,
    TESTPDB:UNDOTBS1,
    TESTPDB:USERS,
    TESTPDB:OGG,
    TESTPDB:AUDIT_DATA,
    TESTPDB:TEMP;


RMAN> RUN
2> {
3> ALLOCATE CHANNEL c1 DEVICE TYPE disk;
4> ALLOCATE CHANNEL c2 DEVICE TYPE disk;
5> set newname for datafile 1  to '/u01/app/oracle/oradata/orcldc/system01.dbf';
6> set newname for datafile 3  to '/u01/app/oracle/oradata/orcldc/sysaux01.dbf';
7> set newname for datafile 4  to '/u01/app/oracle/oradata/orcldc/undotbs01.dbf';
8> set newname for datafile 5  to '/u01/app/oracle/oradata/orcldc/pdbseed/system01.dbf';
9> set newname for datafile 6  to '/u01/app/oracle/oradata/orcldc/pdbseed/sysaux01.dbf';
10> set newname for datafile 7  to '/u01/app/oracle/oradata/orcldc/users01.dbf';
11> set newname for datafile 8  to '/u01/app/oracle/oradata/orcldc/pdbseed/undotbs01.dbf';
12> set newname for datafile 9  to '/u01/app/oracle/oradata/orcldc/orclpdb/system01.dbf';
13> set newname for datafile 10 to '/u01/app/oracle/oradata/orcldc/orclpdb/sysaux01.dbf';
14> set newname for datafile 11 to '/u01/app/oracle/oradata/orcldc/orclpdb/undotbs01.dbf';
15> set newname for datafile 12 to '/u01/app/oracle/oradata/orcldc/orclpdb/users01.dbf';
16> set newname for datafile 15 to '/u01/app/oracle/oradata/orcldc/orclpdb/users02.dbf';
17> set newname for datafile 18 to '/u01/app/oracle/oradata/orcldc/oggcdb01.dbf';
18> set newname for datafile 19 to '/u01/app/oracle/oradata/orcldc/orclpdb/oggpdb01.dbf';
19> set newname for datafile 21 to '/u01/app/oracle/oradata/orcldc/orclpdb/audit_data01.dbf';
20> set newname for datafile 22 to '/u01/app/oracle/oradata/orcldc/users02.dbf';
21> set newname for tempfile  1 to '/u01/app/oracle/oradata/orcldc/temp01.dbf';
22> set newname for tempfile  2 to '/u01/app/oracle/oradata/orcldc/pdbseed/temp01.dbf';
23> set newname for tempfile  3 to '/u01/app/oracle/oradata/orcldc/orclpdb/temp01.dbf';
24> RESTORE DATABASE ROOT;
25> RESTORE DATABASE "PDB$SEED";
26> RESTORE PLUGGABLE DATABASE ORCLPDB;
27> switch datafile all;
28> switch tempfile all;
29> RECOVER DATABASE SKIP FOREVER TABLESPACE
30>     TESTPDB:SYSTEM,
31>     TESTPDB:SYSAUX,
32>     TESTPDB:UNDOTBS1,
33>     TESTPDB:USERS,
34>     TESTPDB:OGG,
35>     TESTPDB:AUDIT_DATA,
36>     TESTPDB:TEMP;
37> release channel c1;
38> release channel c2;
39> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=20 device type=DISK
allocated channel: c2
channel c2: SID=273 device type=DISK
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 15-SEP-25
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to /u01/app/oracle/oradata/orcldc/system01.dbf
channel c1: restoring datafile 00007 to /u01/app/oracle/oradata/orcldc/users01.dbf
channel c1: restoring datafile 00018 to /u01/app/oracle/oradata/orcldc/oggcdb01.dbf
channel c1: reading from backup piece /home/oracle/rman/Fullback_20250915_5o43nten_184_1_1
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00003 to /u01/app/oracle/oradata/orcldc/sysaux01.dbf
channel c2: restoring datafile 00004 to /u01/app/oracle/oradata/orcldc/undotbs01.dbf
channel c2: restoring datafile 00022 to /u01/app/oracle/oradata/orcldc/users02.dbf
channel c2: reading from backup piece /home/oracle/rman/Fullback_20250915_5p43nten_185_1_1
channel c2: piece handle=/home/oracle/rman/Fullback_20250915_5p43nten_185_1_1 tag=TAG20250915T114924
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:01:07
channel c1: piece handle=/home/oracle/rman/Fullback_20250915_5o43nten_184_1_1 tag=TAG20250915T114924
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:01:57
Finished restore at 15-SEP-25
Starting restore at 15-SEP-25
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00005 to /u01/app/oracle/oradata/orcldc/pdbseed/system01.dbf
channel c1: reading from backup piece /home/oracle/rman/Fullback_20250915_5t43nti0_189_1_1
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00006 to /u01/app/oracle/oradata/orcldc/pdbseed/sysaux01.dbf
channel c2: restoring datafile 00008 to /u01/app/oracle/oradata/orcldc/pdbseed/undotbs01.dbf
channel c2: reading from backup piece /home/oracle/rman/Fullback_20250915_5s43ntgt_188_1_1
channel c2: piece handle=/home/oracle/rman/Fullback_20250915_5s43ntgt_188_1_1 tag=TAG20250915T114924
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:00:45
channel c1: piece handle=/home/oracle/rman/Fullback_20250915_5t43nti0_189_1_1 tag=TAG20250915T114924
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:01:25
Finished restore at 15-SEP-25
Starting restore at 15-SEP-25
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00009 to /u01/app/oracle/oradata/orcldc/orclpdb/system01.dbf
channel c1: restoring datafile 00010 to /u01/app/oracle/oradata/orcldc/orclpdb/sysaux01.dbf
channel c1: restoring datafile 00011 to /u01/app/oracle/oradata/orcldc/orclpdb/undotbs01.dbf
channel c1: reading from backup piece /home/oracle/rman/Fullback_20250915_5m43nta5_182_1_1
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00012 to /u01/app/oracle/oradata/orcldc/orclpdb/users01.dbf
channel c2: restoring datafile 00015 to /u01/app/oracle/oradata/orcldc/orclpdb/users02.dbf
channel c2: restoring datafile 00019 to /u01/app/oracle/oradata/orcldc/orclpdb/oggpdb01.dbf
channel c2: restoring datafile 00021 to /u01/app/oracle/oradata/orcldc/orclpdb/audit_data01.dbf
channel c2: reading from backup piece /home/oracle/rman/Fullback_20250915_5q43ntgq_186_1_1
channel c2: piece handle=/home/oracle/rman/Fullback_20250915_5q43ntgq_186_1_1 tag=TAG20250915T114924
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:00:45
channel c1: piece handle=/home/oracle/rman/Fullback_20250915_5m43nta5_182_1_1 tag=TAG20250915T114924
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:01:45
Finished restore at 15-SEP-25
datafile 1 switched to datafile copy
input datafile copy RECID=20 STAMP=1211902964 file name=/u01/app/oracle/oradata/orcldc/system01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=21 STAMP=1211902964 file name=/u01/app/oracle/oradata/orcldc/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=22 STAMP=1211902965 file name=/u01/app/oracle/oradata/orcldc/undotbs01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=23 STAMP=1211902965 file name=/u01/app/oracle/oradata/orcldc/users01.dbf
datafile 18 switched to datafile copy
input datafile copy RECID=24 STAMP=1211902965 file name=/u01/app/oracle/oradata/orcldc/oggcdb01.dbf
datafile 22 switched to datafile copy
input datafile copy RECID=25 STAMP=1211902965 file name=/u01/app/oracle/oradata/orcldc/users02.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=26 STAMP=1211902965 file name=/u01/app/oracle/oradata/orcldc/pdbseed/system01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=27 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/pdbseed/sysaux01.dbf
datafile 8 switched to datafile copy
input datafile copy RECID=28 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/pdbseed/undotbs01.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=29 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/orclpdb/system01.dbf
datafile 10 switched to datafile copy
input datafile copy RECID=30 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/orclpdb/sysaux01.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=31 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/orclpdb/undotbs01.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=32 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/orclpdb/users01.dbf
datafile 15 switched to datafile copy
input datafile copy RECID=33 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/orclpdb/users02.dbf
datafile 19 switched to datafile copy
input datafile copy RECID=34 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/orclpdb/oggpdb01.dbf
datafile 21 switched to datafile copy
input datafile copy RECID=35 STAMP=1211902966 file name=/u01/app/oracle/oradata/orcldc/orclpdb/audit_data01.dbf
renamed tempfile 1 to /u01/app/oracle/oradata/orcldc/temp01.dbf in control file
renamed tempfile 2 to /u01/app/oracle/oradata/orcldc/pdbseed/temp01.dbf in control file
renamed tempfile 3 to /u01/app/oracle/oradata/orcldc/orclpdb/temp01.dbf in control file
Starting recover at 15-SEP-25
Executing: alter database datafile 23, 24, 25, 26, 27, 28, 29 offline drop
starting media recovery
channel c1: starting archived log restore to default destination
channel c1: restoring archived log
archived log thread=1 sequence=768
channel c1: reading from backup piece /home/oracle/rman/Archive_20250915_6043ntks_192_1_1
channel c1: piece handle=/home/oracle/rman/Archive_20250915_6043ntks_192_1_1 tag=TAG20250915T115504
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/app/oracle/fast_recovery_area/ORCLDC/archivelog/2025_09_15/o1_mf_1_768_ndhso3hb_.arc thread=1 sequence=768
channel default: deleting archived log(s)
archived log file name=/u01/app/oracle/fast_recovery_area/ORCLDC/archivelog/2025_09_15/o1_mf_1_768_ndhso3hb_.arc RECID=915 STAMP=1211902971
unable to find archived log
archived log thread=1 sequence=769
RMAN Command Id : 2025-09-15T15:37:31
RMAN Command Id : 2025-09-15T15:37:31
RMAN Command Id : 2025-09-15T15:37:31
released channel: c1
released channel: c2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/15/2025 15:42:54
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 769 and starting SCN of 9617168
RMAN Client Diagnostic Trace file : /u01/app/oracle/diag/clients/user_oracle/RMAN_3062585620_110/trace/ora_rman_17406_0.trc
RMAN Server Diagnostic Trace file : /u01/app/oracle/diag/rdbms/orcldc/orcldc/trace/orcldc_ora_17414.trc

RMAN> exit;

The error at the end is expected here, recovery ran out of archived logs to apply, since we only shipped logs up through the last backup. That's fine, since the next step opens the database with RESETLOGS rather than continuing recovery further.

Step 10: Try to Open the Database


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MOUNTED
         3 ORCLPDB                        MOUNTED
         4 TESTPDB                        MOUNTED
SQL>
SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
ORCL      MOUNTED

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL>  alter database open RESETLOGS;
 alter database open RESETLOGS
*
ERROR at line 1:
ORA-00344: unable to re-create online log
'/u01/app/oracle/oradata/ORCL/redo01.log'
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 1

Step 11: Rename the Redo Log Files

The error above happens because the control file still points at the source server's redo log paths, which don't exist on this target machine. Rename each redo log member to the target path, then retry the open.


SQL> select member from v$logfile;

MEMBER
-------------------------------------------
/u01/app/oracle/oradata/orcl/redo03.log
/u01/app/oracle/oradata/orcl/redo02.log
/u01/app/oracle/oradata/orcl/redo01.log

7 rows selected.

SQL> alter database rename file '/u01/app/oracle/oradata/orcl/redo01.log' to '/u01/app/oracle/oradata/orcldc/redo01.log';

Database altered.

SQL> alter database rename file '/u01/app/oracle/oradata/orcl/redo02.log' to '/u01/app/oracle/oradata/orcldc/redo02.log';

Database altered.

SQL> alter database rename file '/u01/app/oracle/oradata/orcl/redo03.log' to '/u01/app/oracle/oradata/orcldc/redo03.log';

Database altered.

SQL>  select member from v$logfile;

MEMBER
---------------------------------------------
/u01/app/oracle/oradata/orcldc/redo03.log
/u01/app/oracle/oradata/orcldc/redo02.log
/u01/app/oracle/oradata/orcldc/redo01.log

SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-00392: log 1 of thread 1 is being cleared, operation not allowed
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcldc/redo01.log'

SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1;

Database altered.

SQL> alter database open RESETLOGS;

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO
         4 TESTPDB                        MOUNTED
         

Step 12: Confirm TESTPDB Stays Untouched

ORCLPDB has now been restored and opened successfully. TESTPDB stays in mount state and won't consume any disk space, since we skipped it during recovery. You'll get an error if you try to open it, which is expected.


SQL> alter pluggable database TESTPDB open;
alter pluggable database TESTPDB open
*
ERROR at line 1:
ORA-01147: SYSTEM tablespace file 23 is offline


RMAN> report schema;
report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name ORCLDC

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    1343     SYSTEM               YES     /u01/app/oracle/oradata/orcldc/system01.dbf
3    1195     SYSAUX               NO      /u01/app/oracle/oradata/orcldc/sysaux01.dbf
4    87       UNDOTBS1             YES     /u01/app/oracle/oradata/orcldc/undotbs01.dbf
5    650      PDB$SEED:SYSTEM      NO      /u01/app/oracle/oradata/orcldc/pdbseed/system01.dbf
6    450      PDB$SEED:SYSAUX      NO      /u01/app/oracle/oradata/orcldc/pdbseed/sysaux01.dbf
7    3        USERS                NO      /u01/app/oracle/oradata/orcldc/users01.dbf
8    230      PDB$SEED:UNDOTBS1    NO      /u01/app/oracle/oradata/orcldc/pdbseed/undotbs01.dbf
9    685      ORCLPDB:SYSTEM       YES     /u01/app/oracle/oradata/orcldc/orclpdb/system01.dbf
10   533      ORCLPDB:SYSAUX       NO      /u01/app/oracle/oradata/orcldc/orclpdb/sysaux01.dbf
11   228      ORCLPDB:UNDOTBS1     YES     /u01/app/oracle/oradata/orcldc/orclpdb/undotbs01.dbf
12   10       ORCLPDB:USERS        NO      /u01/app/oracle/oradata/orcldc/orclpdb/users01.dbf
15   2        ORCLPDB:USERS        NO      /u01/app/oracle/oradata/orcldc/orclpdb/users02.dbf
18   3        OGG                  NO      /u01/app/oracle/oradata/orcldc/oggcdb01.dbf
19   10       ORCLPDB:OGG          NO      /u01/app/oracle/oradata/orcldc/orclpdb/oggpdb01.dbf
21   1024     ORCLPDB:AUDIT_DATA   NO      /u01/app/oracle/oradata/orcldc/orclpdb/audit_data01.dbf
22   10       USERS                NO      /u01/app/oracle/oradata/orcldc/users02.dbf
23   0        TESTPDB:SYSTEM       NO      /u01/app/oracle/oradata/ORCL/testpdb/system01.dbf
24   0        TESTPDB:SYSAUX       NO      /u01/app/oracle/oradata/ORCL/testpdb/sysaux01.dbf
25   0        TESTPDB:UNDOTBS1     NO      /u01/app/oracle/oradata/ORCL/testpdb/undotbs01.dbf
26   0        TESTPDB:USERS        NO      /u01/app/oracle/oradata/ORCL/testpdb/users01.dbf
27   0        TESTPDB:USERS        NO      /u01/app/oracle/oradata/ORCL/testpdb/users02.dbf
28   0        TESTPDB:OGG          NO      /u01/app/oracle/oradata/ORCL/testpdb/OGGPDB01.dbf
29   0        TESTPDB:AUDIT_DATA   NO      /u01/app/oracle/oradata/ORCL/testpdb/audit_data01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    35       TEMP                 32767       /u01/app/oracle/oradata/orcldc/temp01.dbf
2    36       PDB$SEED:TEMP        32767       /u01/app/oracle/oradata/orcldc/pdbseed/temp01.dbf
3    174      ORCLPDB:TEMP         32767       /u01/app/oracle/oradata/orcldc/orclpdb/temp01.dbf
4    202      TESTPDB:TEMP         32767       /u01/app/oracle/oradata/ORCL/testpdb/temp01.dbf
RMAN>

Step 13: Perform the Post-Check

Finally, compare these numbers against the baseline captured in Step 1. Matching data size, segment size, object counts, and the test table row count confirm ORCLPDB was restored completely and correctly.


SQL> def
DEFINE _DATE           = "15-SEP-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldc" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1927000000" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0" (CHAR)
DEFINE _O_RELEASE      = "1927000000" (CHAR)
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO
         4 TESTPDB                        MOUNTED

SQL> select name from v$datafile where con_id=3;

NAME
------------------------------------------------------------
/u01/app/oracle/oradata/orcldc/orclpdb/system01.dbf
/u01/app/oracle/oradata/orcldc/orclpdb/sysaux01.dbf
/u01/app/oracle/oradata/orcldc/orclpdb/undotbs01.dbf
/u01/app/oracle/oradata/orcldc/orclpdb/users01.dbf
/u01/app/oracle/oradata/orcldc/orclpdb/users02.dbf
/u01/app/oracle/oradata/orcldc/orclpdb/oggpdb01.dbf
/u01/app/oracle/oradata/orcldc/orclpdb/audit_data01.dbf

7 rows selected.

SQL>  select name from v$tempfile where con_id=3;

NAME
------------------------------------------------------------
/u01/app/oracle/oradata/orcldc/orclpdb/temp01.dbf

SQL> alter session set container=ORCLPDB;

Session altered.

SQL> select sum(BYTES)/1024/1024/1024 as "Size(GB)" from dba_data_files;

  Size(GB)
----------
2.43359375

SQL> select sum(BYTES)/1024/1024/1024 as "Size(GB)" from dba_segments;

  Size(GB)
----------
1.11358643

SQL>  select status,count(*) from dba_objects group by status;

STATUS    COUNT(*)
------- ----------
VALID        73176
INVALID         12

SQL>  select USERNAME,ACCOUNT_STATUS,EXPIRY_DATE,PROFILE from dba_users where oracle_maintained='N';

USERNAME                       ACCOUNT_STATUS                   EXPIRY_DA PROFILE
------------------------------ -------------------------------- --------- --------------------
PDBADMIN                       OPEN                             21-JUL-25 DEFAULT
C##CLONE                       OPEN                                       DEFAULT
CDBTEST                        OPEN                                       DEFAULT
TESTAUDIT                      OPEN                             19-FEB-26 DEFAULT
C##TEST                        OPEN                                       DEFAULT
TEST                           OPEN                             26-NOV-25 DEFAULT
C##OGG                         OPEN                                       DEFAULT
OGG                            OPEN                             29-NOV-25 DEFAULT

8 rows selected.

SQL> select count(*) from test.COMPANY;

  COUNT(*)
----------
         7  
         

In this way, we have restored a single PDB from a full database backup on the target machine.

If you want to convert your Non-CDB into CDB database, please visit below:

Using DB Link
Using Plugging method

Thank you for reading!

I hope this content has been helpful to you. Your feedback and suggestions are always welcome, feel free to leave a comment or reach out with any queries.

Abhishek Shrivastava

Oracle DBA with hands-on experience managing production Data Guard, RAC, GoldenGate, and APEX environments. I write practical, tested installation and troubleshooting guides based on real deployment work.

📧 Email: oraeasyy@gmail.com
🌐 Website: www.oraeasy.com

Follow Us

Comments