Skip to main content

Fix ORA-16072

Today after restore and recovery prod database on test environment I faced with strange error:

ORA-16072: a minimum of one standby database destination is required.

My database environment :

 OS: OEL 6.5  
 DB: 11.2.0.4  

After recovery database stays on MOUNT mode and could not open it.

RMAN-00571: ===========================================================  
 RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============  
 RMAN-00571: ===========================================================  
 RMAN-03002: failure of recover command at 11/27/2015 12:55:01  
 RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 9573 and starting SCN of 556583605 

RMAN> alter database open resetlogs;  
 RMAN-00571: ===========================================================  
 RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============  
 RMAN-00571: ===========================================================  
 RMAN-03002: failure of alter db command at 11/27/2015 12:56:08  
 ORA-03113: end-of-file on communication channel  
 Process ID: 12064  
 Session ID: 958 Serial number: 11  
 RMAN-00571: ===========================================================  
 RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============  
 RMAN-00571: ===========================================================  
 ORA-03114: not connected to ORACLE  
 RMAN-00571: ===========================================================  
 RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============  
 RMAN-00571: ===========================================================  
 RMAN-03002: failure of alter db command at 11/27/2015 12:56:08  
 ORA-03113: end-of-file on communication channel  
 Process ID: 12064  
 Session ID: 958 Serial number: 11  
 [oracle@TESTDB dbs]$  


Checking alertlog:
LGWR: STARTING ARCH PROCESSES  
 Fri Nov 27 14:44:35 2015  
 ARC0 started with pid=22, OS id=23775   
 ARC0: Archival started  
 LGWR: STARTING ARCH PROCESSES COMPLETE  
 ARC0: STARTING ARCH PROCESSES  
 LGWR: Primary database is in MAXIMUM AVAILABILITY mode  
 LGWR: Destination LOG_ARCHIVE_DEST_1 is not serviced by LGWR  
 LGWR: Minimum of 1 LGWR standby database required  
 Errors in file /u01/oracle/diag/rdbms/prod/XXXX/trace/XXXX_lgwr_23742.trc:  
 ORA-16072: a minimum of one standby database destination is required 


I turned off archivelog mode on my test database and tried to open. It opened successfully. But I need my test database have to be on archivelog mode.

To handle it I checked and corrected some parameters:

SQL> select open_mode, log_mode from v$database;  
 OPEN_MODE   LOG_MODE  
 -------------------- ------------  
 READ WRITE   NOARCHIVELOG  



SQL> set linesize 100  
 SQL> show parameter fal_  
 NAME     TYPE     VALUE  
 ------------------------------------ -------------------------------- ------------------------------  
 fal_client    string     XXXX  
 fal_server    string     XXXX_SB  
 SQL> alter system set fal_client='' scope=spfile;  
 System altered.  
 SQL> alter system set fal_server='' scope=spfile;  
 System altered.  
 SQL> alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';  
 System altered  
 SQL> select open_mode, DATABASE_ROLE, guard_status, SWITCHOVER_STATUS from v$database;  
 OPEN_MODE   DATABASE_ROLE  GUARD_S SWITCHOVER_STATUS  
 -------------------- ---------------- ------- --------------------  
 MOUNTED    PRIMARY    NONE  NOT ALLOWED  
 Database altered.  


Restart database

 SQL> shut immediate  
 ORA-01109: database not open  
 Database dismounted.  
 ORACLE instance shut down.  
 SQL> startup mount  
 ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance  
 ORACLE instance started.  
 Total System Global Area 8584982528 bytes  
 Fixed Size   2260128 bytes  
 Variable Size  6341788512 bytes  
 Database Buffers 2214592512 bytes  
 Redo Buffers   26341376 bytes  
 Database mounted.  
 SQL> alter database open;  
 Database altered.  

Perfect

SQL> select name, open_mode from v$database;  
 NAME OPEN_MODE  
 ---------  ------------------------  
 XXXX  READ WRITE  
 SQL>  



But in alertlog still error

 Errors in file /u01/oracle/diag/rdbms/prod/XXXX/trace/XXXX_arct_24125.trc:  
 ORA-00313: open failed for members of log group 7 of thread 0  
 ORA-00312: online log 7 thread 0: '/u01/oracle/fast_recovery_area/XXXX/onlinelog/o1_mf_7_c4vcl2pw_.log' 


