TSPITR Using ACFS Snapshots

Starting with Oracle Grid Infrastructure 12c (12.1), Oracle Cloud File system (ASM Cluster File System in cluster environment) supports database files (database version 11.2.0.4 and up) in addition to general-purpose files so that entire Oracle databases can be stored inside Oracle Cloud FS. In my earlier articles I demonstrated that: For a database having its files stored on Oracle Cloud… Continue Reading →

Starting with Oracle Grid Infrastructure 12c (12.1), Oracle Cloud File system (ASM Cluster File System in cluster environment) supports database files (database version 11.2.0.4 and up) in addition to general-purpose files so that entire Oracle databases can be stored inside Oracle Cloud FS. In my earlier articles I demonstrated that:

  • For a database having its files stored on Oracle Cloud file system, Oracle ACFS Snapshots may serve as point-in-time backups of the database which can be used for online recovery of database files.
  • ACFS snapshots taken while the database is in backup mode can be integrated with RMAN and employed to perform complete recovery using RMAN RESTORE / RECOVER commands.

In this article, I will demonstrate that ACFS snapshots taken while the database is in backup mode can be integrated with RMAN and employed to perform Tablespace Point In Time Recovery (TSPITR) as well.

Currently I am working in Oracle Database 12.1.0.2 cluster environment and have created a database named cfsdb, with all of its files stored on the cloud file system as shown below:

[oracle@host01 ~]$ srvctl config database -d cfsdb

Database unique name: cfsdb
Database name: cfsdb
Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1
Oracle user: oracle
Spfile: /mnt/acfs/oradata/cfsdb/spfilecfsdb.ora
Password file: /mnt/acfs/oradata/cfsdb/orapwcfsdb
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: 
Mount point paths: /mnt/acfs
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: cfsdb1
Configured nodes: host01
Database is administrator managed

CFSDB > select name from v$controlfile;

NAME
----------------------------------------
/mnt/acfs/oradata/cfsdb/control01.ctl
/mnt/acfs/cfsdb/control02.ctl


CFSDB > select member from v$logfile;
MEMBER
----------------------------------------
/mnt/acfs/oradata/cfsdb/redo03.log
/mnt/acfs/oradata/cfsdb/redo02.log
/mnt/acfs/oradata/cfsdb/redo01.log



CFSDB >   select name from v$archived_log;

NAME
-----------------------------------------------------------------
/mnt/acfs/CFSDB/archivelog/2015_08_05/o1_mf_1_8_bw3nhvkn_.arc

CFSDB > select name from v$datafile; 

NAME
-----------------------------------------------------------------
/mnt/acfs/oradata/cfsdb/system01.dbf
/mnt/acfs/oradata/cfsdb/sysaux01.dbf
/mnt/acfs/oradata/cfsdb/undotbs01.dbf
/mnt/acfs/oradata/cfsdb/example01.dbf
/mnt/acfs/oradata/cfsdb/users01.dbf

CFSDB>sho parameter db_recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /mnt/acfs
db_recovery_file_dest_size           big integer 4560M

Let’s confirm that the database cfsdb is in archivelog mode:

CFSDB > archive log list;

Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     6
Next log sequence to archive   8
Current log sequence           8

Create a new tablespace named TEST with its data file stored on Oracle Cloud file system:

SQL>create tablespace test datafile '/mnt/acfs/oradata/cfsdb/test01.dbf' size 50m;

Create a table named HR.EMP with 107 rows in the TEST tablespace:

SQL> create table hr.emp tablespace test as select * from hr.employees;

SQL>  select owner, table_name, tablespace_name 
           from dba_tables
           where owner = 'HR' and table_name = 'EMP';

OWNER      TABLE_NAME      TABLESPACE_NAME
---------- --------------- ------------------------------
HR         EMP             TEST

SQL> select count(*) from hr.emp;

  COUNT(*)
----------
       107

Take a backup of the control file:

RMAN> delete backup of controlfile;
      backup current controlfile format '/home/oracle/%U';

Starting backup at 06-AUG-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 06-AUG-15
channel ORA_DISK_1: finished piece 1 at 06-AUG-15
piece handle=/home/oracle/03qdtpdo_1_1 tag=TAG20150806T111711 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 06-AUG-15

Verify that currently there are no snapshots of the cloud file system hosting the database files:

[root@host01 oracle]# acfsutil snap info /mnt/acfs

    number of snapshots:  0
    snapshot space usage: 0  ( 0.00 )

