Showing posts with label RMAN. Show all posts
Showing posts with label RMAN. Show all posts

Friday, December 30, 2016

RMAN-20020: database incarnation not set

I have one PT env using storage sync for database sync.

Thought need to re-register DB after DB refresh, so unregister and register again.

RMAN> register database;
starting full resync of recovery catalog
full resync complete
database registered in recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03008: error while performing automatic resync of recovery catalog
RMAN-20020: database incarnation not set


However, this is the error.

Disconnected RMAN connection, and attempted to re- register , and finally succeed.

RMAN>   unregister database;



Do you really want to unregister the database (enter YES or NO)? yes
database unregistered from the recovery catalog

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
 full resync complete


Another way to overcome this , is to issue RESET DATABASE command, e.g in http://www.dbaref.com/home/rman/rman-20020databaseincarnationnotset

But I don't want to change DBID explicitly.




One more thought, in fact I don't need to unregister  & register again, as there is no change to DBID.



As such, what I need to do is just configure RMAN setting directly.


CONFIGURE DEFAULT DEVICE TYPE TO disk;
starting full resync of recovery catalog
full resync complete
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN> #parallelism 2 for EE only
2> #CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO compressed backupset;
3>
4> #parallelism 1 for SE only
5> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 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 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN> show all;
RMAN configuration parameters for database with db_unique_name PSCRMP are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
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 ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/software/oraps/product/11.2.0/dbs/snapcf_PSCRMP.f'; # default

RMAN>
RMAN> #To ensure the control file is backed up by default, type the following at the RMAN prompt:
2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN>
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
old RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN>
RMAN> #To change how many backup sets you would like to retain, type the following at the RMAN prompt:
2> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN>
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO disk;
old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete



In the end, I even get back backupsets before refresh listed in catalog DB in few seconds.


RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time      #Pieces #Copies Compressed Tag
------- -- -- - ----------- -------------------- ------- ------- ---------- ---
10519659 B     U SBT_TAPE    2016-JUL-13 18:31:25 1       1       NO         DLPX2015052818345511D6F7437298
10519660 B     U SBT_TAPE    2016-JUL-13 18:32:35 1       1       NO         DLPX2015052818345511D6F7437298
10519661 B     U SBT_TAPE    2016-JUL-13 18:34:04 1       1       NO         DLPX2015052818345511D6F7437298
...
10520973 B  F  A DISK        2016-DEC-21 16:38:15 1       1       YES        TAG20161221T163047
10520974 B  F  A DISK        2016-DEC-21 16:47:00 1       1       YES        TAG20161221T163047
10520975 B  F  A DISK        2016-DEC-21 16:53:40 1       1       YES        TAG20161221T163047
10520976 B  F  A DISK        2016-DEC-21 16:58:26 1       1       YES        TAG20161221T163047
10520977 B  F  A DISK        2016-DEC-21 17:00:34 1       1       YES        TAG20161221T163047
10520978 B  F  A DISK        2016-DEC-21 17:03:35 1       1       YES        TAG20161221T163047
10520979 B  F  A DISK        2016-DEC-21 17:04:23 1       1       YES        TAG20161221T163047
10520980 B  F  A DISK        2016-DEC-21 17:05:07 1       1       YES        TAG20161221T163047
10520981 B  F  A DISK        2016-DEC-21 17:07:17 1       1       YES        TAG20161221T163047
10520982 B  F  A DISK        2016-DEC-21 17:09:28 1       1       YES        TAG20161221T163047
10520983 B  F  A DISK        2016-DEC-21 17:12:34 1       1       YES        TAG20161221T163047
10520984 B  F  A DISK        2016-DEC-21 17:13:47 1       1       YES        TAG20161221T163047
10520985 B  F  A DISK        2016-DEC-21 17:14:44 1       1       YES        TAG20161221T163047
10520986 B  F  A DISK        2016-DEC-21 17:15:01 1       1       YES        TAG20161221T163047
10520987 B  F  A DISK        2016-DEC-21 17:15:33 1       1       YES        TAG20161221T163047
10520988 B  F  A DISK        2016-DEC-21 17:15:50 1       1       YES        TAG20161221T163047
10520989 B  F  A DISK        2016-DEC-21 17:16:47 1       1       YES        TAG20161221T163047
10520990 B  F  A DISK        2016-DEC-21 17:18:01 1       1       YES        TAG20161221T163047
10520991 B  F  A DISK        2016-DEC-21 17:18:26 1       1       YES        TAG20161221T163047
10520992 B  F  A DISK        2016-DEC-21 17:20:53 1       1       YES        TAG20161221T163047
10520993 B  F  A DISK        2016-DEC-21 17:22:16 1       1       YES        TAG20161221T163047
10520994 B  F  A DISK        2016-DEC-21 17:23:05 1       1       YES        TAG20161221T163047
10520995 B  F  A DISK        2016-DEC-21 17:24:21 1       1       YES        TAG20161221T163047
10520996 B  F  A DISK        2016-DEC-21 17:25:24 1       1       YES        TAG20161221T163047
10520997 B  F  A DISK        2016-DEC-21 17:26:13 1       1       YES        TAG20161221T163047
10520998 B  F  A DISK        2016-DEC-21 17:27:57 1       1       YES        TAG20161221T163047
10520999 B  F  A DISK        2016-DEC-21 17:28:30 1       1       YES        TAG20161221T163047
10521000 B  F  A DISK        2016-DEC-21 17:29:31 1       1       YES        TAG20161221T163047
10521092 B  F  A DISK        2016-DEC-21 17:29:34 1       1       NO         TAG20161221T172934
10568384 B  F  A DISK        2016-DEC-22 12:41:04 1       1       NO         TAG20161222T124104
10568391 B  F  A DISK        2016-DEC-22 11:42:06 1       1       YES        TAG20161222T114206
10568401 B  F  A DISK        2016-DEC-22 11:49:41 1       1       YES        TAG20161222T114206
10568413 B  F  A DISK        2016-DEC-22 11:58:26 1       1       YES        TAG20161222T114206
10568426 B  F  A DISK        2016-DEC-22 12:05:12 1       1       YES        TAG20161222T114206
10568440 B  F  A DISK        2016-DEC-22 12:09:57 1       1       YES        TAG20161222T114206
10568455 B  F  A DISK        2016-DEC-22 12:12:02 1       1       YES        TAG20161222T114206
10568471 B  F  A DISK        2016-DEC-22 12:14:57 1       1       YES        TAG20161222T114206
10568488 B  F  A DISK        2016-DEC-22 12:15:43 1       1       YES        TAG20161222T114206
10568506 B  F  A DISK        2016-DEC-22 12:16:28 1       1       YES        TAG20161222T114206
10568525 B  F  A DISK        2016-DEC-22 12:18:43 1       1       YES        TAG20161222T114206
10568545 B  F  A DISK        2016-DEC-22 12:20:48 1       1       YES        TAG20161222T114206
10568566 B  F  A DISK        2016-DEC-22 12:23:54 1       1       YES        TAG20161222T114206
10568588 B  F  A DISK        2016-DEC-22 12:25:09 1       1       YES        TAG20161222T114206
10568611 B  F  A DISK        2016-DEC-22 12:26:14 1       1       YES        TAG20161222T114206
10568635 B  F  A DISK        2016-DEC-22 12:26:39 1       1       YES        TAG20161222T114206
10568660 B  F  A DISK        2016-DEC-22 12:27:04 1       1       YES        TAG20161222T114206
10568686 B  F  A DISK        2016-DEC-22 12:27:20 1       1       YES        TAG20161222T114206
10568713 B  F  A DISK        2016-DEC-22 12:28:25 1       1       YES        TAG20161222T114206
10568741 B  F  A DISK        2016-DEC-22 12:29:40 1       1       YES        TAG20161222T114206
10568770 B  F  A DISK        2016-DEC-22 12:30:05 1       1       YES        TAG20161222T114206
10568800 B  F  A DISK        2016-DEC-22 12:32:30 1       1       YES        TAG20161222T114206
10568831 B  F  A DISK        2016-DEC-22 12:33:56 1       1       YES        TAG20161222T114206
10568863 B  F  A DISK        2016-DEC-22 12:34:41 1       1       YES        TAG20161222T114206
10568896 B  F  A DISK        2016-DEC-22 12:35:56 1       1       YES        TAG20161222T114206
10568930 B  F  A DISK        2016-DEC-22 12:37:01 1       1       YES        TAG20161222T114206
10568965 B  F  A DISK        2016-DEC-22 12:37:47 1       1       YES        TAG20161222T114206
10569001 B  F  A DISK        2016-DEC-22 12:39:32 1       1       YES        TAG20161222T114206
10569038 B  F  A DISK        2016-DEC-22 12:40:07 1       1       YES        TAG20161222T114206



