I see a different output or behaviour of RMAN 'backup database' command using "format keyword" when I keep the part of the syntax once in the middle and the other in the end it stores backup at different location as mentioned in the below cases
In the below case 1 - I used the format keyword in the middle and it saves the backupsets in the defined location, however if I use the same command with format keyword in the end it stores the backup pieces in ORACLE_HOME/dbs location. Not sure, why it does that. Any ideas would be really appreciable.
Note : - FRA parameters are not enabled as earlier it was storing the backup pieces to FRA location while using case2.
Case 1 : - Using the format keyword in the middle.
RMAN> backup format '/o/export/export/cold_test/backup_%U_%u_%t_%d' incremental level 0 database plus archivelog ;
Starting backup at 04-FEB-19
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=283 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=16 RECID=16 STAMP=999351604
input archived log thread=1 sequence=17 RECID=17 STAMP=999351609
input archived log thread=1 sequence=18 RECID=18 STAMP=999351923
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1stp1pjj_1_1_1stp1pjj_999351923_TEST tag=TAG20190204T134523 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19
Starting backup at 04-FEB-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA_01/TEST/DATAFILE/tnext_indx.dbf
input datafile file number=00005 name=+DATA_01/TEST/DATAFILE/tnext_data.dbf
input datafile file number=00007 name=+DATA_01/TEST/DATAFILE/tnext_data02.dbf
input datafile file number=00008 name=+DATA_01/TEST/DATAFILE/tnext_data03.dbf
input datafile file number=00003 name=+DATA_01/TEST/DATAFILE/sysaux.dbf
input datafile file number=00001 name=+DATA_01/TEST/DATAFILE/system.dbf
input datafile file number=00004 name=+DATA_01/TEST/DATAFILE/undotbs1.dbf
input datafile file number=00006 name=+DATA_01/TEST/DATAFILE/users.dbf
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1ttp1pjk_1_1_1ttp1pjk_999351924_TEST tag=TAG20190204T134524 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental level 0 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 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1utp1pjr_1_1_1utp1pjr_999351931_TEST tag=TAG20190204T134524 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19
Starting backup at 04-FEB-19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=19 RECID=19 STAMP=999351933
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1vtp1pjt_1_1_1vtp1pjt_999351933_TEST tag=TAG20190204T134533 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19
RMAN>
Case 2: Using the format keyword in the end of the backup command.
RMAN> backup incremental level 0 database plus archivelog format '/o/export/export/cold_test/backup_%U_%u_%t_%d' ;
Starting backup at 04-FEB-19
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=283 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=16 RECID=16 STAMP=999351604
input archived log thread=1 sequence=17 RECID=17 STAMP=999351609
input archived log thread=1 sequence=18 RECID=18 STAMP=999351923
input archived log thread=1 sequence=19 RECID=19 STAMP=999351933
input archived log thread=1 sequence=20 RECID=20 STAMP=999352079
input archived log thread=1 sequence=21 RECID=21 STAMP=999352087
input archived log thread=1 sequence=22 RECID=22 STAMP=999358913
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_29tp20e1_1_1_29tp20e1_999358913_TEST tag=TAG20190204T154153 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19
Starting backup at 04-FEB-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA_01/TEST/DATAFILE/tnext_indx.dbf
input datafile file number=00005 name=+DATA_01/TEST/DATAFILE/tnext_data.dbf
input datafile file number=00007 name=+DATA_01/TEST/DATAFILE/tnext_data02.dbf
input datafile file number=00008 name=+DATA_01/TEST/DATAFILE/tnext_data03.dbf
input datafile file number=00003 name=+DATA_01/TEST/DATAFILE/sysaux.dbf
input datafile file number=00001 name=+DATA_01/TEST/DATAFILE/system.dbf
input datafile file number=00004 name=+DATA_01/TEST/DATAFILE/undotbs1.dbf
input datafile file number=00006 name=+DATA_01/TEST/DATAFILE/users.dbf
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/oracle/DB12102/dbs/2atp20e2_1_1 tag=TAG20190204T154154 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental level 0 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 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/oracle/DB12102/dbs/2btp20e6_1_1 tag=TAG20190204T154154 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19
Starting backup at 04-FEB-19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=23 RECID=23 STAMP=999358920
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_2ctp20e8_1_1_2ctp20e8_999358920_TEST tag=TAG20190204T154200 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19
RMAN>
Thanks,
DBA
The backup command contains two keys file formats. The first key format defines the location and format of the backup file for the database itself, the second key format defines the location and format of the backup file for archive logs.
RMAN> backup format '/o/export/export/cold_test/backup_%U_%u_%t_%d' incremental level 0 database plus archivelog format '/o/export/export/cold_test/backup_%U_%u_%t_%d' ;
Related
i have a rman bash script which works when i execute it (./backup.sh).
but when i use cronjob, it doesn't work.
My scripts is as follows
backup.sh
rman target / #backup.rcv log=rman.log
backup.rcv
backup format '/backup/rman/backup/%U.arch.rman' filesperset 2 archivelog all delete input; backup format '/backup/rman/backup/%U.datafiles.rman' filesperset 2 incremental level 0 database; backup format '/backup/rman/backup/%U.arch.rman' filesperset 2 archivelog all delete input; backup format '/backup/rman/backup/%U.ctl.rman' current controlfile; delete noprompt obsolete;
my cronjob looks somthing like this
crontab -l
5 0 * * * /nas_backup/rman/svbo/backup/L0backup.sh >/dev/null 2>&1
i am very new to this rman and bash script so any help would be appreciated
inorder for this to be fixed replace the code in your "L0backup.sh"
with
#!/bin/bash
#
export ORACLE_SID=your-sid
export ORACLE_HOME=your-oracle-home
$ORACLE_HOME/bin/rman target / nocatalog <<EOF
backup format '/nas_backup/rman/backup/%U.arch.rman' filesperset 2 archivelog all delete input;
backup format '/nas_backup/rman/backup/%U.datafiles.rman' filesperset 2 incremental level 0 database;
backup format '/nas_backup/rman/backup/%U.arch.rman' filesperset 2 archivelog all delete input;
backup format '/nas_backup/rman/backup/%U.ctl.rman' current controlfile;
delete noprompt obsolete;
EOF
to get your ORACLE_SID and ORACLE_HOME
you can echo it out like
#echo $ORACLE_SID
your-sid
# echo $ORACLE_HOME
your-oracle-home
next to set your crontab - lets say you want the above file to run every midnight (Crontab Guru)
#crontab -e
5 0 * * * /bin/bash /nas_backup/rman/backup/L0backup.sh > /nas_backup/rman/backup/rman.log 2>&1
if you notice your output gets loged to "rman.log".
furthermore you can now delete your "backup.rcv" file as its no longer being used.
Step 01. Create a backup script with the following content (modified it as your desire)
#!/bin/sh
#
# Run as: oracle
#
export ORACLE_SID=orcl
export ORACLE_HOME=/oradb/oraclebase/dbhome
rman target / << EOI
# Allocating channels (should equal number of physical CPU #lscpu)
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH2 DEVICE TYPE DISK;
# change into the highest rate compression - required license
CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD FALSE;
# validate physical existence of backupset & copy
CROSSCHECK BACKUPSET;
CROSSCHECK COPY;
# removing metadata of "EXPIRED" info from the catalog
DELETE NOPROMPT EXPIRED BACKUPSET;
DELETE NOPROMPT EXPIRED COPY;
# Backup full database (incremental level 0) on Sunday
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 0 DATABASE FORMAT '/backup/%d_full_level_0_%U.bak';
#incremental level 1 on the other days not Sunday
#enabling block change tracking if you want level 1 goes fast
#BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 1 DATABASE FORMAT '/backup/%d_full_level_1_%U.bak';
# Backup archivelog log
BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL DELETE INPUT FORMAT '/backup/%_ARCHIVE_%U.bak';;
# Clean obsolete backups depending on setting of retention policy
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
DELETE NOPROMPT OBSOLETE;
# Allocated channel will release automatically ;)
exit
EOI
exit
Step 02: Change owner & permission
Step 03: Set crontab job for that script.
I have been trying to take backup of database by using following script.
But it is unable to finish (complete) backup.
It is only initiating the backup but I can't see it at a particular location.
==========================================================
SCRIPT
==========================================================
#!/bin/sh
rman_bkp()
{
# RMAN Backup
echo "test "$2 $1"
echo "Backup in progres.."
{
rman << ZZ
connect target /
run
{
configure default device type to disk;
configure device type disk parallelism 4;
configure device type disk backup type to compressed backupset;
configure controlfile autobackup format for device type disk to '$1/%F.ctl';
allocate channel c1 device type disk format '$1/d_%s_%p_%T' MAXPIECESIZE 10G;
allocate channel c2 device type disk format '$1/d_%s_%p_%T' MAXPIECESIZE 10G;
allocate channel c3 device type disk format '$1/d_%s_%p_%T' MAXPIECESIZE 10G;
allocate channel c4 device type disk format '$1/d_%s_%p_%T' MAXPIECESIZE 10G;
allocate channel c5 device type disk format '$1/d_%s_%p_%T' MAXPIECESIZE 10G;
backup as compressed backupset full database;
backup current controlfile;
BACKUP ARCHIVELOG ALL DELETE INPUT;
}
crosscheck backup;
delete noprompt obselete;
delete noprompt expired backup;
ZZ
} > $2
}
backup()
{
echo
BKPDIR="/u01/apex/APEXDB/BACKUPS/$BKP_TYPE"
LOGFILE="/u01/apex/APEXDB/BACKUPS/logs/RMAN_${BKP_TYPE}_$DATE.log"
echo $BKPDIR
rman_bkp $BKPDIR $LOGFILE
}
echo
echo "Initiating Backup at "`date`
echo
DATE=`date +%d%m%I%M`
echo "Initiating Apex Database backup"
BKP_TYPE="FULL_DB"
backup $BKP_TYPE
echo
echo "Completed Backup at "`date`
echo
============================================================
ERROR
============================================================
sh rman_backup.sh
Initiating Backup at Fri Feb 1 11:36:09 IST 2019
Initiating Apex Database backup
/u01/apex/APEXDB/BACKUPS/FULL_DB
test /u01/apex/APEXDB/BACKUPS/logs/RMAN_FULL_DB_01021136.log /u01/apex/APEXDB/BACKUPS/FULL_DB
Backup in progres..
rman_backup.sh: line 9: rman: command not found
Completed Backup at Fri Feb 1 11:36:09 IST 2019
I would be thankful if I get proper explanation of the script along with the errors & it's solution .
We have our oracle instance running on windows server & when configured RMAN to take the backups we are seeing following error in the logs,
Error Details:
channel ch1: starting piece 1 at 07-MAY-17
channel ch1: finished piece 1 at 07-MAY-17
piece handle=\\backup_share\FULL_db01_20170507.BAK tag=COMPLETE_BACKUP comment=NONE
channel ch1: backup set complete, elapsed time: 02:10:37
channel ch1: starting incremental level 0 datafile backup set
channel ch1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ch1: starting piece 1 at 07-MAY-17
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ch1 channel at 05/07/2017 23:10:45
ORA-19504: failed to create file "\\backup_share\FULL_db01_20170507.BAK"
ORA-27038: created file already exists
OSD-04010: <create> option specified, file already exists
RMAN Command Script:
run{
Allocate channel ch1 type disk format '\\backup_share\full_%d_%T.bak';
Backup incremental level=0 database tag='complete_backup';
Release channel ch1;
Allocate channel t1 type disk format '\\backup_share\ctrl_%d_%T';
Backup current controlfile;
Release channel t1;
}
I see same kind of logging when trying to take incremental backups. Could someone help me with this issue?
[oracle#orcluat ~]$ oerr ora 27038
27038, 00000, "created file already exists"
// *Cause: trying to create a database file, but file by that name already
// exists
// *Action: verify that name is correct, specify reuse if necessary
%d format specifies the name of the database and %T specifies the year, month, and day in the Gregorian calendar in this format: YYYYMMDD. It is also being reflected in your backup file name, FULL_db01_20170507.BAK. There might have files with the same name.
Better to use %U in your file name format which specifies a system-generated unique filename.
Documentation:
formatSpec
I have an oracle database which has problems preventing it from opening.
To overcome the issues, I tried following steps:
First I mounted database:
SQL> startup mount;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 1.2560E+10 bytes
Fixed Size 2171344 bytes
Variable Size 6878662192 bytes
Database Buffers 5670699008 bytes
Redo Buffers 8601600 bytes
Database mounted.
After that, I recovered database as below:
SQL> recover database until cancel;
ORA-00279: change 338584095 generated at 11/22/2016 08:41:55 needed for thread 1
ORA-00289: suggestion : /oracle/app/product/11g/db/dbs/arch1_9218_833801667.dbf
ORA-00280: change 338584095 for thread 1 is in sequence #9218
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oracle/app/oradata/ora11g/system01.dbf'
ORA-01112: media recovery not started
After this I tried to alter open database as below:
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oracle/app/oradata/ora11g/system01.dbf'
and finally I tried recovering system01 datafile as below:
SQL> recover datafile 1;
ORA-00283: recovery session canceled due to errors
ORA-00314: log 2 of thread 1, expected sequence# 9218 doesn't match 9215
ORA-00312: online log 2 thread 1: '/oracle/app/oradata/ora11g/redo02.log'
as you can see in the final error "ORA-00314: log 2 of thread 1, expected sequence# 9218 doesn't match 9215" there is a sequence mismatch between the logfile redo02.log and the server.
How can this mismatch occur and what can I do to fix this?
PS: Since database cannot be opened, I cannot switch logfile and since redo02.log is the current logfile, I cannot drop or clean it.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- ------------------
1 1 0 52428800 1 NO UNUSED
338564041 22-NOV-16
3 1 0 52428800 1 NO UNUSED
338544000 22-NOV-16
2 1 9218 52428800 1 NO CURRENT
338584094 22-NOV-16
When I arrived at the office this morning, our Oracle 10.2 server was out of disk space. On closer inspection I found that about 1 to 4 or more .dbf files are generated once a minute (e.g. 1_1278092_658232789.dbf, 1_1278093_658232789.dbf, etc.). I created a bit of space, but Oracle still creates these files without deleting the old ones. It seems to have started about 35 hours ago. How do I restore the server to normal. Please note that I am not an Oracle DBA and have limited Oracle knowledge.
Edit 1:
First, I manage to clear about 270GB of space with the following, which allowed the server to keep running:
RMAN> CROSSCHECK BACKUP;
RMAN> DELETE ARCHIVELOG ALL;
To answer ora-600's questions:
In which path does Oracle create those files?
/home/oracle/archive/
(which is also the value of log_archive_dest_1)
DB_CREATE_FILE_DEST (parameter for datafiles)
This does not seem to have been set ("show parameter DB_CREATE_FILE_DEST" shows no value), but the database files are in
/home/oracle/app/oracle/product/oradata/irs3
DB_RECOVERY_FILE_DEST (parameter for FRA) -- which sub directory?
sys#iris > show parameter DB_RECOVERY_FILE_DEST
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /home/backup
db_recovery_file_dest_size big integer 2500G
I suspect that these are flashback logs. If so you should limit the flash recovery area (FRA) by setting the parameter DB_RECOVERY_FILE_DEST_SIZE to a smaller value. Oracle keeps writing flashback logs until the FRA is out of space... then it stats removing/overwriting old files.
Wel, the previous DBA did set this to a very high value and now it is full. E.g. look at:
sys#iris > SELECT NAME, (SPACE_LIMIT/1024/1024) || 'MB' AS SPACE_LIMIT,
((SPACE_LIMIT - SPACE_USED + SPACE_RECLAIMABLE)/1024/1024) || 'MB' AS SPACE_AVAILABLE,
ROUND((SPACE_USED - SPACE_RECLAIMABLE)/SPACE_LIMIT * 100, 1)
AS PERCENT_FULL
FROM V$RECOVERY_FILE_DEST;
NAME SPACE_LIMIT SPACE_AVAILABLE PERCENT_FULL
/home/backup 2560000MB 940MB 100
But RMAN now spits errors like these in its log files:
....
input archive log thread=1 sequence=1278543 recid=1271197 stamp=866048159
input archive log thread=1 sequence=1278544 recid=1271198 stamp=866048232
channel ORA_DISK_1: starting piece 1 at 11-DEC-14
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/11/2014 22:07:20
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 2691888128 bytes disk space from 2684354560000 limit
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=1278907 recid=1271561 stamp=866062135
....
Even though there is space on the drive:
-bash-3.2$ df -h
Filesystem Size Used Avail Use% Mounted on
....
/dev/vg01/lvol1 684G 365G 317G 54% /home
Why does the query above give the space as full, even though there are space available on the drive?
Below is more info, if needed.
Thanks.
Nico
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/backup/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
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 ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/app/oracle/product/10/dbs/snapcf_irs3.f'; # default
Thanks for the details that helps to identify the problem.
I think you have 2 problems.
1st problem is the database keeps creating theese small .dbf files. This is not a problem but the files need to be dealt with correctly. These files are called "archivelogs". When a database is in archivelog mode (required for online backup) it creates a copy of a redolog every time is full. During your daily backup you should backup and delete archivelogs.
2nd problem lots of reclaimable space in the FRA.
The FRA has a logical limit which is expressed by DB_RECOVERY_FILE_DEST_SIZE. When oracle creates a file in the FRA it is registered in the controlfile as well. This means you have to delete files from the FRA always with rman. I think you know this since you deleted archivelogs with rman and not with "rm -f".
Your query showed 100% as a result of: (SPACE_USED - SPACE_RECLAIMABLE)/SPACE_LIMIT * 100
This means all files in the FRA are reclaimable. They might don't even exist physically what means they are expired. 2nd option is they exist but they are obsolete according to the "RETENTION POLICY TO REDUNDANCY 1" rule.
Solution:
I think you should adjust the backup concept a bit.
a) First of all run the following rman commands:
crosscheck archivelog all;
crosscheck backup;
delete noprompt expired archivelog all;
delete noprompt expired backup;
delete obsolete;
b) Configure the parameter DB_RECOVERY_FILE_DEST_SIZE to an appropriate value. It depends on how many databases you have on the server and how much space is used from the /home directory for other stuff. I would say choose a value between 300GB and 600GB.
c) Adjust the backup scripts:
RMAN should run the commands mentioned in a) in the daily backup job.
With this setup you never should have much reclaimable space in the FRA (except you enabled flashback functionality -- check with "select flashback_on from v$database;").
Maybe you have to adjust some of the following commands but this is a default rman script which includes self cleaning:
crosscheck archivelog all;
backup database;
backup archivelog all delete input;
crosscheck backup;
delete noprompt expired archivelog all;
delete noprompt expired backup;
delete obsolete;
This backup script cleans up expired entries from the controlfile, backs up archivelogs + deletes them and deletes old backups which are no longer needed.
To tell rman which backups are no longer needed configure the RETENTION POLICY. I prefer a recovery window than redundancy:
RMAN> CONFIGURE RETENTION POLICY TO recovery window of 2 days;
In which path does Oracle create those files?
- DB_CREATE_FILE_DEST (parameter for datafiles)
- DB_RECOVERY_FILE_DEST (parameter for FRA)
-- which sub directory?
I suspect that these are flashback logs. If so you should limit the flash recovery area (FRA) by setting the parameter DB_RECOVERY_FILE_DEST_SIZE to a smaller value. Oracle keeps writing flashback logs until the FRA is out of space... then it stats removing/overwriting old files.