LATEST TOPICS

Oracle 12c New RMAN Feature: Restore and Recovery of database table

Introduction

Prior to Oracle database 12c, restoring a single table was not possible through RMAN and it required a lot of manual efforts to successfully restore and recover a specific database table. Oracle 12c database provides a new feature in RMAN, where a table can be restored and recovered from a RMAN database backup. In today’s article, we are going to explore this new RMAN feature of Oracle database 12c.

How it works

There is nothing new with respect to the concept of table restoration. It is just that Oracle has automated all the steps involved in the restoration process. Prior to 12c, in order restore a table, we had to create a stage database to restore the tablespaces containing the table (s) to be restored/recovered (along with the mandatory and dependent tablespaces). Once the stage database is created, we had to take an export dump of the table (s) in question and then import it into the target database where it needs to be restored/recovered.

With Oracle Database 12c, Oracle has made this entire process of table restoration automated and integrated it with RMAN

In this post, I would be demonstrating this new feature with a simple example.
Prerequisites:

  • The table to be restored/recovered must not belong to SYS or SYSTEM schema
  • The table to be recovered/restore must not reside within SYSTEM or SYSAUX tablespace
  • Valid Backup of the table in question must exist to be able to perform restore/recovery
  • All the dependencies needs to be taken care prior to the table restore/recovery (Like triggers, foreign keys, etc..)

Demonstration

Lets create a table for our demonstration.

----//
----// creating table tab_rec.emp //----
----//
SQL:labpa > create table tab_rec.emp (id number(3), name varchar2(5));

Table created.

----//
----// populating the table with some records //----
----//
SQL:labpa > insert into tab_rec.emp values(100,'abc');

1 row created.

SQL:labpa > insert into tab_rec.emp values(101,'def');

1 row created.

SQL:labpa > insert into tab_rec.emp values(102,'ghi');

1 row created.

SQL:labpa > commit;

Commit complete.


----//
----// validating table records //-----
----//
SQL:labpa > select sysdate from dual;

SYSDATE
--------------------
24-AUG-2014 02:07:49

SQL:labpa > select * from tab_rec.emp;

ID            NAME
----------   -----
100           abc
101           def
102           ghi

Lets take a backup of the database, before dropping the table. We will use this backup to restore our table.

Recovery Manager: Release 12.1.0.1.0 - Production on Sun Aug 24 02:08:29 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

connected to target database: LABPA (DBID=202657105)

RMAN> run
2> {
3> allocate channel c1 device type disk;
4> allocate channel c2 device type disk;
5> backup as compressed backupset database format '/backup/LABPA_test_tab_rec_%U.bkp';
6> release channel c2;
7> release channel c1;
8> }

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=278 device type=DISK

allocated channel: c2
channel c2: SID=36 device type=DISK

Starting backup at 24-AUG-2014 02:08:36
channel c1: starting compressed full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/LABPA/DATAFILE/sysaux.259.853797787
input datafile file number=00006 name=+DATA/LABPA/DATAFILE/users.283.853797997
input datafile file number=00004 name=+DATA/LABPA/DATAFILE/undotbs1.270.853797999
channel c1: starting piece 1 at 24-AUG-2014 02:08:37
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/LABPA/DATAFILE/system.280.853797923
input datafile file number=00002 name=+DATA/LABPA/DATAFILE/gg_data.261.855102121
channel c2: starting piece 1 at 24-AUG-2014 02:08:37
channel c2: finished piece 1 at 24-AUG-2014 02:09:22
piece handle=/backup/LABPA_test_tab_rec_0npgnch5_1_1.bkp tag=TAG20140824T020837 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:45
channel c1: finished piece 1 at 24-AUG-2014 02:09:32
piece handle=/backup/LABPA_test_tab_rec_0mpgnch5_1_1.bkp tag=TAG20140824T020837 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:55
Finished backup at 24-AUG-2014 02:09:32

Starting Control File and SPFILE Autobackup at 24-AUG-2014 02:09:32
piece handle=+FLASH/LABPA/AUTOBACKUP/2014_08_24/s_856404572.358.856404575 comment=NONE
Finished Control File and SPFILE Autobackup at 24-AUG-2014 02:09:35

released channel: c2

released channel: c1

Now, lets drop the table from the database (We will restore it using RMAN new feature)

----//
----// make a note of the database time (as an approximate restore/recovery point) //----
----//
SQL:labpa > select sysdate from dual;

SYSDATE
--------------------
24-AUG-2014 02:10:22

----//
----// drop the table //----
----//
SQL:labpa > drop table tab_rec.emp purge;

Table dropped.

Till this point of simulation, we have created a table with some records as well as taken a full database backup. We have simulated an accidental table drop from the database in the previous step. Now, we are going to explore the Oracle 12c feature of restoring a table using RMAN. However, prior to that lets cross-check the availability of database backup for table restoration/recovery.

