Wednesday, July 9, 2014

ORA-38709: Recovery Area is not enabled.

##########################
## Error
##########################

ORA-38709: Recovery Area is not enabled.

### Full Error

SQL> Alter database flashback on;
Alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38709: Recovery Area is not enabled.

##########################
#  Error Occurred
##########################

Error occured while enabling flashback in 11.2.0.3.0 version

##########################
## Command Executed
##########################

Alter database flashback on;

**************************************** Step By Step Analysis ******************************************************

#########################################
# 1) Check FRA
#########################################

SQL> sho parameter recovery
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string
db_recovery_file_dest_size           big integer 80000M

=====================================================================================================================

#########################################
# 2) Reason for Failure
#########################################

Flashback logs are designed to get stored in Flash recovery area, so before enabling flashback in the database, we need to make sure that FRA is set.

=====================================================================================================================

##########################
## Solution
##########################

#### Set FRA

SQL> Alter system set db_recovery_file_dest='+ARCH';

System altered.

SQL> sho parameter reco

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
db_recovery_file_dest                string      +ARCH
db_recovery_file_dest_size           big integer 80000M


=====================================================================================================================
 Enabling flashback worked now
=====================================================================================================================

SQL> Alter database flashback on;

Database altered.

select db_unique_name,log_mode,open_mode,flashback_on,force_logging from v$database;
SQL>
DB_UNIQUE_NAME                 LOG_MODE     OPEN_MODE            FLASHBACK_ON       FOR
------------------------------ ------------ -------------------- ------------------ ---
oralin                         ARCHIVELOG   READ WRITE           YES                NO

=====================================================================================================================
 Comments Are Always welcome
=====================================================================================================================



No comments: