Home » Server Options » Data Guard » How to handle this problem: archivelog gap ?
How to handle this problem: archivelog gap ? [message #208781] Tue, 12 December 2006 04:22 Go to next message
wxfjordan
Messages: 92
Registered: December 2006
Member

os: window 2003 standard
db: oracle 10g

Data guard system: One primary database and one physical standby database.

The primary database works in maximize protection mode. see as the below:

SQL> select protection_mode from v$database;

PROTECTION_MODE
--------------------
MAXIMUM PROTECTION

SQL> show parameters log_archive_dest_2

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------------
log_archive_dest_2 string service=szxgsfb LGWR SYNC AFFIRM
valid_for=(online_logfiles,
primary_role) db_unique_name=szxgsfb


problem: Once time, the server room happens power failure. The primary and standby database are both lost a archive log 37.
see as below:

SQL> select * from v$archive_gap;

THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 37 37


And then how to handle this archive gap problem? The primary database can not startup with maximize protection mode.

The standby database can not use the new archive log file the primary database sent for recovering.


when recover database in standby database as following:

SQL> recover automatic standby database;

ORA-00279: change 583222 generated at 12/08/2006 16:48:17 needed for thread 1
ORA-00289: suggestion :
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00037_0608640968.001
ORA-00280: change 583222 for thread 1 is in sequence #37
ORA-00278: log file
'C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00037_0608640968.001' no longer needed
for this recovery
ORA-00310: archived log contains sequence 1; sequence 37 required
ORA-00334: archived log:
'C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00037_0608640968.001'


Please tell me how to do?


Thank.


Re: How to handle this problem: archivelog gap ? [message #208855 is a reply to message #208781] Tue, 12 December 2006 06:28 Go to previous messageGo to next message
email.sandeepnaik
Messages: 121
Registered: August 2006
Senior Member
If its 10gR2 then you can run rman incremental backup and apply on standby and bring it up to speed and start recovery again (see rman 10gR2 new feature guide)

If its 10gR1 then you will have to rebuild standby database the same way you created standby first time.

Sandeep
Re: How to handle this problem: archivelog gap ? [message #208989 is a reply to message #208855] Tue, 12 December 2006 20:54 Go to previous messageGo to next message
wxfjordan
Messages: 92
Registered: December 2006
Member
I have checked standby database view: v$loghist and v$archived_log. see the below:

SQL> select * from v$loghist;

THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM SWITCH_CHANGE#
---------- ---------- ------------- --------- --------------
1 1 534907 08-DEC-06 541858
1 2 541858 08-DEC-06 555483
....
....
....
1 34 582176 08-DEC-06 582177
1 35 582177 08-DEC-06 583214
1 36 583214 08-DEC-06 583222
36 rows selected.

SQL> select name from v$archived_log;

NAME
-------------------------------------------------------------------
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00003_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00004_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00005_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00006_0608640968.001
...
...
...
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00036_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00001_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00038_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00039_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00040_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00041_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00042_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00043_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00044_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00045_0608640968.001
C:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\ARC00046_0608640968.001

52 rows selected.


how to handle these archive log file from 36 to 46?

I can not find the RMAN 10gR2 new feature guide.

May you give me link for "RMAN 10gR2 new feature guide"?

I am a oracle beginner.

Thanks.
Re: How to handle this problem: archivelog gap ? [message #209440 is a reply to message #208781] Thu, 14 December 2006 19:55 Go to previous messageGo to next message
email.sandeepnaik
Messages: 121
Registered: August 2006
Senior Member
search forum. Somewhere I have posted that link.

Otherwise, find on oracle.com

Sandeep
Re: How to handle this problem: archivelog gap ? [message #553143 is a reply to message #208989] Wed, 02 May 2012 04:36 Go to previous message
philbin
Messages: 1
Registered: May 2012
Location: Bangalorre
Junior Member
Execute below query:

SELECT name
FROM v$archived_log
WHERE thread# = 1
AND dest_id = 1
AND sequence# BETWEEN 36 and 46

You will get the result with the archive log destination. The output will look like something like

NAME
--------------------------------------
/u02/oraarchive/TESTDB/arch_t1_s24.dbf
/u02/oraarchive/TESTDB/arch_t1_s25.dbf
/u02/oraarchive/TESTDB/arch_t1_s26.dbf
/u02/oraarchive/TESTDB/arch_t1_s27.dbf
/u02/oraarchive/TESTDB/arch_t1_s28.dbf

Copy the above redo log files to the physical standby database and register them using the ALTER DATABASE REGISTER LOGFILE ... SQL statement on the physical standby database. For example:

SQL> ALTER DATABASE REGISTER LOGFILE '/u02/oraarchive/TESTDB/arch_t1_s24.dbf';
SQL> ALTER DATABASE REGISTER LOGFILE '/u02/oraarchive/TESTDB/arch_t1_s25.dbf';
SQL> ALTER DATABASE REGISTER LOGFILE '/u02/oraarchive/TESTDB/arch_t1_s26.dbf';
SQL> ALTER DATABASE REGISTER LOGFILE '/u02/oraarchive/TESTDB/arch_t1_s27.dbf';
SQL> ALTER DATABASE REGISTER LOGFILE '/u02/oraarchive/TESTDB/arch_t1_s28.dbf';
After the redo logs have been registered on the physical standby database, the DBA can restart the managed recovery operations. For example, to put the physical standby database into automatic recovery managed mode:

SQL> alter database recover managed standby database disconnect from session;

Previous Topic: Some questions about dataguard
Next Topic: logical standby failed
Goto Forum:
  


Current Time: Fri Mar 29 08:20:00 CDT 2024