Recovery Manager: Release 12.1.0.1.0 - Production on Sun Aug 24 02:10:52 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

connected to target database: LABPA (DBID=202657105)

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
22 Full 204.63M DISK 00:00:43 24-AUG-2014 02:09:20
BP Key: 22 Status: AVAILABLE Compressed: YES Tag: TAG20140824T020837
Piece Name: /backup/LABPA_test_tab_rec_0npgnch5_1_1.bkp
List of Datafiles in backup set 22
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- -------------------- ----
1 Full 1996969 24-AUG-2014 02:08:37 +DATA/LABPA/DATAFILE/system.280.853797923
2 Full 1996969 24-AUG-2014 02:08:37 +DATA/LABPA/DATAFILE/gg_data.261.855102121

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
23 Full 160.72M DISK 00:00:47 24-AUG-2014 02:09:24
BP Key: 23 Status: AVAILABLE Compressed: YES Tag: TAG20140824T020837
Piece Name: /backup/LABPA_test_tab_rec_0mpgnch5_1_1.bkp
List of Datafiles in backup set 23
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- -------------------- ----
3 Full 1996968 24-AUG-2014 02:08:37 +DATA/LABPA/DATAFILE/sysaux.259.853797787
4 Full 1996968 24-AUG-2014 02:08:37 +DATA/LABPA/DATAFILE/undotbs1.270.853797999
6 Full 1996968 24-AUG-2014 02:08:37 +DATA/LABPA/DATAFILE/users.283.853797997

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
24 Full 9.64M DISK 00:00:02 24-AUG-2014 02:09:34
BP Key: 24 Status: AVAILABLE Compressed: NO Tag: TAG20140824T020932
Piece Name: +FLASH/LABPA/AUTOBACKUP/2014_08_24/s_856404572.358.856404575
SPFILE Included: Modification time: 24-AUG-2014 01:36:32
SPFILE db_unique_name: LABPA
Control File Included: Ckp SCN: 1996999 Ckp time: 24-AUG-2014 02:09:32

We have verified that we have VALID database backup available to facilitate table restoration. Now, lets restore and recover the table using the new 12c RMAN RECOVER TABLE command.

I am using the SET UNTIL TIME option to recover (other available options are SET UNTIL SCN and SET UNTIL SEQUENCE).

SIT BACK and Relax. Let Oracle do all the tasks that you used do manually prior to Oracle database 12c. (Read inline comments for details about the processing)

RMAN> run
2> {
3> recover table tab_rec.emp ----- List of tables to be restored/recovered
4> until time "to_date('24-AUG-2014 02:09:32','DD-MON-YYYY HH24:MI:SS')" ----- Time until which the table needs to be recovered
5> auxiliary destination '/app/oracle/tabrec/' ---- Datafile locations for the temporary (stage) database
6> datapump destination '/backup/EXP' ----- DTATPUMP directory for export/import process
7> dump file 'tab_rec_demo.dmp'; ----- Export Dump file name to be used by the DataPump
8> }

---- Here RMAN starts with the table restore/recovery process

Starting recover at 24-AUG-2014 02:11:45
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1

------- RMAN is creating a temporary database instance to facilitate the Table restore/recovery

Creating automatic instance, with SID='Dlsd'  ----- RMAN has allocated a dummy instance name to the temporary database

initialization parameters used for automatic instance:
db_name=LABPA
db_unique_name=Dlsd_pitr_LABPA ----- RMAN has allocated a dummy unique name to the temporary database
compatible=12.1.0.0.0
db_block_size=8192
db_files=200
sga_target=1G
processes=80
diagnostic_dest=/app/oracle
db_create_file_dest=/app/oracle/tabrec/ ------ Value taken from the parameter, passed in the recover command
log_archive_dest_1='location=/app/oracle/tabrec/' ----- Value taken from the parameter, passed in the recover command
#No auxiliary parameter file used
starting up automatic instance LABPA

Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytes
Variable Size 281019648 bytes
Database Buffers 780140544 bytes
Redo Buffers 5480448 bytes
Automatic instance created