Take a snapshot (example_snap) of the cloud file system while the database is in backup mode:

SQL> alter database begin backup;

Database altered.

[root@host01 acfs]# acfsutil snap create example_snap /mnt/acfs

acfsutil snap create: Snapshot operation is complete.
 
[root@host01 acfs]# acfsutil snap info /mnt/acfs
 
snapshot name:               example_snap
snapshot location:           /mnt/acfs/.ACFS/snaps/example_snap
RO snapshot or RW snapshot:  RO
parent name:                 /mnt/acfs
snapshot creation time:      Thu Aug  6 11:18:25 2015

    number of snapshots:  1
    snapshot space usage: 17858560  (  17.03 MB )

SQL> alter database end backup;

Database altered.

Check that all the datafiles are available in the snapshot:

[root@host01 acfs]# ls -l /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/*.dbf

-rw-r----- 1 oracle oinstall 1342840832 Aug 6 10:57 /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/example01.dbf
-rw-r----- 1 oracle oinstall 650125312  Aug 6 11:15 /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/sysaux01.dbf
-rw-r----- 1 oracle oinstall 828383232  Aug 6 10:57 /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/system01.dbf
-rw-r----- 1 oracle oinstall 62922752   Aug 5 15:08 /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/temp01.dbf
-rw-r----- 1 oracle oinstall 52436992   Aug 6 11:05 /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/test01.dbf
-rw-r----- 1 oracle oinstall 99622912   Aug 6 10:57 /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/undotbs01.dbf
-rw-r----- 1 oracle oinstall 5251072    Aug 6 10:57 /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/users01.dbf

Catalog all the data files in the snapshot example_snap in directory “/mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/“:

RMAN> catalog start with '/mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb';

searching for all files that match the pattern /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb

List of Files Unknown to the Database
=====================================
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/orapwcfsdb
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/sysaux01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/system01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/users01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/undotbs01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/control01.ctl
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/redo01.log
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/redo02.log
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/redo03.log
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/temp01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/example01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/spfilecfsdb.ora
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/test01.dbf

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

List of Cataloged Files
=======================
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/sysaux01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/system01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/users01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/undotbs01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/temp01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/example01.dbf
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/test01.dbf

List of Files Which Were Not Cataloged
=======================================
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/orapwcfsdb
RMAN-07518: Reason: Foreign database file DBID: 0 Database Name:
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/control01.ctl
RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/redo01.log
RMAN-07529: Reason: catalog is not supported for this file type
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/redo02.log
RMAN-07529: Reason: catalog is not supported for this file type
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/redo03.log
RMAN-07529: Reason: catalog is not supported for this file type
File Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/spfilecfsdb.ora
RMAN-07518: Reason: Foreign database file DBID: 0 Database Name:

It can be seen that all the data file copies have been catalogued whereas redo log files, SPfile and control file have not been registered with RMAN.

RMAN> list copy of database;

List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time       
------- ---- - --------------- ---------- ---------------
14      1    A 06-AUG-15       1857785    06-AUG-15      
        Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/system01.dbf

18      2    A 06-AUG-15       1857785    06-AUG-15      
        Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/test01.dbf

13      3    A 06-AUG-15       1857785    06-AUG-15      
        Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/sysaux01.dbf

16      4    A 06-AUG-15       1857785    06-AUG-15      
        Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/undotbs01.dbf

17      5    A 06-AUG-15       1857785    06-AUG-15      
        Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/example01.dbf

15      6    A 06-AUG-15       1857785    06-AUG-15      
        Name: /mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/users01.dbf

Check the current table has 107 rows:

CFSDB> select count(*) from hr.emp;

  COUNT(*)
----------
       107

Create a restore point EMP_107:

CFSDB>create restore point EMP_107;
Restore point created.

CFSDB> select scn, name from v$restore_point
 

       SCN NAME
---------- ------------------------------
   1858125 EMP_107

Insert records into HR.EMP so that there are now 214 records:

CFSDB>insert into hr.emp select * from hr.emp;

              commit;

Commit complete.

CFSDB>select count(*) from hr.emp;

  COUNT(*)
----------
       214

Perform TSPITR for TEST tablespace until restore point EMP_107 when there were 107 records in HR.EMP:

SQL> alter tablespace test offline;

Tablespace altered.

RMAN> recover tablespace "TEST" until restore point emp_107 auxiliary destination '/home/oracle'; 

