Showing posts with label BACKUP/RECOVERY. Show all posts
Showing posts with label BACKUP/RECOVERY. Show all posts

Tuesday, March 15, 2022

RMAN Error : ORA-19809: limit exceeded for recovery files, ORA-19804: cannot reclaim

 
RMAN Error : ORA-19809: limit exceeded for recovery files, ORA-19804: cannot reclaim



channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/11/2022 09:46:38

ORA-19809: limit exceeded for recovery files

ORA-19804: cannot reclaim 27108864 bytes disk space from 41474836 limit



Possible Solutions :


  • Check backup retention in RMAN configuration 
  • check FRA size  : DB_RECOVERY_FILE_DEST_SIZE 
  • crosscheck backup/archive and delete 

Tuesday, March 10, 2020

How to change DBID in Oracle Databases

Changing the DBID in Oracle Databases
============================================

Afer clone the database, the DB ID remains same as like the source database.
if we need to change it to the different DB ID, then use change the dbid using NID Utility .
once DBID chnaged  of the database all previous backups will become unusable and we must open the database with RESETLOGS option.
Once you change the DBID make sure you take database backup immediatly

Step 1 : Find out current dbid

SQL> select dbid,name from v$database;

      DBID NAME
---------- ---------
2332864271 TEST

SQL>


Step 2 : Shutdown database

SQL>
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Step 3 : start database in mount stage.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1620115456 bytes
Fixed Size                  2253704 bytes
Variable Size             989858936 bytes
Database Buffers          620756992 bytes
Redo Buffers                7245824 bytes
Database mounted.
SQL>


Step 4 : Now change the dbid using NID Utility.

[oracle@localhost ~]$ which nid
/u01/app/oracle/product/11.2.0/dbhome_1/bin/nid
[oracle@localhost ~]$


[oracle@localhost admin]$ sqlplus sys/sys@test as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Mar 10 22:01:18 2020

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> select dbid,name from v$database;

      DBID NAME
---------- ---------
2332864271 TEST

SQL>

nid target=sys/sys@test

[oracle@localhost admin]$ nid target=sys/sys@test

DBNEWID: Release 11.2.0.4.0 - Production on Tue Mar 10 22:02:50 2020

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

Connected to database TEST (DBID=2332864271)

Connected to server version 11.2.0

Control Files in database:
    /u01/app/oracle/oradata/test/control01.ctl
    /u01/app/oracle/fast_recovery_area/test/control02.ctl

Change database ID of database TEST? (Y/[N]) => Y

Proceeding with operation
Changing database ID from 2332864271 to 2332867595
    Control File /u01/app/oracle/oradata/test/control01.ctl - modified
    Control File /u01/app/oracle/fast_recovery_area/test/control02.ctl - modified
    Datafile /u01/app/oracle/oradata/test/system01.db - dbid changed
    Datafile /u01/app/oracle/oradata/test/sysaux01.db - dbid changed
    Datafile /u01/app/oracle/oradata/test/undotbs01.db - dbid changed
    Datafile /u01/app/oracle/oradata/test/users01.db - dbid changed
    Datafile /u01/app/oracle/oradata/test/example01.db - dbid changed
    Datafile /u01/app/oracle/oradata/test/temp01.db - dbid changed
    Control File /u01/app/oracle/oradata/test/control01.ctl - dbid changed
    Control File /u01/app/oracle/fast_recovery_area/test/control02.ctl - dbid changed
    Instance shut down

Database ID for database TEST changed to 2332867595.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.

[oracle@localhost admin]$


Step 5 : Start the database in mount stage 

[oracle@localhost admin]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Tue Mar 10 22:04:10 2020

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

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1620115456 bytes
Fixed Size                  2253704 bytes
Variable Size             989858936 bytes
Database Buffers          620756992 bytes
Redo Buffers                7245824 bytes
Database mounted.
SQL>


step 6 : open database using resetlogs option



SQL> alter database open resetlogs;

Database altered.


*alter database open command will not work .

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open



Step 7 : New DBID 

SQL> select dbid,name,open_mode from v$database;

      DBID NAME      OPEN_MODE
---------- --------- --------------------
2332867595 TEST      READ WRITE

SQL>

Friday, September 6, 2019

Manually Corrupting Oracle Data Block & Recover using RMAN


What is data block corruption?

A database block is corrupted when its content has changed from what Oracle Database expects to find. If not prevented or repaired, block corruption can bring down the database and possibly result in the loss of key business data.

