To restore tablespace including table using RMAN (Recovery Manager), we should follow these steps:
- Purpose of Recovering Tables and Table Partitions from RMAN Backups:
- RMAN allows you to recover one or more tables or table partitions to a specified point in time without affecting other database objects.
- You can use previously created RMAN backups to achieve it.
2. RMAN Backups Required for Table Recovery:
- To recover a table, you need the following backups:
- Full backup of undo, SYSTEM, SYSAUX, and the tablespace containing the tables or table partitions.
- All partitions that contain dependent objects of the table must be included in the recovery set.
- If indexes or partitions for a table in tablespace ‘tbls1’ are in ‘tbls2’`, include ‘tbls2’ in the recovery set.
- For tables in a PDB, backups of SYSTEM, SYSAUX, and undo tablespaces of the root, CDB seed, and the PDB containing the tables are necessary¹.
- Full backup of undo, SYSTEM, SYSAUX, and the tablespace containing the tables or table partitions.
3. Restoring Specific Tablespace:
- Instead of restoring the full database, you can restore only a specific tablespace using RMAN.
- To restore the
tblpsace1
tablespace, execute the following command:
RMAN> RESTORE TABLESPACE tblpsace1; - You can restore multiple tablespaces by separating them with commas:
RMAN> RESTORE TABLESPACE tblsspace1, tblspace2;