Starting recover at 06-AUG-15
current log archived
using channel ORA_DISK_1
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

Creating automatic instance, with SID='neph'

initialization parameters used for automatic instance:
db_name=CFSDB
db_unique_name=neph_pitr_CFSDB
compatible=12.1.0.2.0
db_block_size=8192
db_files=200
diagnostic_dest=/u01/app/oracle
_system_trig_enabled=FALSE
sga_target=412M
processes=200
db_create_file_dest=/home/oracle
log_archive_dest_1='location=/home/oracle'
#No auxiliary parameter file used


starting up automatic instance CFSDB

Oracle instance started

Total System Global Area     432013312 bytes

Fixed Size                     2925264 bytes
Variable Size                155192624 bytes
Database Buffers             268435456 bytes
Redo Buffers                   5459968 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully

contents of Memory Script:
{
# set requested point in time
set until  scn 1858126;
# 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';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
}
executing Memory Script

executing command: SET until clause

Starting restore at 06-AUG-15
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=29 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 /home/oracle/03qdtpdo_1_1
channel ORA_AUX_DISK_1: piece handle=/home/oracle/03qdtpdo_1_1 tag=TAG20150806T111711
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
output file name=/home/oracle/CFSDB/controlfile/o1_mf_bw5xshb5_.ctl
Finished restore at 06-AUG-15

sql statement: alter database mount clone database

sql statement: alter system archive log current

sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