There standby redo logs. Let`s drop it

 SQL> select group#, bytes from v$standby_log;  
   GROUP# BYTES  
 ---------- ----------  
  4 314572800  
  5 314572800  
  6 314572800  
  7 314572800  
 SQL> set linesize 150  
 SQL> col member for a80  
 SQL> select group#, member from v$logfile;  
   GROUP# MEMBER  
 ---------- --------------------------------------------------------------------------------  
  1 /u01/oracle/oradata/XXX/redo01.log  
  2 /u01/oracle/oradata/XXX/redo02.log  
  3 /u01/oracle/oradata/XXX/redo03.log  
  4 /u01/oracle/fast_recovery_area/XXX/onlinelog/o1_mf_4_c5jf59f8_.log  
  5 /u01/oracle/fast_recovery_area/XXX/onlinelog/o1_mf_5_c5jf5df9_.log  
  6 /u01/oracle/fast_recovery_area/XXX/onlinelog/o1_mf_6_c5jf5hfv_.log  
  7 /u01/oracle/fast_recovery_area/XXX/onlinelog/o1_mf_7_c5jf5lw1_.log  
 7 rows selected.  


[oracle@TESTDB onlinelog]$ pwd
/u01/oracle/fast_recovery_area/XXXX/onlinelog

[oracle@TESTDB onlinelog]$ ls -lrt  
 total 1228820  
 -rw-r-----. 1 oracle oinstall 314573312 Nov 27 14:47 o1_mf_4_c5jf59f8_.log  
 -rw-r-----. 1 oracle oinstall 314573312 Nov 27 14:47 o1_mf_5_c5jf5df9_.log  
 -rw-r-----. 1 oracle oinstall 314573312 Nov 27 14:47 o1_mf_6_c5jf5hfv_.log  
 -rw-r-----. 1 oracle oinstall 314573312 Nov 27 14:47 o1_mf_7_c5jf5lw1_.log



 SQL> select status, group#, bytes from v$standby_log;  
 STATUS    GROUP#  BYTES  
 ---------- ---------- ----------  
 UNASSIGNED   4 314572800  
 UNASSIGNED   5 314572800  
 UNASSIGNED   6 314572800  
 UNASSIGNED   7 314572800  
 SQL> alter database drop standby logfile group 4;  
 Database altered.  
 SQL> alter database drop standby logfile group 5;  
 Database altered.  
 SQL> alter database drop standby logfile group 6;  
 Database altered.  
 SQL> alter database drop standby logfile group 7;  
 Database altered.  

After restart db check alertlog

SQL> shut immediate  
 Database closed.  
 Database dismounted.  
 ORACLE instance shut down.  
 SQL> startup  
 ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance  
 ORACLE instance started.  
 Total System Global Area 8584982528 bytes  
 Fixed Size   2260128 bytes  
 Variable Size  6341788512 bytes  
 Database Buffers 2214592512 bytes  
 Redo Buffers   26341376 bytes  
 Database mounted.  
 Database opened.  
 SQL>   

Alertlog is clear
Fri Nov 27 15:15:42 2015  
 ALTER DATABASE OPEN  
 LGWR: STARTING ARCH PROCESSES  
 Fri Nov 27 15:15:42 2015  

Comments

Popular posts from this blog

Rman encryption and other techniques

Today I will demonstrate Recovery Manager features, especially encryption and some other techniques. First of all let me note about RMAN backup encryption. Staring from Oracle 10g RMAN now creates encrypted backups that cannot be restored by unauthorized people. There are 3 modes of backup encryption: * Transparent encryption * Password encryption * Dual-mode encryption using either transparent or password encryption All RMAN backups are not encrypted but you can encrypt any RMAN backup in the form of a backup set. In this tutorial I will show you how to configure Password encryption. Let`s finish talking and start to demonstrate. check parameters with "SHOW ALL" command, by default encryption is OFF RMAN> show all; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTR...

ORA-03206: maximum file size of (5242880) blocks in AUTOEXTEND clause is out of range

Today when I want to change max size of datafile I got strange error. ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/MYDB/users01.dbf' AUTOEXTEND ON NEXT 1280K MAXSIZE 32GB ORA-03206: maximum file size of (5242880) blocks in AUTOEXTEND clause is out of range Here is reason: The maximum file size for an autoextendable file has exceeded the maximum number of blocks allowed. After research internet I found that instead of using 32GB we can use 32767M. (same values but in MB). Or you may use 31GB too. ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/MYDB/users01.dbf' AUTOEXTEND ON NEXT 1280K MAXSIZE 32767M;

Fix ORA-01139: RESETLOGS option only valid after an incomplete database recovery

While shutting down my TEST database process was hanged. Then I had to use shutdown abort. But when I wanted to start database it did not open. SQL> select name from v$database; NAME --------- TEST SQL> shut abort; ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 6597406720 bytes Fixed Size 2265664 bytes Variable Size 3204451776 bytes Database Buffers 3372220416 bytes Redo Buffers 18468864 bytes Database mounted. SQL> alter database open; alter database open * ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 6552 Session ID: 191 Serial number: 3  What`s wrong?  SQL> alter database open resetlogs; ERROR:    ORA-03114: not connected to ORACLE    SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Pr...