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

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World

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.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer