ORA-00261: log 11 of thread 1 is being archived or modified

Try to drop standby logfile group, and get below errors. Because this standby logfile group is being used for real time standby database recovery.

SQL> alter database drop standby logfile group 11;
alter database drop standby logfile group 11
*
ERROR at line 1:
ORA-00261: log 11 of thread 1 is being archived or modified
ORA-00312: online log 11 thread 1: '/u02/redo/TESTDB/standby_011.log'

WORKAROUND

1)Clear standby logfiles:

SQL> alter database clear logfile group 11;

Database altered.

2) Drop standby logfile group:

SQL> alter database drop standby logfile group 11;

Database altered.

3) Add standby logfile groups, and enable recovering managed standby database.

4) Will see log shipping pauses with below errors :

*** 2019-01-21 15:11:39.944
Error 270 closing standby archive log file at host 'TESTDBSTY'
ORA-00270: error creating archive log
Archive destination LOG_ARCHIVE_DEST_2 made inactive: File close error
*** 2019-01-21 15:11:40.043603 4929 krsh.c
LGWR: Error 270 closing archivelog file 'TESTDBSTY'

5) Reset parameter “log_archive_dest_state_2” to wake up log shipping:

SQL>alter system set log_archive_dest_state_2=enable;

ORA-01623: log 31 is current log for instance RACTEST3 (thread 3) – cannot drop

Disable thread before dropping the online redo logfiles.

Three nodes RAC database was migrated to two nodes RAC database, while trying to drop online redo logs of thread 3,  the errors are as below:

SQL> alter database drop logfile group 31;
alter database drop logfile group 31
*
ERROR at line 1:
ORA-01623: log 31 is current log for instance RACTEST3 (thread 3) - cannot drop
ORA-00312: online log 31 thread 3: '+DATA1/ractest/onlinelog/group_31.409.924815767'
ORA-00312: online log 31 thread 3: '+FRA/ractest/onlinelog/group_31.262.924815769'

SOLUTION

Disable thread 3 by :

SQL> alter database disable thread 3;

Database altered.

Then drop the redo logs successfully.

SQL> alter database drop logfile group 31;

Database altered.

SQL> alter database drop logfile group 32;

Database altered.

SQL> alter database drop logfile group 33;
Database altered.

...
..
.