Friday, April 15, 2016

change fast recovery area location, no impact to existing backup

The database RCATT's FRA was set to /rman001/oradata/fast_recovery_area/, now I want to change to another directory, i.e. /dbfra/wiadb01d. Wondering if the recovery catalog still knows it.

The answer is no impact based on my below test.

The old FRA location

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
------- ---- -- ---------- ----------- ------------ --------------------
172     Full    2.14M      DISK        00:00:01     2016-APR-12 11:30:05
        BP Key: 172   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T113004
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T113004_cjrtxx0n_.bkp
  List of Datafiles in backup set 172
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  5       Full 4550801    2016-APR-12 11:30:04 /rman001/oradata/RCATT/undotbs01.dbf



Change to new FRA location

--change FRA location , and backup pluggable database rcatpdb1


RCATT:testdb01:/software/orarman/product/12.1.0/dbs> sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Apr 13 17:44:32 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> alter system set db_recovery_file_dest='/dbfra/testdb01' scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size                  2914560 bytes
Variable Size             922748672 bytes
Database Buffers          671088640 bytes
Redo Buffers               13860864 bytes
Database mounted.
Database opened.
SQL> alter pluggable database rcatpdb1 open;

Pluggable database altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
RCATT:testdb01:/software/orarman/product/12.1.0/dbs> rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Apr 13 17:46:15 2016

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

connected to target database: RCATT (DBID=4101766741)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name RCATT are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 7;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/software/orarman/product/12.1.0/dbs/snapcf_RCATT.f'; # default

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;

old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully stored

RMAN> backup pluggable database rcatpdb1;

Starting backup at 2016-APR-13 17:47:29
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=422 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=443 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00008 name=/rman001/oradata/RCATT/RCATPDB1/sysaux01.dbf
channel ORA_DISK_1: starting piece 1 at 2016-APR-13 17:47:31
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00007 name=/rman001/oradata/RCATT/RCATPDB1/system01.dbf
input datafile file number=00009 name=/rman001/oradata/RCATT/RCATPDB1/RCATPDB1_users01.dbf
channel ORA_DISK_2: starting piece 1 at 2016-APR-13 17:47:31
channel ORA_DISK_2: finished piece 1 at 2016-APR-13 17:47:56
piece handle=/dbfra/testdb01/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_13/o1_mf_nnndf_TAG20160413T174730_                                                       cjw5fm7m_.bkp tag=TAG20160413T174730 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: finished piece 1 at 2016-APR-13 17:48:16
piece handle=/dbfra/testdb01/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_13/o1_mf_nnndf_TAG20160413T174730_                                                       cjw5fm5g_.bkp tag=TAG20160413T174730 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 2016-APR-13 17:48:16

Starting Control File and SPFILE Autobackup at 2016-APR-13 17:48:16
piece handle=/dbfra/testdb01/RCATT/autobackup/2016_04_13/o1_mf_s_909078496_cjw5h0v1_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2016-APR-13 17:48:17



Note that "2D98C99BF6722388E05400144FF8A527" (the funny directory name) is meant for pluggable database's backuppiece.

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time      #Pieces #Copies Compressed Tag
------- -- -- - ----------- -------------------- ------- ------- ---------- ---
146     B  F  A DISK        2016-APR-12 11:20:05 1       1       YES        TAG20160412T112004
147     B  F  A DISK        2016-APR-12 11:21:01 1       1       YES        TAG20160412T112004
148     B  F  A DISK        2016-APR-12 11:21:11 1       1       YES        TAG20160412T112004
149     B  F  A DISK        2016-APR-12 11:21:46 1       1       YES        TAG20160412T112004
150     B  F  A DISK        2016-APR-12 11:21:48 1       1       YES        TAG20160412T112004
151     B  F  A DISK        2016-APR-12 11:22:03 1       1       YES        TAG20160412T112004
152     B  F  A DISK        2016-APR-12 11:22:03 1       1       YES        TAG20160412T112004
153     B  F  A DISK        2016-APR-12 11:22:04 1       1       YES        TAG20160412T112004
154     B  F  A DISK        2016-APR-12 11:22:07 1       1       YES        TAG20160412T112004
156     B  A  A DISK        2016-APR-12 11:22:11 1       1       YES        TAG20160412T112210
157     B  A  A DISK        2016-APR-12 11:22:11 1       1       YES        TAG20160412T112210
....
234     B  A  A DISK        2016-APR-12 19:02:25 1       1       YES        TAG20160412T190223
235     B  A  A DISK        2016-APR-12 19:02:27 1       1       YES        TAG20160412T190223
236     B  A  A DISK        2016-APR-12 19:02:27 1       1       YES        TAG20160412T190223
237     B  F  A DISK        2016-APR-12 19:02:28 1       1       NO         TAG20160412T190227
238     B  F  A DISK        2016-APR-13 17:47:49 1       1       YES        TAG20160413T174730
239     B  F  A DISK        2016-APR-13 17:48:08 1       1       YES        TAG20160413T174730
240     B  F  A DISK        2016-APR-13 17:48:17 1       1       NO         TAG20160413T174816