contents of Memory Script:
{
# set requested point in time
set until  scn 1858126;
# 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;
set newname for datafile  2 to 
 "/mnt/acfs/oradata/cfsdb/test01.dbf";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  1, 4, 3, 2;
 
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

executing command: SET NEWNAME

renamed tempfile 1 to /home/oracle/CFSDB/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 06-AUG-15
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: restoring datafile 00001
input datafile copy RECID=13 STAMP=887023637 file 

name=/mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/system01.dbf
destination for restore of datafile 00001: /home/oracle/CFSDB/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: copied datafile copy of datafile 00001
output file name=/home/oracle/CFSDB/datafile/o1_mf_system_bw5xt0b5_.dbf RECID=17 STAMP=887023777
channel ORA_AUX_DISK_1: restoring datafile 00004 
input datafile copy RECID=14 STAMP=887023638 file 

name=/mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/undotbs01.dbf 
destination for restore of datafile 00004: /home/oracle/CFSDB/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: copied datafile copy of datafile 00004
output file name=/home/oracle/CFSDB/datafile/o1_mf_undotbs1_bw5xymgo_.dbf RECID=18 STAMP=887023811
channel ORA_AUX_DISK_1: restoring datafile 00003 
input datafile copy RECID=15 STAMP=887023639 file 

name=/mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/sysaux01.dbf 
destination for restore of datafile 00003: /home/oracle/CFSDB/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: copied datafile copy of datafile 00003
output file name=/home/oracle/CFSDB/datafile/o1_mf_sysaux_bw5xzd5n_.dbf RECID=19 STAMP=887023962
channel ORA_AUX_DISK_1: restoring datafile 00002 
input datafile copy RECID=16 STAMP=887023640 file 

name=/mnt/acfs/.ACFS/snaps/example_snap/oradata/cfsdb/test01.dbf 
destination for restore of datafile 00002: /mnt/acfs/oradata/cfsdb/test01.dbf
channel ORA_AUX_DISK_1: copied datafile copy of datafile 00002
output file name=/mnt/acfs/oradata/cfsdb/test01.dbf RECID=0 STAMP=0
Finished restore at 06-AUG-15

datafile 1 switched to datafile copy
input datafile copy RECID=20 STAMP=887023995 file  

name=/home/oracle/CFSDB/datafile/o1_mf_system_bw5xt0b5_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=21 STAMP=887023995 file  

name=/home/oracle/CFSDB/datafile/o1_mf_undotbs1_bw5xymgo_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=22 STAMP=887023995 file  

name=/home/oracle/CFSDB/datafile/o1_mf_sysaux_bw5xzd5n_.dbf

contents of Memory Script:
{
# set requested point in time
set until  scn 1858126;
# 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";
sql clone "alter database datafile  2 online";
# recover and open resetlogs
recover clone database tablespace  "TEST", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
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

sql statement: alter database datafile  2 online

Starting recover at 06-AUG-15
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 13 is already on disk as file  
/mnt/acfs/CFSDB/archivelog/2015_08_06/o1_mf_1_13_bw5xn23v_.arc
archived log file name=/mnt/acfs/CFSDB/archivelog/2015_08_06/o1_mf_1_13_bw5xn23v_.arc thread=1  
sequence=13
media recovery complete, elapsed time: 00:00:03
Finished recover at 06-AUG-15

database opened

contents of Memory Script:
{
# make read only the tablespace that will be exported
sql clone 'alter tablespace  "TEST" read only';
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/home/oracle''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/home/oracle''";
}
executing Memory Script

sql statement: alter tablespace  "TEST" read only

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/home/oracle''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/home/oracle''

Performing export of metadata...
   EXPDP> Starting "SYS"."TSPITR_EXP_neph_bFwg":  
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   EXPDP> Master table "SYS"."TSPITR_EXP_neph_bFwg" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_neph_bFwg is:
   EXPDP>   /home/oracle/tspitr_neph_53179.dmp
   EXPDP> ******************************************************************************
   EXPDP> Datafiles required for transportable tablespace TEST:
   EXPDP>   /mnt/acfs/oradata/cfsdb/test01.dbf
   EXPDP> Job "SYS"."TSPITR_EXP_neph_bFwg" successfully completed at Thu Aug 6 11:45:11 2015 elapsed  
0 00:09:37
Export completed


contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
# drop target tablespaces before importing them back
sql 'drop tablespace  "TEST" including contents keep datafiles cascade constraints';
}
executing Memory Script

Oracle instance shut down

sql statement: drop tablespace  "TEST" including contents keep datafiles cascade constraints

Performing import of metadata...
   IMPDP> Master table "SYS"."TSPITR_IMP_neph_drcx" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_neph_drcx":  
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   IMPDP> Job "SYS"."TSPITR_IMP_neph_drcx" successfully completed at Thu Aug 6 11:47:47 2015 elapsed  
0 00:01:11
Import completed


contents of Memory Script:
{
# make read write and offline the imported tablespaces
sql 'alter tablespace  "TEST" read write';
sql 'alter tablespace  "TEST" offline';
# enable autobackups after TSPITR is finished
sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
}
executing Memory Script

sql statement: alter tablespace  "TEST" read write

sql statement: alter tablespace  "TEST" offline

sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;

Removing automatic instance
Automatic instance removed
auxiliary instance file /home/oracle/CFSDB/datafile/o1_mf_temp_bw5y6b5p_.tmp deleted
auxiliary instance file /home/oracle/CFSDB/onlinelog/o1_mf_3_bw5y5q6k_.log deleted
auxiliary instance file /home/oracle/CFSDB/onlinelog/o1_mf_2_bw5y5lho_.log deleted
auxiliary instance file /home/oracle/CFSDB/onlinelog/o1_mf_1_bw5y5jo5_.log deleted
auxiliary instance file /home/oracle/CFSDB/datafile/o1_mf_sysaux_bw5xzd5n_.dbf deleted
auxiliary instance file /home/oracle/CFSDB/datafile/o1_mf_undotbs1_bw5xymgo_.dbf deleted
auxiliary instance file /home/oracle/CFSDB/datafile/o1_mf_system_bw5xt0b5_.dbf deleted
auxiliary instance file /home/oracle/CFSDB/controlfile/o1_mf_bw5xshb5_.ctl deleted
auxiliary instance file tspitr_neph_53179.dmp deleted
Finished recover at 06-AUG-15


CFSDB> alter tablespace test online;

Tablespace altered.

Verify that TSPITR to restore point EMP_107 is successful and that there are 107 records in HR.EMP now:

CFSDB> select count(*) from hr.emp;

  COUNT(*)
----------
       107

Thus, we have been able to perform TSPITR by employing the RMAN “RECOVER TABLESPACE UNTIL…” command which utilized:

  • Backup of control file to restore the control file
  • A snapshot taken while the database was in backup mode to restore the datafiles for the “TEST”, “SYSTEM”, “UNDOTBS1”, and “SYSAUX” tablespaces.

Conclusion:

  • Starting with Oracle Grid Infrastructure 12c (12.1), ACFS supports database files in cluster environment so that entire Oracle databases can be stored inside a cloud file system.
  • ACFS snapshots taken while the database is in backup mode can be integrated with RMAN and employed to perform TSPITR using RMAN “RECOVER TABLESPACE UNTIL…” command.