Saturday 14 July 2012

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


---when create standby database Some time generate this problem .

rman target /
connect auxiliary sys@pune
duplicate target database for standby from active database;
exit

sqlplus sys@pune as sysda

######
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP 5;
ALTER DATABASE DROP STANDBY LOGFILE GROUP 5
*
ERROR at line 1:
ORA-00261: log 5 of thread 1 is being archived or modified
ORA-00312: online log 5 thread 1: 'C:\PUNE\ORCL_REDO05.LOG'
######

--alter database clear logfile group 5;

--alter database drop logfile group 5;

--ALTER DATABASE ADD STANDBY LOGFILE GROUP 5  ('C:\pune\pune_REDO05.LOG') SIZE 50M;



2.  Cancel Managed Recovery process on the standby:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

3.  Execute the command to clear all log groups on standby for each log group (for each log group):

SQL>alter database clear logfile group 1;

4.  Check the v$log view to confirm the size and status.

5.  Recreate standby redo logs on standby (only if standby Redo logs are also missing) using:

(a) Drop the standby redo logfile group(s) (check v$standby_log)

SQL> alter database drop standby logfile group 5;
 (b) Recreate the standby logfile group(s)

SQL> alter database add standby logfile group 5 ('C:\pune\pune_REDO05.LOG') size 50m;

No comments: