Standby Db doesn't apply logs [message #59895] |
Fri, 02 January 2004 01:12  |
Keir Hawker
Messages: 8 Registered: September 2003
|
Junior Member |
|
|
Hi All,
Happy New Year!! I'm a big fan of this website and have managed to overcome quite a few problems over the year just from reading. I hope someone out there might be able to help me now.
I'm running Oracle 8i on a windows 2000 server.
Recently, I have instigated a standby database to mimic our main DB. I have gone through all the documents on hand (Incl. Lawrence To) and have got everything set up the way I want.
The problem is that after initiating "recover managed standby database" from server manager, none of the subsequent archive logs are actually applied to the standby database. That is, I set up the standby, do a whole of work on the primary database. I check that the archive files have been copied across to the standby directory [[which they have]], but none of the data has been applied.
This an excert from my alert.log file:
Fri Jan 02 10:51:42 2004
ALTER DATABASE RECOVER managed standby database
Fri Jan 02 10:51:42 2004
Media Recovery Start: Managed Standby Recovery
Media Recovery Log
Media Recovery Waiting for thread 1 seq# 3417
Fri Jan 02 10:53:57 2004
Media Recovery Log D:ORACLEORADATAOBSKEIRARCHIVEOBSKEIRT001S03417.ARC
Media Recovery Log D:ORACLEORADATAOBSKEIRARCHIVEOBSKEIRT001S03418.ARC
Media Recovery Waiting for thread 1 seq# 3419
Fri Jan 02 10:54:13 2004
Media Recovery Log D:ORACLEORADATAOBSKEIRARCHIVEOBSKEIRT001S03419.ARC
Media Recovery Waiting for thread 1 seq# 3420
Fri Jan 02 10:54:44 2004
Media Recovery Log D:ORACLEORADATAOBSKEIRARCHIVEOBSKEIRT001S03420.ARC
Media Recovery Log D:ORACLEORADATAOBSKEIRARCHIVEOBSKEIRT001S03421.ARC
Media Recovery Waiting for thread 1 seq# 3422
Fri Jan 02 10:57:02 2004
ALTER DATABASE RECOVER managed standby database cancel
While it sees these archive files, they don't actually get applied!
Does anybody have any suggestions as to the cause?
Hope none of you are not suffering too much of a hangover from new years.
Cheers
Keir Hawker
DBA
|
|
|
Re: Standby Db doesn't apply logs [message #59897 is a reply to message #59895] |
Fri, 02 January 2004 02:59   |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
Hi,
can you do a
select max(sequence#) from v$log_history;
on the standby database and
select max(sequence#) from v$archived_log;
on the production database and give us the o/p.
Are you able to apply the archivelogs manually ? via
sqlplus internal << EOF
recover automatic standby database;
cancel
exit;
EOF
-Thiru
|
|
|
Re: Standby Db doesn't apply logs [message #59898 is a reply to message #59897] |
Fri, 02 January 2004 03:31   |
Keir Hawker
Messages: 8 Registered: September 2003
|
Junior Member |
|
|
Hi Thiru,
Thankyou for getting back so quickly!
Firstly, in response to your queries,
>select max(sequence#) from v$log_history;
Standby DB gives me 3421
>select max(sequence#) from v$archived_log;
Production DB gives me 3422.
So the log is out by one.
Is there any way of syncronising this without recreateing the whole standby DB?
Yes, I am able to apply the archive logs manually which is good in that I can do it, however, I hope that I can get it all automated.
Any help would be great!!
Thankyou in advance.
Keir Hawker
DBA
|
|
|
Re: Standby Db doesn't apply logs [message #59900 is a reply to message #59898] |
Fri, 02 January 2004 03:50   |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
Keir,
It looks like you are FINE!
the standby is lagging the production by only ONE(3422-3421) archived log and thats normal(ie it will be applied soon). BTW did you get these values before you synchronised them manually or after the 'managed standby' applied the logs ? You are not seeing any errors in the alert.log file. You need to worry only if there is a noticable gap between the production and standby and happens often.
You dont have to recreate the standby database to synchronise them.
On 8i,I usually kick off a cronjob that will synchronise the databases,with an intentional time lag(to capture any errors/corruption etc) etc.
HTH
Thiru
|
|
|
|
Re: Standby Db doesn't apply logs [message #155027 is a reply to message #152630] |
Wed, 11 January 2006 16:15  |
prachi23
Messages: 2 Registered: January 2006
|
Junior Member |
|
|
Hi,
Don't know if you managed to resolve this, but on the Primary try issing this:
SQL>alter system set LOG_ARCHIVE_DEST_2='SERVICE=<sid>stby ARCH';
--your environment specific parameters
SQL> select status, error from v$archive_dest where dest_id=2;
STATUS ERROR
----------------------------------------------------------------
VALID
-- it should be Valid. If not there is still a problem
SQL> Alter database set standby database to maximize performance/availability.protection;
--your choice of mode
Hope that helps
Prachi
|
|
|