RMAN Duplicate Failed - ORA - 38862: Flashback database logs are in use.

Problem Statement:

While doing a RMAN based duplication for database running on version 19.10 encountered a strange error "ORA - 38862: Flashback database logs are in use". Though at first instance one would think about why would the database  be using flashback logs as it's a RMAN based restore. 


Error Stack:

RMAN-05501: aborting duplication of target database

RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of sql command on clone_default channel at <timestamp>

RMAN-11003: failure during parse/execution of SQL statement: alter database flashback off

ORA - 38862: Flashback database logs are in use


Command:

run  {

                allocate auxiliary channel ch1 device type disk;

                allocate auxiliary channel ch1 device type disk;

                allocate auxiliary channel ch1 device type disk;

                allocate auxiliary channel ch1 device type disk;

                duplicate database <source db name> to <target db name>

                until scn <scn number> nofilenamecheck;

        }

It seems RMAN is trying to disable the flashback of the database while restoring and it thinks some of the flashback logs are still in use and causing refresh to fail. Similar RMAN duplication on the same type of version and configuration gives no error. As in luck found a document on Oracle Support that talks about the same error (Doc ID 2418803.1).

This problem arises when we have db_recovery_file_dest and db_flashback_retention_target parameter set which is not very uncommon. 


Solution: 

Disable the flashback retention target during the restore.

Step1: set log_archive_dest_1 to FRA location.

Step2: set db_flashback_retention_target=0

Step3: unset db_recovery_file_dest

    alter system set db_recovery_file_dest='' scope=both sid='*';


Even though we have a solution it makes me feel it's very common to have these parameters set and what could be the actual reason for RMAN thinking this way. I will continue my investigation to identify the actual reason if any, meanwhile this workaround works well.


References:

Oracle Support Document ID: 2418803.1

Comments

Popular posts from this blog

How to Solve - "WAIT FOR EMON PROCESS NTFNS"

Query Regression - "OR" Transformation Oracle 19c

ORA - 12537: TNS: connection closed