Tuesday, June 14, 2016

RMAN-06214: Archivelog , controlfile copy

1. for archived log file

RMAN-06207: WARNING: 677 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Archivelog      /archive/testdb01/arch_822080339_219_1.arc
RMAN-06214: Archivelog      /archive/testdb01/arch_822080339_220_1.arc
RMAN-06214: Archivelog      /archive/testdb01/arch_822080339_221_1.arc
RMAN-06214: Archivelog      /archive/testdb01/arch_822080339_222_1.arc
RMAN-06214: Archivelog      /archive/testdb01/arch_822080339_223_1.arc
RMAN-06214: Archivelog      /archive/testdb01/arch_822080339_224_1.arc



This is simple to clear with one command: crosscheck archivelog all;

After which, just issue :  DELETE NOPROMPT OBSOLETE device type disk;



2. for controlfile copy, I have to crosscheck for each file copy name. i.e.

run {
allocate channel c1 ;
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_DAL_testdb01.2015516.210';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_AL_testdb01.2015517.30';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_DAL_testdb01.2015517.90';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_AL_testdb01.2015517.150';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_DAL_testdb01.2015517.210';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_AL_testdb01.2015518.30';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_DAL_testdb01.2015518.90';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_AL_testdb01.2015518.150';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_DAL_testdb01.2015518.210';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_AL_testdb01.2015519.30';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_DAL_testdb01.2015519.90';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_AL_testdb01.2015519.151';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_DAL_testdb01.2015519.210';
crosscheck controlfilecopy '/oracle/node1/admin/testdb01/cntrl/ctrlf.BILLDB21_AL_testdb01.2015520.30';

DELETE NOPROMPT OBSOLETE device type disk;

release channel c1;
}






Thursday, June 02, 2016

Ah, 11g OEM can't support my 12c PDB acting as Recovery Catalog


See the SID being used ?  In 12c, I don't see there is SID for 12c portable database. That is the problem.

NMO not setuid-root (Unix-only)

come across with above error when using Enterprise Manager, dealing with backup & recovery.

Referred to below two pages, to confirm they are same problem & solution.

https://community.oracle.com/thread/383358?start=0&tstart=0
https://dba010.wordpress.com/2011/07/18/error-connection-to-host-as-user-oracle-failed-error-nmo-not-setuid-root-unix-only/



My problem solved after ask system administrator to help run the root.sh too.


Monday, May 30, 2016

ORA-17628: Oracle error 17629 returned by remote Oracle server

when resync catalog

rman target / catalog rman/@RCAT

RMAN> RESYNC CATALOG FROM DB_UNIQUE_NAME DGs;


RMAN>
user interrupt received
RESYNC CATALOG FROM DB_UNIQUE_NAME DG;

resyncing from database with DB_UNIQUE_NAME DG
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync from db_unique_name command on default channel at 05/26/2016 16:19:54
ORA-17629: Cannot connect to the remote database server


changed to use password connection

orarac2poc:DGS:/home/oracle/ops/logs> rman target sys/ catalog rman/@RCAT

Recovery Manager: Release 11.2.0.4.0 - Production on Thu May 26 16:20:01 2016

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

connected to target database: DG (DBID=1716975309)
connected to recovery catalog database

RMAN> RESYNC CATALOG FROM DB_UNIQUE_NAME DG;

resyncing from database with DB_UNIQUE_NAME DG
starting full resync of recovery catalog
full resync complete

RMAN> RESYNC CATALOG FROM DB_UNIQUE_NAME all;


resyncing from database with DB_UNIQUE_NAME DG
starting full resync o

Wednesday, May 25, 2016

RMAN ORA-19606: Cannot copy or restore to snapshot control file

When RMAN needs to resynchronize the recovery catalog with a read-consistent version of the control file, it creates a temporary snapshot control file. RMAN needs a snapshot control file when resynchronizing with the recovery catalog or when making a backup of the current control file.
The default location for the snapshot control file is platform-specific and depends on the Oracle home of each target database. For example, the default filename on some Linux platforms is $ORACLE_HOME/dbs/snapcf_@.f


RMAN> delete obsolete;

starting full resync of recovery catalog
full resync complete
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 3
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=188 device type=DISK
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     1123728 2016-JAN-19 14:33:21 /software/oratest/product/11.2.0/dbs/snapcf_TESTDB.f
Backup Set           1123715 2015-NOV-06 10:55:47

Do you really want to delete the above objects (enter YES or NO)? yes
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 05/25/2016 11:57:24
ORA-19606: Cannot copy or restore to snapshot control file


SOLUTION

Not sure why this happens, but the solution is to configure a different snapshot controlfile name so that RMAN can use that, thus allowing you to remove the “old” one. Then configure back to what you had:
configure snapshot controlfile name to '/tmp/it.f';
crosscheck controlfilecopy "/oracle/product/11.2.0.2/dbs/snapcf_P10AC.f";
delete expired controlfilecopy "/oracle/product/11.2.0.2/dbs/snapcf_P10AC.f";
delete noprompt obsolete;
configure snapshot controlfile name to '/oracle/product/11.2.0.2/dbs/snapcf_P10AC.f';

ORA-19806: cannot make duplex backups in recovery area

when running "backup filesperset 10 archivelog all not backed up 2 times;", encountered below error :

channel ORA_DISK_1: starting piece 1 at 2016-MAY-25 14:59:18
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/25/2016 14:59:18
ORA-19806: cannot make duplex backups in recovery area

Initially thought FRA is full, but it is not.

SYS@PELD> @@chk_fra_usage

NAME
------------------------------------------------------------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/dbfra/testdb01d
 5.3687E+10  959854592                 0              20



FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                          0                         0               0
REDO LOG                              0                         0               0
ARCHIVED LOG                          0                         0               0
BACKUP PIECE                       1.79                         0              20
IMAGE COPY                            0                         0               0
FLASHBACK LOG                         0                         0               0
FOREIGN ARCHIVED LOG                  0                         0               0

7 rows selected.


Googled and found below in http://www.allinterview.com/showanswers/41216/ora-19806-cannot-make-duplex-backups-in-recovery-area.html


this is because you might have set the parametes
1)configure datafile backup copies for device type disk to
2)configure archivelog backup copies for device type disk to

now the solution is to clear the above two configuration
settings i,e...
A)
1)configure datafile backup copies for device type disk to
clear;
2)configure archivelog backup copies for device type disk to
clear;
now it will work ................... 


Tried to reset back to 1 copy, and it did works for me now. 


RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK clear;

old RMAN configuration parameters:
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
RMAN configuration parameters are successfully reset to default value




RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously. When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices. 

This is could be related to I am using FRA as backup destination.

Monday, May 23, 2016

simpler error message for RMAN tested against NOARCHIVELOG in 12c

Before actual cold backup for development database, I skip the shutdown command to test the script deployment, without actually bring down the database (during office hour).

I expected to see below error message prior to 12c.

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:14
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run

However, this is repeated for each backup set while travelling all data files.

channel ORA_DISK_1: SID=244 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=251 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:14
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:14
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:14
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:14
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:14
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:15
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/04/2016 17:28:15
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_2 channel at 05/04/2016 17:28:15
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

Recovery Manager complete.


Good to see , it is getting simpler in 12c as shown below, just one word.

