Data Guard / Standby: ORA-01156: recovery or flashback in progress may need access to files


Error Description:
In standby or Data guard the clear logfile group, drop logfile group commands are failing with following error.

SQL> ALTER DATABASE CLEAR LOGFILE GROUP 1;
ALTER DATABASE CLEAR LOGFILE GROUP 1
*
ERROR at line 1:

ORA-01156: recovery or flashback in progress may need access to files


SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files

Solution Description:
You have to stop the standby or data guard database recovery. Also you should change thestandby_file_management to manual before performing these commands. See example below.

SQL> alter database add logfile group 1 ('/u07/oradata/TRANSPRD_STANDBY/redo1.log') size 200M reuse;
alter database add logfile group 1 ('/u07/oradata/TRANSPRD_STANDBY/redo1.log') size 200M reuse
*
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files


SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter system set standby_file_management='MANUAL';

System altered.

SQL>  alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance TRANSPRD_STANDBY (thread 1)
ORA-00312: online log 1 thread 1: '/u01/oradata/TRANSPRD_STANDBY/redo1.log'


SQL> ALTER DATABASE CLEAR LOGFILE GROUP 1;

Database altered.

SQL> alter database drop logfile group 1;

Database altered.

SQL> alter database add logfile group 1 ('/u07/oradata/TRANSPRD_STANDBY/redo1.log') size 200M reuse;

Database altered.
SQL> alter system set standby_file_management='AUTO';

System altered.

Then start the recovery.

DBA Tips Data Pump Reference

0 comments:

Post a Comment

 

dba topics. Copyright 2011-16 All Rights Reserved | Site Map | Contact | Disclaimer | Google