contents of Memory Script:
{
# set requested point in time
set until time "to_date('24-AUG-2014 02:09:32','DD-MON-YYYY HH24:MI:SS')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET until clause

Starting restore at 24-AUG-2014 02:11:58
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=82 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece +FLASH/LABPA/AUTOBACKUP/2014_08_24/s_856404572.358.856404575
channel ORA_AUX_DISK_1: piece handle=+FLASH/LABPA/AUTOBACKUP/2014_08_24/s_856404572.358.856404575 tag=TAG20140824T020932
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:05
output file name=/app/oracle/tabrec/LABPA/controlfile/o1_mf_9zkz4vlc_.ctl
Finished restore at 24-AUG-2014 02:12:04

sql statement: alter database mount clone database

sql statement: alter system archive log current

contents of Memory Script:
{
# set requested point in time
set until time "to_date('24-AUG-2014 02:09:32','DD-MON-YYYY HH24:MI:SS')";
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 4 to new;
set newname for clone datafile 3 to new;
set newname for clone tempfile 1 to new;
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 4, 3;
switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to /app/oracle/tabrec/LABPA/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 24-AUG-2014 02:12:09
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /app/oracle/tabrec/LABPA/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /backup/LABPA_test_tab_rec_0npgnch5_1_1.bkp
channel ORA_AUX_DISK_1: piece handle=/backup/LABPA_test_tab_rec_0npgnch5_1_1.bkp tag=TAG20140824T020837
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /app/oracle/tabrec/LABPA/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /app/oracle/tabrec/LABPA/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /backup/LABPA_test_tab_rec_0mpgnch5_1_1.bkp
channel ORA_AUX_DISK_1: piece handle=/backup/LABPA_test_tab_rec_0mpgnch5_1_1.bkp tag=TAG20140824T020837
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 24-AUG-2014 02:13:40

datafile 1 switched to datafile copy
input datafile copy RECID=4 STAMP=856404820 file name=/app/oracle/tabrec/LABPA/datafile/o1_mf_system_9zkz525f_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=5 STAMP=856404820 file name=/app/oracle/tabrec/LABPA/datafile/o1_mf_undotbs1_9zkz6hbw_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=6 STAMP=856404820 file name=/app/oracle/tabrec/LABPA/datafile/o1_mf_sysaux_9zkz6h9w_.dbf

contents of Memory Script:
{
# set requested point in time
set until time "to_date('24-AUG-2014 02:09:32','DD-MON-YYYY HH24:MI:SS')";
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 4 online";
sql clone "alter database datafile 3 online";
# recover and open database read only
recover clone database tablespace "SYSTEM", "UNDOTBS1", "SYSAUX";
sql clone 'alter database open read only';
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile 1 online

sql statement: alter database datafile 4 online

sql statement: alter database datafile 3 online

Starting recover at 24-AUG-2014 02:13:40
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 26 is already on disk as file +FLASH/LABPA/ARCHIVELOG/2014_08_24/thread_1_seq_26.369.856404705
archived log file name=+FLASH/LABPA/ARCHIVELOG/2014_08_24/thread_1_seq_26.369.856404705 thread=1 sequence=26
media recovery complete, elapsed time: 00:00:01
Finished recover at 24-AUG-2014 02:13:43

sql statement: alter database open read only

contents of Memory Script:
{
sql clone "create spfile from memory";
shutdown clone immediate;
startup clone nomount;
sql clone "alter system set control_files =
''/app/oracle/tabrec/LABPA/controlfile/o1_mf_9zkz4vlc_.ctl'' comment=
''RMAN set'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
# mount database
sql clone 'alter database mount clone database';
}
executing Memory Script

sql statement: create spfile from memory

database closed
database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytes
Variable Size 285213952 bytes
Database Buffers 775946240 bytes
Redo Buffers 5480448 bytes

sql statement: alter system set control_files = ''/app/oracle/tabrec/LABPA/controlfile/o1_mf_9zkz4vlc_.ctl'' comment= ''RMAN set'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 1068937216 bytes
Fixed Size 2296576 bytes
Variable Size 285213952 bytes
Database Buffers 775946240 bytes
Redo Buffers 5480448 bytes

sql statement: alter database mount clone database

contents of Memory Script:
{
# set requested point in time
set until time "to_date('24-AUG-2014 02:09:32','DD-MON-YYYY HH24:MI:SS')";
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile 6 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 6; ----- Data File containing the table to be restored/recovered
switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 24-AUG-2014 02:14:20
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=15 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00006 to /app/oracle/tabrec/DLSD_PITR_LABPA/datafile/o1_mf_users_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /backup/LABPA_test_tab_rec_0mpgnch5_1_1.bkp
channel ORA_AUX_DISK_1: piece handle=/backup/LABPA_test_tab_rec_0mpgnch5_1_1.bkp tag=TAG20140824T020837
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 24-AUG-2014 02:14:22

datafile 6 switched to datafile copy
input datafile copy RECID=8 STAMP=856404862 file name=/app/oracle/tabrec/DLSD_PITR_LABPA/datafile/o1_mf_users_9zkz95kl_.dbf

contents of Memory Script:
{
# set requested point in time
set until time "to_date('24-AUG-2014 02:09:32','DD-MON-YYYY HH24:MI:SS')";
# online the datafiles restored or switched
sql clone "alter database datafile 6 online";
# recover and open resetlogs
recover clone database tablespace "USERS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile 6 online

Starting recover at 24-AUG-2014 02:14:22
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 26 is already on disk as file +FLASH/LABPA/ARCHIVELOG/2014_08_24/thread_1_seq_26.369.856404705
archived log file name=+FLASH/LABPA/ARCHIVELOG/2014_08_24/thread_1_seq_26.369.856404705 thread=1 sequence=26
media recovery complete, elapsed time: 00:00:00
Finished recover at 24-AUG-2014 02:14:24

database opened ----- Temporary database is created and recovered until the mentioned time and is now ready for table restoration

-----
----- DATA PUMP directories are getting created within the temporary database as per the parameters passed to enable DATAPUMP export/import

contents of Memory Script:
{
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/backup/EXP''"; ----- Values taken from the parameter passed in the recover command
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/backup/EXP''"; ----- Values taken from the parameter passed in the recover command
}
executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/backup/EXP''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/backup/EXP''

------
------ Export dump of the table to be restored/recovery is going to be taken

Performing export of tables...
EXPDP> Starting "SYS"."TSPITR_EXP_Dlsd_iBEl":
EXPDP> Estimate in progress using BLOCKS method...
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
EXPDP> Total estimation using BLOCKS method: 64 KB
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
EXPDP> . . exported "TAB_REC"."EMP" 5.523 KB 3 rows
EXPDP> Master table "SYS"."TSPITR_EXP_Dlsd_iBEl" successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_Dlsd_iBEl is:
EXPDP> /backup/EXP/tab_rec_demo.dmp
EXPDP> Job "SYS"."TSPITR_EXP_Dlsd_iBEl" successfully completed at Sun Aug 24 02:15:18 2014 elapsed 0 00:00:33
Export completed

-----
---- Temporary database instance, which was created for staging purpose is shutting down

contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
}
executing Memory Script

Oracle instance shut down

------
------ Now the table to be restored/recovered is getting imported to the actual target 

Performing import of tables...
IMPDP> Master table "SYS"."TSPITR_IMP_Dlsd_rBEC" successfully loaded/unloaded
IMPDP> Starting "SYS"."TSPITR_IMP_Dlsd_rBEC":
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
IMPDP> . . imported "TAB_REC"."EMP" 5.523 KB 3 rows
IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
IMPDP> Job "SYS"."TSPITR_IMP_Dlsd_rBEC" successfully completed at Sun Aug 24 02:15:38 2014 elapsed 0 00:00:07

----- Import completed

-----
----- Temporary database is now getting removed along with the dump file created by the export process.

Removing automatic instance
Automatic instance removed
auxiliary instance file /app/oracle/tabrec/LABPA/datafile/o1_mf_temp_9zkz802b_.tmp deleted
auxiliary instance file /app/oracle/tabrec/DLSD_PITR_LABPA/onlinelog/o1_mf_3_9zkz9bfn_.log deleted
auxiliary instance file /app/oracle/tabrec/DLSD_PITR_LABPA/onlinelog/o1_mf_2_9zkz99og_.log deleted
auxiliary instance file /app/oracle/tabrec/DLSD_PITR_LABPA/onlinelog/o1_mf_1_9zkz98w4_.log deleted
auxiliary instance file /app/oracle/tabrec/DLSD_PITR_LABPA/datafile/o1_mf_users_9zkz95kl_.dbf deleted
auxiliary instance file /app/oracle/tabrec/LABPA/datafile/o1_mf_sysaux_9zkz6h9w_.dbf deleted
auxiliary instance file /app/oracle/tabrec/LABPA/datafile/o1_mf_undotbs1_9zkz6hbw_.dbf deleted
auxiliary instance file /app/oracle/tabrec/LABPA/datafile/o1_mf_system_9zkz525f_.dbf deleted
auxiliary instance file /app/oracle/tabrec/LABPA/controlfile/o1_mf_9zkz4vlc_.ctl deleted
auxiliary instance file tab_rec_demo.dmp deleted
Finished recover at 24-AUG-2014 02:15:41

We have successfully restored and recovered the table which was accidentally dropped. Lets validate the table restoration by querying the table records.

SQL:labpa > select sysdate from dual;

SYSDATE
--------------------
24-AUG-2014 02:16:54

----//
----// querying table records for validation //-----
----//
SQL:labpa > select * from tab_rec.emp;

ID         NAME
--------- -----
100        abc
101        def
102        ghi

As we can see RMAN has successfully restored the table along with the records to the specified point in time.

Conclusion

Oracle has simplified the task of table restoration using RMAN by automating all the steps that a DBA used to perform prior to Oracle database release 12c. This is a great feature and going to save the time and effort of lot of DBAs.

%d bloggers like this:
Visit Us On LinkedinVisit Us On TwitterVisit Us On Google PlusCheck Our Feed