Home » Server Options » Data Guard » archivelog not applied
archivelog not applied [message #228774] Wed, 04 April 2007 02:54 Go to next message
zuhair
Messages: 12
Registered: February 2007
Location: DUBAI
Junior Member
Hi all ,
I configure standby database and when I tray to switch to primary I get this error

this is the steps i did

alter database commit to switchover to primary;

SQL> recover managed standby database;
ORA-00283: recovery session canceled due to errors
ORA-00326: log begins at change 377205, need earlier change 374236
ORA-00334: archived log: 'C:\ARCHIVE\ARC00019_0618916032.001'

SQL> select sequence#,FIRST_CHANGE#,applied,archived from v$archived_log;

SEQUENCE# FIRST_CHANGE# APP ARC
---------- ------------- --- ---
9 358800 YES YES
10 365477 YES YES
10 365477 YES YES
9 358800 NO YES
11 368443 YES YES
11 368443 YES YES
12 368602 YES YES
12 368602 YES YES
13 369123 YES YES
13 369123 YES YES
14 369233 YES YES

SEQUENCE# FIRST_CHANGE# APP ARC
---------- ------------- --- ---
14 369233 NO YES
15 369293 YES YES
16 369823 YES YES
17 373129 YES YES
18 373361 YES YES
20 381525 NO YES
19 377205 NO YES
21 383289 NO YES
22 387866 NO YES
23 392296 NO YES
24 395994 NO YES

SEQUENCE# FIRST_CHANGE# APP ARC
---------- ------------- --- ---
25 399889 NO YES
26 403731 NO YES
27 408269 NO YES
28 412416 NO YES
29 416120 NO YES
30 420450 NO YES
31 425016 NO YES
32 428549 NO YES
33 433015 NO YES
34 437431 NO YES
35 440282 NO YES

SEQUENCE# FIRST_CHANGE# APP ARC
---------- ------------- --- ---
36 440445 NO YES
37 445009 NO YES
38 447994 NO YES
39 448888 NO YES
40 451903 NO YES

38 rows selected.

please any help
regards
Re: archivelog not applied [message #228811 is a reply to message #228774] Wed, 04 April 2007 05:18 Go to previous messageGo to next message
amit_p_dixit
Messages: 31
Registered: November 2006
Location: Mumbai
Member

hi,

first check form which sequence no the database has not appiled the archive logs

SQL> select sequence#, applied, archived from v$archived_log order by sequence#;

·It must be always kept in mind for a switchover, the production database (PR) must be made standby first.

# To check the switchover status for the PR database.
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
SESSIONS ACTIVE


# For changing the Production Database (PR) into Standby Database (DR).
SQL> alter database commit to switchover to physical standby with
session shutdown;
Database altered.


# Always shutdown the database to apply these changes.
SQL> shutdown immediate;

# Startup database in nomount stage
SQL> startup nomount;

# Standby database must always in a mount stage (Note: - Don’t start the database in open stage.
SQL> alter database mount standby database;
Database altered.


# To start database in MRM (Manage recovery mode) for auto applying of Archive logs.
SQL> alter database recover managed standby database disconnect from session;
Database altered.


·The above SQL queries the production database is transferred into a standby database.
·Now it's safe to transform standby database into production database.

***************
Apply the following SQL the DR side.

# To check the switchover status for the DR database.
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
TO PRIMARY


#For checking whether the archive logs are being archived and applied on the DR database.
SQL> select sequence#, applied, archived from v$archived_log order by sequence#;
SEQUENCE# APP ARC
---------- --- ---
3470 YES YES
3471 YES YES
3472 YES YES
3473 YES YES
4 rows selected.


# For switching the DR to PR.
SQL> alter database commit to switchover to primary;
Database altered.




# Always shutdown the database to apply these changes.
SQL> shutdown immediate;


# Starting up the database in open mode.
SQL> startup;


SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
SESSIONS ACTIVE


·At this stage the DR is in Production and PR is acting as standby.


Regards,
Amit
Re: archivelog not applied [message #228813 is a reply to message #228774] Wed, 04 April 2007 05:28 Go to previous messageGo to next message
zuhair
Messages: 12
Registered: February 2007
Location: DUBAI
Junior Member
hi ,
i made all steps but when i tray to run this query

alter database commit to switchover to primary;

i get this error

alter database commit to switchover to primary
*
ERROR at line 1:
ORA-16139: media recovery required




thanks
Re: archivelog not applied [message #228818 is a reply to message #228774] Wed, 04 April 2007 05:43 Go to previous messageGo to next message
zuhair
Messages: 12
Registered: February 2007
Location: DUBAI
Junior Member
dear Amit
i run this query and i get this error



SQL> recover standby database;
ORA-00279: change 374236 generated at 04/03/2007 15:23:50 needed for thread 1
ORA-00289: suggestion : C:\ARCHIVE\ARC00019_0618916032.001
ORA-00280: change 374236 for thread 1 is in sequence #19


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}


regards
Zuhair
Re: archivelog not applied [message #228819 is a reply to message #228818] Wed, 04 April 2007 05:47 Go to previous messageGo to next message
amit_p_dixit
Messages: 31
Registered: November 2006
Location: Mumbai
Member

Dear Zuhair,

i think there is no archive (ARC00019_0618916032.001) present in the location c:\archive\

manually copy , paste the archive log (ARC00019_0618916032.001) from the PR to DR and recover it.

Regards,
Amit
Re: archivelog not applied [message #228825 is a reply to message #228774] Wed, 04 April 2007 06:04 Go to previous messageGo to next message
zuhair
Messages: 12
Registered: February 2007
Location: DUBAI
Junior Member
dear Amit
i copy and paste the file and tray the below

SQL> recover standby database;
ORA-00279: change 374236 generated at 04/03/2007 15:23:50 needed for thread 1
ORA-00289: suggestion : C:\ARCHIVE\ARC00019_0618916032.001
ORA-00280: change 374236 for thread 1 is in sequence #19


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00326: log begins at change 377205, need earlier change 374236
ORA-00334: archived log: 'C:\ARCHIVE\ARC00019_0618916032.001'

regards
Zuhair
Re: archivelog not applied [message #228831 is a reply to message #228825] Wed, 04 April 2007 06:19 Go to previous messageGo to next message
amit_p_dixit
Messages: 31
Registered: November 2006
Location: Mumbai
Member

hi zuhair,

i was just checking that error... it seems u have no copyied the perfect archive log.... http://ora-00326.ora-code.com/

what's the size of ur DB..

Regards
Amit
Re: archivelog not applied [message #229243 is a reply to message #228774] Fri, 06 April 2007 03:42 Go to previous message
amit_p_dixit
Messages: 31
Registered: November 2006
Location: Mumbai
Member

hi zuhair,


Is your problem solved..


Regards,
Amit
Previous Topic: Data Guard observer configurations :o(
Next Topic: Observer server requirements
Goto Forum:
  


Current Time: Fri Mar 29 00:54:45 CDT 2024