Prerequisite :


  • Audiance of this document should be experienced DBA
  • Database should be in archive log mode and have good backup


Procedure of work :


  • Create tablespace  using sysdba
  • create user  using sysdba
  • create table  using test user 
  • insert records  using test user
  • check the header of table segment 
  • manually corrupt the block on terminal 
  • flush the buffer cahce  as sysdba
  • Disconnect and re-connect test user and query the table you will get block corruption error 




To get information about datafiles exists in database .

select file_name from dba_data_files;

create tablespace useing below command :

create tablespace app_corrupt datafile '/u01/app/oracle/oradata/risdev/app_corrupt01.dbf' size 5m;

create user as follow below command

create user test identified by test123
default tablespace app_corrupt
quota unlimited on app_corrupt;

grant create session, resource to test;


Login using test user account :

create emp table :

create table emp(eno number(8)) tablespace app_corrupt;

Insert records in emp table :

begin
for i in 1..1000000
loop
insert into emp values(i);
end loop;
end;


select count(*) from emp;


SQL> SELECT header_block FROM dba_segments WHERE segment_name='EMP';

HEADER_BLOCK
------------
         130

SQL>

Take tablespace backup using RMAN:

backup tablespace app_corrupt;

Mannualy Corrupt the datafile block using below command:

dd of=/u01/app/oracle/oradata/testdb/corrupt_block_test.dbf bs=8192 conv=notrunc seek=130  EOF
testing corruption
EOF
0+1 records in
0+1 records out
19 bytes (19 B) copied, 0.000133601 s, 142 kB/s


[oracle@localhost ~]$

SQL> select count(*) from emp;
select count(*) from emp
       *
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 5, block # 130)
ORA-01110: data file 5: '/u01/app/oracle/oradata/risdev/app_corrupt01.dbf'


SQL>

connect with RMAN and validate tablespace :

RMAN> validate tablespace APP_CORRUPT;

Starting validate at 05-SEP-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=53 device type=DISK
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00005 name=/u01/app/oracle/oradata/risdev/app_corrupt01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:07
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    FAILED 0              1            640             1669173
  File Name: /u01/app/oracle/oradata/risdev/app_corrupt01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              496
  Index      0              0
  Other      1              143

validate found one or more corrupt blocks
See trace file /u01/app/oracle/diag/rdbms/risdev/risdev/trace/risdev_ora_24069.trc for details
Finished validate at 05-SEP-19

RMAN>


SQL> select * from V$DATABASE_BLOCK_CORRUPTION;

     FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# CORRUPTIO     CON_ID
---------- ---------- ---------- ------------------ --------- ----------
         5        130          1                  0 CORRUPT            0

SQL>


Recover corrupt block using RMAN:

RMAN> blockrecover datafile 5 block 130;

Starting recover at 05-SEP-19
using channel ORA_DISK_1

channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00005
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/12.2.0/db/dbs/02ub15f9_1_1
channel ORA_DISK_1: piece handle=/u01/app/oracle/product/12.2.0/db/dbs/02ub15f9_1_1 tag=TAG20190905T185433
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01

starting media recovery
media recovery complete, elapsed time: 00:00:03

Finished recover at 05-SEP-19

RMAN>



SQL>
SQL> select * from V$DATABASE_BLOCK_CORRUPTION;

no rows selected

SQL>

Tuesday, April 30, 2019

RMAN Incremental Level 1 backup with out Level 0 backup




 Incremental Level 1 backup with out Level 0 backup




level 1 incremental backup can be either of the following types:

Differential backup:  

Its backs up all blocks changed after the most recent incremental backup at level 1 or 0

 Cumulative backup : 

Its backs up all blocks changed after the most recent incremental backup at level 0






RMAN> list backup;

specification does not match any backup in the repository

RMAN>

RMAN>

RMAN> backup incremental level 1 database;

Starting backup at 30-APR-19
using channel ORA_DISK_1
no parent backup or copy of datafile 1 found
no parent backup or copy of datafile 3 found
no parent backup or copy of datafile 4 found
no parent backup or copy of datafile 7 found
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=00001 name=/u01/app/oracle/oradata/IND/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/IND/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/IND/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/IND/users01.dbf
channel ORA_DISK_1: starting piece 1 at 30-APR-19
channel ORA_DISK_1: finished piece 1 at 30-APR-19
piece handle=/u01/app/oracle/product/18.0.0/db/dbs/IND/backupset/2019_04_30/o1_mf_nnnd0_TAG20190430T171432_gdjf91z7_.bkp tag=TAG20190430T171432 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:27
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 30-APR-19
channel ORA_DISK_1: finished piece 1 at 30-APR-19
piece handle=/u01/app/oracle/product/18.0.0/db/dbs/IND/backupset/2019_04_30/o1_mf_ncsn1_TAG20190430T171432_gdjfhrcq_.bkp tag=TAG20190430T171432 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 30-APR-19