Starting backup at 2016-MAY-20 17:53:10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=368 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=250 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=366 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=131 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 05/20/2016 17:53:13
RMAN-06149: cannot BACKUP DATABASE in NOARCHIVELOG mode

Recovery Manager complete.


rman shell script but not connecting to recovery catalog

I have one RMAN backup script works fine , but when running for a 12c.1 database, it keeps showing me below in logfile

"using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name DEV"


And this the working fine shell function.


func_cold_db_backup() {
${ORACLE_HOME}/bin/rman target /  cmdfile='/oracle/UAT/ops/exec/cold_backup.rman' log=$logfile <>$logfile 2>&1
${ORACLE_HOME}/bin/rman target /   log=$logfile <>$logfile 2>&1
connect catalog rman/pwdxxxxx@RCAT
@/oracle/UAT/ops/exec/cold_backup.rman
EOF


When manually try the command , it works fine and shows me connected to RCAT.

${ORACLE_HOME}/bin/rman target /  catalog rman@RCAT
connected to target database: UAT (DBID=27281018)
connected to recovery catalog database


So the only difference is cmdfile parameter.

As such, I rewrite the function and works "better" now for this database.


func_cold_db_backup() {
${ORACLE_HOME}/bin/rman target /   log=$logfile <>$logfile 2>&1
connect catalog rman/pwdxxx@RCAT
@/oracle/UAT/ops/exec/cold_backup.rman
EOF

Friday, May 13, 2016

two ways to decommission a database backed up by RMAN

1. If follow proper procedure, backups should be deleted before unregistrating from recovery catalog

Either using with RMAN command "delete backup", or
during dropping database with "drop database including backups"

2. However, if we forget to follow above sequence, we still have manual way to achieve the same.

2.1  Manually delete backups from DISK, usually they should be under FRA.
2.2 Connect to catalog database without specifying target

     rman rman/password@RCAT

    > set dbid=
    > unregister database;



e.g.




> rman  catalog rman@RCAT

Recovery Manager: Release 11.2.0.3.0 - Production on Fri May 13 15:20:03 2016

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

recovery catalog database Password:
connected to recovery catalog database

RMAN> set dbid=649569281;

executing command: SET DBID
database name is "CTCG" and DBID is 649569281

RMAN> unregister database;

database name is "CTCG" and DBID is 649569281

Do you really want to unregister the database (enter YES or NO)? yes
database unregistered from the recovery catalog

RMAN> exit



double-quoted not accept in 10g rman, but not 11g

In my cold backup shell script, there is below line, which works fine in 11g.

A double quote inside single quote , to pass ORACLE_HOME path  to &1 of cold_backup.rman

${ORACLE_HOME}/bin/rman target /  cmdfile='./cold_backup.rman "/software/oraabc/product/11.2.0"' log=$logfile <>$logfile 2>&1
connect catalog rman/xxxxxx@RCAT1
EOF

But it is giving me below error , when running for 10g database.


Both single and double quotes (' or ") are accepted for a quoted-string.
Quotes are not required unless the string contains embedded white-space.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00552: syntax error in command line arguments
RMAN-01009: syntax error: found "double-quoted-string": expecting one of: "append, at, auxiliary, catalog, cmdfile, clone, checksyntax, debug, log, msglog, mask, msgno, nocatalog, pipe, rcvcat, script, slaxdebug, send, target, timeout, trace"
RMAN-01007: at line 0 column 52 file: command line arguments
Recovery Manager: Release 10.2.0.2.0 - Production on Wed May 11 15:57:27 2016

This is a funny finding.

Tuesday, May 10, 2016

NFS error in AIX when running RMAN backup to disk

channel ORA_DISK_1 disabled, job failed on it will be run on another channel
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_2 channel at 05/04/2016 21:01:22
ORA-19504: failed to create file "/dbfra/testdb11d/bbbb/BBBB/backupset/2016_05_04/o1_mf_nnndf_TAG20160504T210121_%u_.bkp"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 5
Additional information: 9


although the file system is presented in /etc/filesystems file.

/dbfra:
        dev             = "/dbfra"
        vfs             = nfs
        nodename        = 10.149.90.205
        mount           = true
        options         = bg,soft,intr,rsize=32768,wsize=32768,proto=tcp,sec=sys
        account         = false



resolved by add below parameter to pfile.

echo 'event="10298 trace name context forever, level 32"'  >>initBBBB.ora

Thursday, April 28, 2016

RMAN-06059: expected archived log not found

manually deleted some files, and when backup archived log files using RMAN,


Starting backup at 2016-APR-27 11:33:09
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=160 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=162 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 04/27/2016 11:33:29
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /cc014/oraarch/TESTDB/TESTDB_0001_761215983_43224.arc
ORA-27037: unable to obtain file status
HPUX-ia64 Error: 2: No such file or directory
Additional information: 3


issued ,

RMAN> crosscheck archivelog all;

released channel: ORA_DISK_1
released channel: ORA_DISK_2
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=303 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=160 device type=DISK
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57463.arc RECID=57445 STAMP=908551327
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57464.arc RECID=57446 STAMP=908551336
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57465.arc RECID=57447 STAMP=908551347
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57466.arc RECID=57448 STAMP=908551357
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57467.arc RECID=57449 STAMP=908551366
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57468.arc RECID=57450 STAMP=908551377
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57469.arc RECID=57451 STAMP=908551384
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57470.arc RECID=57452 STAMP=908551390
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57471.arc RECID=57453 STAMP=908551398
validation succeeded for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57472.arc RECID=57454 STAMP=908551404
...

archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47965.arc RECID=47947 STAMP=843054910
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47966.arc RECID=47948 STAMP=843054994
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47967.arc RECID=47949 STAMP=843058390
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47968.arc RECID=47950 STAMP=843058474
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47969.arc RECID=47951 STAMP=843058505
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47970.arc RECID=47952 STAMP=843058591
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47971.arc RECID=47953 STAMP=843062002
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47972.arc RECID=47954 STAMP=843062090
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47973.arc RECID=47955 STAMP=843062111
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47974.arc RECID=47956 STAMP=843062196
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47975.arc RECID=47957 STAMP=843065605
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47976.arc RECID=47958 STAMP=843065687
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47977.arc RECID=47959 STAMP=843065782
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_47978.arc RECID=47960 STAMP=843065802
validation failed for archived log

...
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57456.arc RECID=57438 STAMP=908491636
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57457.arc RECID=57439 STAMP=908500971
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57458.arc RECID=57440 STAMP=908502821
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57459.arc RECID=57441 STAMP=908506176
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57460.arc RECID=57442 STAMP=908508642
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57461.arc RECID=57443 STAMP=908521666
validation failed for archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57462.arc RECID=57444 STAMP=908538814
Crosschecked 14239 objects

For record type DELETED OBJECT RECIDS from 2 to 3 are re-used before resync


Now continue the backup for archived log files.


Wednesday, April 27, 2016

solutions for handling RMAN-08138

configured
"CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;  "


when

RMAN> delete noprompt archivelog until time 'sysdate-14';

starting full resync of recovery catalog
full resync complete
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=156 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=279 device type=DISK
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_43224.arc thread=1 sequence=43224
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_43225.arc thread=1 sequence=43225
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_43226.arc thread=1 sequence=43226
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_43227.arc thread=1 sequence=43227
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_43228.arc thread=1 sequence=43228
RMAN-08138: WARNING: archived log not deleted - must create more backups


We can also notice those archive log files are marked as X (expired).

457433  1    50363   X 2014-AUG-04 21:55:02
        Name: /cc014/oraarch/TESTDB/TESTDB_0001_761215983_50363.arc

457434  1    50364   X 2014-AUG-04 21:56:31
        Name: /cc014/oraarch/TESTDB/TESTDB_0001_761215983_50364.arc

457435  1    50365   X 2014-AUG-04 22:32:17
        Name: /cc014/oraarch/TESTDB/TESTDB_0001_761215983_50365.arc

457436  1    50366   X 2014-AUG-04 22:53:36
        Name: /cc014/oraarch/TESTDB/TESTDB_0001_761215983_50366.arc

457437  1    50367   X 2014-AUG-04 22:55:08
        Name: /cc014/oraarch/TESTDB/TESTDB_0001_761215983_50367.arc

457438  1    50368   X 2014-AUG-04 22:56:33
        Name: /cc014/oraarch/TESTDB/TESTDB_0001_761215983_50368.arc

457439  1    50369   X 2014-AUG-04 23:51:36


since those files are manually purged and no longer on disk, my workaround for this test database is to temporally clear the archivelog deletion policy.

CONFIGURE ARCHIVELOG DELETION POLICY CLEAR;


Then, re-execute the command again, which went through.

archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57460.arc RECID=57442 STAMP=908508642
deleted archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57461.arc RECID=57443 STAMP=908521666
deleted archived log
archived log file name=/cc014/oraarch/TESTDB/TESTDB_0001_761215983_57462.arc RECID=57444 STAMP=908538814
Deleted 14239 objects



Now , I can enable the deletion policy again.

CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;  



Believe below two methods also work which I googled.

http://oraclehariprasathdba.blogspot.sg/2013/02/how-to-force-oracle-rman-to-delete-all.html

delete force archivelog all;

http://oraclebyravi.blogspot.sg/2013/08/rman-08138-warning-archived-log-not.html

delete noprompt expired archivelog all;





Friday, April 22, 2016

Friday, April 15, 2016

Happened to issue "BACKUP filesperset 2 incremental level 1 DATABASE ;", without knowing that there is no LEVEL 0 backup has been created, for  a 11.2.0.3 EE database.  As we know , if there is no LEVEL 0 exists, the RMAN will automatically created the very first as LEVEL 0 backup.  This is a good feature.

However, based on my below investigation, this feature is not efficient.

While waiting and waiting, which didn't complete within my expect time.

Then I am interested to know what happened, as the time is 5x than what was taken for a fresh LEVEL 0 backup.

Furthermore investigation shows the backupset size is 5.7x times larger than a fresh LEVEL 0 backupset.


This is very surprising.  For this case, I learned it is better to have LEVEL 0 pre-created before running LEVEL 1.

Below are technical numbers.


--full backup size

testdbdev:TESTDB:/dbfra/testdbdev/TESTDB/backupset/2016_04_13> ls -lrt *T142516*
-rw-r-----   1 oratest   oratest   8839168 Apr 13 13:43 o1_mf_nnndf_TAG20160413T142516_cjvsldnj_.bkp
-rw-r-----   1 oratest   oratest   38264832 Apr 13 13:43 o1_mf_nnndf_TAG20160413T142516_cjvsw8k3_.bkp
-rw-r-----   1 oratest   oratest   8224768 Apr 13 13:45 o1_mf_nnndf_TAG20160413T142516_cjvsx1vn_.bkp
-rw-r-----   1 oratest   oratest   37568512 Apr 13 13:49 o1_mf_nnndf_TAG20160413T142516_cjvszfhs_.bkp
-rw-r-----   1 oratest   oratest   2370019328 Apr 13 13:55 o1_mf_nnndf_TAG20160413T142516_cjvsldo0_.bkp
-rw-r-----   1 oratest   oratest   2252800 Apr 13 13:56 o1_mf_nnndf_TAG20160413T142516_cjvtmrx9_.bkp
-rw-r-----   1 oratest   oratest   17235968 Apr 13 13:56 o1_mf_nnndf_TAG20160413T142516_cjvtnw8y_.bkp
-rw-r-----   1 oratest   oratest   18685952 Apr 13 13:57 o1_mf_nnndf_TAG20160413T142516_cjvtocmk_.bkp
-rw-r-----   1 oratest   oratest   1310720 Apr 13 13:57 o1_mf_nnndf_TAG20160413T142516_cjvtphbl_.bkp
-rw-r-----   1 oratest   oratest   2809856 Apr 13 13:58 o1_mf_nnndf_TAG20160413T142516_cjvtpyr6_.bkp
-rw-r-----   1 oratest   oratest   2097152 Apr 13 13:58 o1_mf_nnndf_TAG20160413T142516_cjvtrp7p_.bkp
-rw-r-----   1 oratest   oratest   1105920 Apr 13 13:58 o1_mf_nnndf_TAG20160413T142516_cjvtrxhf_.bkp
-rw-r-----   1 oratest   oratest   1753088 Apr 13 13:58 o1_mf_nnndf_TAG20160413T142516_cjvts0wr_.bkp
-rw-r-----   1 oratest   oratest   12312576 Apr 13 13:58 o1_mf_nnndf_TAG20160413T142516_cjvts2b7_.bkp
-rw-r-----   1 oratest   oratest   380239872 Apr 13 14:01 o1_mf_nnndf_TAG20160413T142516_cjvts9w8_.bkp
-rw-r-----   1 oratest   oratest   1277952 Apr 13 14:01 o1_mf_nnndf_TAG20160413T142516_cjvtyh70_.bkp
-rw-r-----   1 oratest   oratest   1114112 Apr 13 14:01 o1_mf_nnndf_TAG20160413T142516_cjvtypkv_.bkp
-rw-r-----   1 oratest   oratest   24395776 Apr 13 14:02 o1_mf_nnndf_TAG20160413T142516_cjvtyqxp_.bkp
-rw-r-----   1 oratest   oratest   2891776 Apr 13 14:02 o1_mf_nnndf_TAG20160413T142516_cjvtzkfw_.bkp
-rw-r-----   1 oratest   oratest   1130496 Apr 13 14:02 o1_mf_nnndf_TAG20160413T142516_cjvtzrlc_.bkp
-rw-r-----   1 oratest   oratest   2410258432 Apr 13 14:03 o1_mf_nnndf_TAG20160413T142516_cjvt6s11_.bkp

testdbdev:TESTDB:/dbfra/testdbdev/TESTDB/backupset/2016_04_13> ls -lrt *T142516* |wc -l
      21


testdbdev:TESTDB:/dbfra/testdbdev/TESTDB/backupset/2016_04_13> ls -lrt *T142516* |awk '{ sum += $5 } END { print sum }'
5343789056

It is about 5.3GB.


--this is the level 0 created by very first level 1

testdbdev:TESTDB:/dbfra/testdbdev/TESTDB/backupset/2016_04_13> ls -lrt *T150822*
-rw-r-----   1 oratest   oratest   9838592 Apr 13 14:27 o1_mf_nnnd1_TAG20160413T150822_cjvw37f7_.bkp
-rw-r-----   1 oratest   oratest   10159611904 Apr 13 15:41 o1_mf_nnnd1_TAG20160413T150822_cjvw37f2_.bkp
-rw-r-----   1 oratest   oratest   8804286464 Apr 13 15:41 o1_mf_nnnd1_TAG20160413T150822_cjvwgz4w_.bkp
-rw-r-----   1 oratest   oratest   403144704 Apr 13 15:49 o1_mf_nnnd1_TAG20160413T150822_cjw0swgl_.bkp
-rw-r-----   1 oratest   oratest   3922280448 Apr 13 16:11 o1_mf_nnnd1_TAG20160413T150822_cjw0s379_.bkp
-rw-r-----   1 oratest   oratest   1470185472 Apr 13 16:23 o1_mf_nnnd1_TAG20160413T150822_cjw2l7bw_.bkp
-rw-r-----   1 oratest   oratest   4727996416 Apr 13 16:23 o1_mf_nnnd1_TAG20160413T150822_cjw18rk1_.bkp
-rw-r-----   1 oratest   oratest   234045440 Apr 13 16:24 o1_mf_nnnd0_TAG20160413T150822_cjw38mvs_.bkp
-rw-r-----   1 oratest   oratest   1351680 Apr 13 16:25 o1_mf_nnnd1_TAG20160413T150822_cjw3c67g_.bkp
-rw-r-----   1 oratest   oratest   2703360 Apr 13 16:26 o1_mf_nnnd1_TAG20160413T150822_cjw3dxqy_.bkp
-rw-r-----   1 oratest   oratest   2056192 Apr 13 16:27 o1_mf_nnnd1_TAG20160413T150822_cjw3gofy_.bkp
-rw-r-----   1 oratest   oratest   2482176 Apr 13 16:27 o1_mf_nnnd1_TAG20160413T150822_cjw3j2co_.bkp
-rw-r-----   1 oratest   oratest   16982016 Apr 13 16:28 o1_mf_nnnd1_TAG20160413T150822_cjw3jkmp_.bkp
-rw-r-----   1 oratest   oratest   527409152 Apr 13 16:28 o1_mf_nnnd1_TAG20160413T150822_cjw38tpx_.bkp
-rw-r-----   1 oratest   oratest   16621568 Apr 13 16:28 o1_mf_nnnd1_TAG20160413T150822_cjw3kbwl_.bkp
-rw-r-----   1 oratest   oratest   27369472 Apr 13 16:28 o1_mf_nnnd1_TAG20160413T150822_cjw3klhk_.bkp
-rw-r-----   1 oratest   oratest   1302528 Apr 13 16:28 o1_mf_nnnd1_TAG20160413T150822_cjw3l2fo_.bkp
-rw-r-----   1 oratest   oratest   1114112 Apr 13 16:29 o1_mf_nnnd1_TAG20160413T150822_cjw3lk6v_.bkp
-rw-r-----   1 oratest   oratest   2875392 Apr 13 16:29 o1_mf_nnnd1_TAG20160413T150822_cjw3m43h_.bkp
-rw-r-----   1 oratest   oratest   1081344 Apr 13 16:29 o1_mf_nnnd1_TAG20160413T150822_cjw3mmb2_.bkp
-rw-r-----   1 oratest   oratest   141950976 Apr 13 16:29 o1_mf_nnnd0_TAG20160413T150822_cjw3lnyk_.bkp

testdbdev:TESTDB:/dbfra/testdbdev/TESTDB/backupset/2016_04_13> ls -lrt *T150822* |wc -l
      21

testdbdev:TESTDB:/dbfra/testdbdev/TESTDB/backupset/2016_04_13> ls -lrt *T150822* | awk '{ sum += $5 } END { print sum }'
30476689408


The size is about 30GB. 
Duration for this run is about 102 minutes.



-- run a level 0 backup using command "BACKUP filesperset 2 incremental level 0 DATABASE ;"


testdb01:EDWD:/dbfra/testdb01/EDWD/backupset/2016_04_13> ls -lrt *T173009* |wc -l
      21
testdb01:EDWD:/dbfra/testdb01/EDWD/backupset/2016_04_13> ls -lrt *T173009*
-rw-r-----   1 oratest   oratest   38264832 Apr 13 16:43 o1_mf_nnnd0_TAG20160413T173009_cjw4f3hk_.bkp
-rw-r-----   1 oratest   oratest   8224768 Apr 13 16:45 o1_mf_nnnd0_TAG20160413T173009_cjw4f3t3_.bkp
-rw-r-----   1 oratest   oratest   2203648 Apr 13 16:45 o1_mf_nnnd0_TAG20160413T173009_cjw4jx5z_.bkp
-rw-r-----   1 oratest   oratest   17235968 Apr 13 16:46 o1_mf_nnnd0_TAG20160413T173009_cjw4l0xx_.bkp
-rw-r-----   1 oratest   oratest   18685952 Apr 13 16:46 o1_mf_nnnd0_TAG20160413T173009_cjw4ltlb_.bkp
-rw-r-----   1 oratest   oratest   1310720 Apr 13 16:47 o1_mf_nnnd0_TAG20160413T173009_cjw4n8d9_.bkp
-rw-r-----   1 oratest   oratest   2809856 Apr 13 16:48 o1_mf_nnnd0_TAG20160413T173009_cjw4ooqv_.bkp
-rw-r-----   1 oratest   oratest   2097152 Apr 13 16:48 o1_mf_nnnd0_TAG20160413T173009_cjw4qfgm_.bkp
-rw-r-----   1 oratest   oratest   1105920 Apr 13 16:48 o1_mf_nnnd0_TAG20160413T173009_cjw4qwvk_.bkp
-rw-r-----   1 oratest   oratest   1753088 Apr 13 16:48 o1_mf_nnnd0_TAG20160413T173009_cjw4r4jj_.bkp
-rw-r-----   1 oratest   oratest   12312576 Apr 13 16:49 o1_mf_nnnd0_TAG20160413T173009_cjw4r7wf_.bkp
-rw-r-----   1 oratest   oratest   8839168 Apr 13 16:50 o1_mf_nnnd0_TAG20160413T173009_cjw4f37p_.bkp
-rw-r-----   1 oratest   oratest   37568512 Apr 13 16:51 o1_mf_nnnd0_TAG20160413T173009_cjw4f4d1_.bkp
-rw-r-----   1 oratest   oratest   1114112 Apr 13 16:51 o1_mf_nnnd0_TAG20160413T173009_cjw4w1t9_.bkp
-rw-r-----   1 oratest   oratest   1277952 Apr 13 16:51 o1_mf_nnnd0_TAG20160413T173009_cjw4w1bb_.bkp
-rw-r-----   1 oratest   oratest   2891776 Apr 13 16:51 o1_mf_nnnd0_TAG20160413T173009_cjw4wc9q_.bkp
-rw-r-----   1 oratest   oratest   1130496 Apr 13 16:51 o1_mf_nnnd0_TAG20160413T173009_cjw4wlqb_.bkp
-rw-r-----   1 oratest   oratest   24395776 Apr 13 16:51 o1_mf_nnnd0_TAG20160413T173009_cjw4w3l3_.bkp
-rw-r-----   1 oratest   oratest   380403712 Apr 13 16:52 o1_mf_nnnd0_TAG20160413T173009_cjw4rqrp_.bkp
-rw-r-----   1 oratest   oratest   2410258432 Apr 13 17:02 o1_mf_nnnd0_TAG20160413T173009_cjw4gvf8_.bkp
-rw-r-----   1 oratest   oratest   2370019328 Apr 13 17:04 o1_mf_nnnd0_TAG20160413T173009_cjw4f38v_.bkp
testdb01:EDWD:/dbfra/testdb01/EDWD/backupset/2016_04_13> ls -lrt *T173009* | awk '{ sum += $5 } END { print sum }'
5343903744


The size is 5.3GB. The duration is about 22 minutes.





I have tested twice for this finding to support my conclusion.  Interesting and can someone explains? Thanks.

12c multitenant database backupset location

Organize  a chart based on below full list of backup information.



Note that if BACKUP OPTIMIZATION is turned on , the seeds files then are backed up once only.


Appendix




RMAN> list backupset;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
133     Full    4.34M      DISK        00:00:02     2016-APR-12 10:06:04
        BP Key: 133   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp0bls_.bkp
  List of Datafiles in backup set 133
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  5       Full 4542086    2016-APR-12 10:06:02 /rman001/oradata/RCATT/undotbs01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
134     Full    189.24M    DISK        00:00:57     2016-APR-12 10:07:02
        BP Key: 134   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp0ftk_.bkp
  List of Datafiles in backup set 134
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  1       Full 4542088    2016-APR-12 10:06:05 /rman001/oradata/RCATT/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
135     Full    200.26M    DISK        00:01:08     2016-APR-12 10:07:10
        BP Key: 135   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp0blb_.bkp
  List of Datafiles in backup set 135
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  3       Full 4542084    2016-APR-12 10:06:02 /rman001/oradata/RCATT/sysaux01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
136     Full    102.60M    DISK        00:00:34     2016-APR-12 10:07:45
        BP Key: 136   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D960D0F8745635EE05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp2hj0_.bkp
  List of Datafiles in backup set 136
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  4       Full 2043027    2016-MAR-09 14:26:29 /rman001/oradata/RCATT/pdbseed/sysaux01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
137     Full    110.38M    DISK        00:00:37     2016-APR-12 10:07:48
        BP Key: 137   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp2h52_.bkp
  List of Datafiles in backup set 137
  Container ID: 3, PDB Name: RCATPDB1
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  8       Full 4542112    2016-APR-12 10:07:11 /rman001/oradata/RCATT/RCATPDB1/sysaux01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
138     Full    47.09M     DISK        00:00:16     2016-APR-12 10:08:02
        BP Key: 138   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp3lw2_.bkp
  List of Datafiles in backup set 138
  Container ID: 3, PDB Name: RCATPDB1
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  7       Full 4542130    2016-APR-12 10:07:46 /rman001/oradata/RCATT/RCATPDB1/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
139     Full    43.30M     DISK        00:00:14     2016-APR-12 10:08:04
        BP Key: 139   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D960D0F8745635EE05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp3p2s_.bkp
  List of Datafiles in backup set 139
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  2       Full 2043027    2016-MAR-09 14:26:29 /rman001/oradata/RCATT/pdbseed/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
140     Full    1.06M      DISK        00:00:00     2016-APR-12 10:08:05
        BP Key: 140   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp45tc_.bkp
  List of Datafiles in backup set 140
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  6       Full 4542138    2016-APR-12 10:08:05 /rman001/oradata/RCATT/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
141     Full    9.34M      DISK        00:00:03     2016-APR-12 10:08:08
        BP Key: 141   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp45cf_.bkp
  List of Datafiles in backup set 141
  Container ID: 3, PDB Name: RCATPDB1
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  9       Full 4542137    2016-APR-12 10:08:05 /rman001/oradata/RCATT/RCATPDB1/RCATPDB1_users01.dbf

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ --------------------
143     2.50K      DISK        00:00:00     2016-APR-12 10:08:11
        BP Key: 143   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100811
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_annnn_TAG20160412T100811_cjrp4cmh_.bkp

  List of Archived Logs in backup set 143
  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time
  ---- ------- ---------- -------------------- ---------- ---------
  1    442     4542164    2016-APR-12 10:08:10 4542172    2016-APR-12 10:08:11

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ --------------------
144     1.70M      DISK        00:00:00     2016-APR-12 10:08:11
        BP Key: 144   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100811
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_annnn_TAG20160412T100811_cjrp4cl8_.bkp

  List of Archived Logs in backup set 144
  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time
  ---- ------- ---------- -------------------- ---------- ---------
  1    441     4541226    2016-APR-12 09:56:17 4542164    2016-APR-12 10:08:10

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
145     Full    17.30M     DISK        00:00:01     2016-APR-12 10:08:13
        BP Key: 145   Status: AVAILABLE  Compressed: NO  Tag: TAG20160412T100812
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/autobackup/2016_04_12/o1_mf_s_908964492_cjrp4f6j_.bkp
  SPFILE Included: Modification time: 2016-APR-09 07:07:00
  SPFILE db_unique_name: RCATT
  Control File Included: Ckp SCN: 4542190      Ckp time: 2016-APR-12 10:08:12

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