RMAN>


RMAN>

RMAN>

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
9       B  0  A DISK        30-APR-19       1       1       NO         TAG20190430T171432
10      B  1  A DISK        30-APR-19       1       1       NO         TAG20190430T171432

RMAN>

Wednesday, April 10, 2019

ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [], [], [], []

 Resolve   ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [], [], [], []


[oracle@pri ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 18.0.0.0.0 - Production on Wed Apr 10 16:05:24 2019
Version 18.5.0.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1526725696 bytes
Fixed Size                  8657984 bytes
Variable Size             503316480 bytes
Database Buffers         1006632960 bytes
Redo Buffers                8118272 bytes
Database mounted.
ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [],
[], [], [], [], [], [], [], []


SQL>


in alert log
===============
Database mounted in Exclusive Mode
Lost write protection disabled
.... (PID:3113): Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST [krsd.c:17733]
2019-04-10T16:35:57.598943+05:30
Completed: ALTER DATABASE   MOUNT
2019-04-10T16:35:57.703170+05:30
ALTER DATABASE OPEN
Ping without log force is disabled:
  instance mounted in exclusive mode.
2019-04-10T16:35:58.087355+05:30
Beginning crash recovery of 1 threads
 Thread 1: Recovery starting at checkpoint rba (logseq 34 block 1464), scn 0
2019-04-10T16:35:58.236926+05:30
Started redo scan
2019-04-10T16:35:59.829966+05:30
Hex dump of (file 3, block 72034) in trace file /u01/app/oracle/diag/rdbms/ind/IND/trace/IND_ora_3118.trc

Reading datafile '/u01/app/oracle/oradata/IND/sysaux01.dbf' for corrupt data at rdba: 0x00c11962 (file 3, block 72034)
Reread (file 3, block 72034) found same corrupt data (logically corrupt)
Write verification failed for File 3 Block 72034 (rdba 0xc11962)
*****************************************************************
An internal routine has requested a dump of selected redo.
This usually happens following a specific internal error, when
analysis of the redo logs will help Oracle Support with the
diagnosis.
It is recommended that you retain all the redo logs generated (by
all the instances) during the past 12 hours, in case additional
redo dumps are required to help with the diagnosis.
*****************************************************************
2019-04-10T16:36:02.015670+05:30
Errors in file /u01/app/oracle/diag/rdbms/ind/IND/trace/IND_ora_3118.trc  (incident=69873):
ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/ind/IND/incident/incdir_69873/IND_ora_3118_i69873.trc
2019-04-10T16:36:06.342365+05:30
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
2019-04-10T16:36:06.342847+05:30
Aborting crash recovery due to error 600
2019-04-10T16:36:06.343449+05:30
Errors in file /u01/app/oracle/diag/rdbms/ind/IND/trace/IND_ora_3118.trc:
ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
2019-04-10T16:36:06.344570+05:30
Errors in file /u01/app/oracle/diag/rdbms/ind/IND/trace/IND_ora_3118.trc:
ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
ORA-600 signalled during: ALTER DATABASE OPEN...
2019-04-10T16:36:07.019702+05:30
Dumping diagnostic data in directory=[cdmp_20190410163607], requested by (instance=1, osid=3118), summary=[incident=69873].
2019-04-10T16:36:23.886376+05:30
TMON (PID:3112): STARTING ARCH PROCESSES
Starting background process ARC0
Starting background process ARC1
2019-04-10T16:36:23.938449+05:30
ARC0 started with pid=35, OS id=3121
Starting background process ARC2
2019-04-10T16:36:23.974871+05:30
ARC1 started with pid=36, OS id=3124
Starting background process ARC3
2019-04-10T16:36:24.003033+05:30
ARC2 started with pid=37, OS id=3126
TMON (PID:3112): ARC0: Archival started
TMON (PID:3112): ARC1: Archival started
TMON (PID:3112): ARC2: Archival started
2019-04-10T16:36:24.026025+05:30
ARC0 (PID:3121): Becoming a 'no FAL' ARCH
ARC0 (PID:3121): Becoming the 'no SRL' ARCH
2019-04-10T16:36:24.026857+05:30
ARC3 started with pid=38, OS id=3128
2019-04-10T16:36:24.036139+05:30
TMON (PID:3112): ARC3: Archival started
TMON (PID:3112): STARTING ARCH PROCESSES COMPLETE
2019-04-10T16:36:24.054208+05:30
TT00 (PID:3130): Gap Manager starting




Solution;

[oracle@pri ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 18.0.0.0.0 - Production on Wed Apr 10 16:05:24 2019
Version 18.5.0.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1526725696 bytes
Fixed Size                  8657984 bytes
Variable Size             503316480 bytes
Database Buffers         1006632960 bytes
Redo Buffers                8118272 bytes
Database mounted.
ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [],
[], [], [], [], [], [], [], []


SQL> shut abort;
ORACLE instance shut down.
SQL>
SQL>
SQL> startup mount
ORACLE instance started.

Total System Global Area 1526725696 bytes
Fixed Size                  8657984 bytes
Variable Size             503316480 bytes
Database Buffers         1006632960 bytes
Redo Buffers                8118272 bytes
Database mounted.
SQL>
SQL> recover database;
Media recovery complete.
SQL> alter database open;

Database altered.

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
IND       READ WRITE

SQL>

Tuesday, February 20, 2018

Understanding Archive Log Destination

Change the location of archive logs 


SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     68
Next log sequence to archive   70
Current log sequence           70
SQL>
SQL>
SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                          0                         0               0
REDO LOG                              0                         0               0
ARCHIVED LOG                      29.62                     27.51              51
BACKUP PIECE                      31.04                         0               2
IMAGE COPY                            0                         0               0
FLASHBACK LOG                         0                         0               0
FOREIGN ARCHIVED LOG                  0                         0               0

7 rows selected.

SQL>
SQL> show parameter db_reco

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_area
db_recovery_file_dest_size           big integer 4182M
SQL>show parameter dest

db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_area
db_recovery_file_dest_size           big integer 4182M
diagnostic_dest                      string      /u01/app/oracle
log_archive_dest                     string
log_archive_dest_1                   string
log_archive_dest_10                  string
log_archive_dest_11                  string

SQL> alter system set log_archive_dest_1='location=/u01/app/oracle/backup/archive_log1' scope=both;

System altered.

SQL> show parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string      location=/u01/app/oracle/backu
                                                 p/archive_log1
log_archive_dest_10                  string
log_archive_dest_11                  string
log_archive_dest_12                  string
log_archive_dest_13                  string
log_archive_dest_14                  string
log_archive_dest_15                  string
log_archive_dest_16                  string
log_archive_dest_17                  string
log_archive_dest_18                  string
log_archive_dest_19                  string
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/backup/archive_log1
Oldest online log sequence     68
Next log sequence to archive   70
Current log sequence           70
SQL>


[oracle@localhost archive_log1]$
[oracle@localhost archive_log1]$
[oracle@localhost archive_log1]$ ls -lrt /u01/app/oracle/backup/archive_log1
total 2728
-rw-r----- 1 oracle oinstall 2790400 Feb 20 10:25 1_70_966712547.dbf
[oracle@localhost archive_log1]$
[oracle@localhost archive_log1]$ ls -lrt /u01/app/oracle/fast_recovery_area/DUCAT/archivelog/2018_02_20
total 41728
-rw-r----- 1 oracle oinstall 40453120 Feb 20 00:06 o1_mf_1_68_f8p6b7h9_.arc
-rw-r----- 1 oracle oinstall  2271232 Feb 20 09:55 o1_mf_1_69_f8q8soh1_.arc
[oracle@localhost archive_log1]$

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string
log_archive_dest_20                  string
log_archive_dest_21                  string
log_archive_dest_22                  string
log_archive_dest_23                  string
log_archive_dest_24                  string
log_archive_dest_25                  string
log_archive_dest_26                  string
log_archive_dest_27                  string
log_archive_dest_28                  string
log_archive_dest_29                  string
SQL> alter system set log_archive_dest_2='location=/u01/app/oracle/backup/archive_log2' scope=both;

System altered.

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      location=/u01/app/oracle/backup/archive_log2
log_archive_dest_20                  string
log_archive_dest_21                  string
log_archive_dest_22                  string
log_archive_dest_23                  string
log_archive_dest_24                  string
log_archive_dest_25                  string
log_archive_dest_26                  string
log_archive_dest_27                  string
log_archive_dest_28                  string
log_archive_dest_29                  string
SQL>

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/backup/archive_log2
Oldest online log sequence     70
Next log sequence to archive   72
Current log sequence           72
SQL> alter system switch logfile;

System altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/backup/archive_log2
Oldest online log sequence     71
Next log sequence to archive   73
Current log sequence           73
SQL>
SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
         1          1         73   52428800        512          1 NO  CURRENT                2198499 20-FEB-18   2.8147E+14
         2          1         71   52428800        512          1 YES INACTIVE               2198050 20-FEB-18      2198247 20-FEB-18
         3          1         72   52428800        512          1 YES ACTIVE                 2198247 20-FEB-18      2198499 20-FEB-18

SQL>



[oracle@localhost archive_log2]$  ls -lrt /u01/app/oracle/backup/archive_log1
total 2956
-rw-r----- 1 oracle oinstall 2790400 Feb 20 10:25 1_70_966712547.dbf
-rw-r----- 1 oracle oinstall  167936 Feb 20 10:29 1_71_966712547.dbf
-rw-r----- 1 oracle oinstall   61952 Feb 20 10:38 1_72_966712547.dbf
[oracle@localhost archive_log2]$
[oracle@localhost archive_log2]$ ls -lrt
total 228
-rw-r----- 1 oracle oinstall 167936 Feb 20 10:29 1_71_966712547.dbf
-rw-r----- 1 oracle oinstall  61952 Feb 20 10:38 1_72_966712547.dbf

[oracle@localhost archive_log2]$



Set archive log destination to FRA
-----------------------------------------

SQL> select name,
round(space_limit / 1048576) space_limit_in_mb,
round(space_used / 1048576) space_used_in_mb,
round((space_used / 1048576) / (space_limit / 1048576),2)*100 percent_usage
from v$recovery_file_dest;  

NAME                                               SPACE_LIMIT_IN_MB SPACE_USED_IN_MB PERCENT_USAGE
-------------------------------------------------- ----------------- ---------------- -------------
/u01/app/oracle/fast_recovery_area                              4182             2537            61

SQL> alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST' scope=both;

System altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     71
Next log sequence to archive   73
Current log sequence           73
SQL>
SQL> alter system switch logfile;

System altered.

SQL>

SQL> show parameter RECOVERY_FILE_DEST

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_area
db_recovery_file_dest_size           big integer 4182M
SQL>





[oracle@localhost archive_log2]$
[oracle@localhost archive_log2]$ ls -l /u01/app/oracle/fast_recovery_area/DUCAT/archivelog/2018_02_20
total 41728
-rw-r----- 1 oracle oinstall 40453120 Feb 20 00:06 o1_mf_1_68_f8p6b7h9_.arc
-rw-r----- 1 oracle oinstall  2271232 Feb 20 09:55 o1_mf_1_69_f8q8soh1_.arc
[oracle@localhost archive_log2]$
[oracle@localhost archive_log2]$ ls -l /u01/app/oracle/fast_recovery_area/DUCAT/archivelog/2018_02_20
total 42048
-rw-r----- 1 oracle oinstall 40453120 Feb 20 00:06 o1_mf_1_68_f8p6b7h9_.arc
-rw-r----- 1 oracle oinstall  2271232 Feb 20 09:55 o1_mf_1_69_f8q8soh1_.arc
-rw-r----- 1 oracle oinstall   325632 Feb 20 10:50 o1_mf_1_73_f8qd1mhl_.arc
[oracle@localhost archive_log2]$
[oracle@localhost archive_log2]$ ls -lrt /u01/app/oracle/backup/archive_log1
total 2956
-rw-r----- 1 oracle oinstall 2790400 Feb 20 10:25 1_70_966712547.dbf
-rw-r----- 1 oracle oinstall  167936 Feb 20 10:29 1_71_966712547.dbf
-rw-r----- 1 oracle oinstall   61952 Feb 20 10:38 1_72_966712547.dbf
[oracle@localhost archive_log2]$
[oracle@localhost archive_log2]$ ls -lrt /u01/app/oracle/backup/archive_log2
total 548
-rw-r----- 1 oracle oinstall 167936 Feb 20 10:29 1_71_966712547.dbf
-rw-r----- 1 oracle oinstall  61952 Feb 20 10:38 1_72_966712547.dbf
-rw-r----- 1 oracle oinstall 325632 Feb 20 10:50 1_73_966712547.dbf
[oracle@localhost archive_log2]$
[oracle@localhost archive_log2]$