Physical Standby: Monitor Transport/Apply Lag
Hello Forum
I'm using 10.2.0.3 and my aim is to ensure having a physical standby db (to an two nodes RAC) to switchover/failover to in (hopefully) every disaster.
What are your best practises regarding to monitor transport/apply lag of a physical standby instance (data guard) within Grid control? How many seconds to set the treshold to? Or is there no need to monitor this? I have to say that I was able to achieve my aim in every (rare) disaster in the past.
I saw that there already two metrics in Grid Control (standard = not set).
Currently I got the following values measured:
Apply Lag (seconds): from 0 - 31
Transport Lag (seconds): from 0 - 8
Thanks for your advice
Casi
Hello Forum
I'm using 10.2.0.3 and my aim is to ensure having a physical standby db (to an two nodes RAC) to switchover/failover to in (hopefully) every disaster.
What are your best practises regarding to monitor transport/apply lag of a physical standby instance (data guard) within Grid control? How many seconds to set the treshold to? Or is there no need to monitor this? I have to say that I was able to achieve my aim in every (rare) disaster in the past.
I saw that there already two metrics in Grid Control (standard = not set).
Currently I got the following values measured:
Apply Lag (seconds): from 0 - 31
Transport Lag (seconds): from 0 - 8
Thanks for your advice
Casi
Similar Messages
-
ORA-326/ORA-334 Physical Standby DB - Not applying logs
Hi, all, I have a Dataguard, the primary db is a RAC with three nodes, the standby db is a physical standby. the dataguard are all oracle 10.2.0.3 on solaris 9 sparc system
Now, my standby db did not apply the archivelogs,there are some errors in standby alert log :
Thu Jan 8 15:44:31 2009
Errors in file /oracle/admin/xxxx/bdump/whut_mrp0_12863.trc:
ORA-00326:log begins at change 2984028173, need earlier change 2984013192
ORA-00334:archived log '+DGARCH/whut/3_22648_611942629.dbf'
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Thu Jan 8 15:44:34 2009
Errors in file /export/home/oracle/admin/whut/bdump/whut_mrp0_12863.trc:
ORA-00326:log begins at change 2984028173, need earlier change 2984013192
ORA-00334:archived log '+DGARCH/whut/3_22648_611942629.dbf'
Thu Jan 8 15:44:34 2009
MRP0: Background Media Recovery process shutdown (whut)
and the archivelogs on the standby db like this :
NAME APP DEL
+DGARCH/whut/3_22651_611942629.dbf NO NO
+DGARCH/whut/3_22650_611942629.dbf NO NO
+DGARCH/whut/3_22649_611942629.dbf NO NO
+DGARCH/whut/3_22648_611942629.dbf NO NO
+DGARCH/whut/3_22648_611942629.dbf NO NO
+DGARCH/whut/3_22648_611942629.dbf NO YES
+DGARCH/whut/3_22291_611942629.dbf YES YES
+DGARCH/whut/2_62553_611942629.dbf NO NO
+DGARCH/whut/2_62552_611942629.dbf NO NO
+DGARCH/whut/2_62551_611942629.dbf NO NO
+DGARCH/whut/2_62550_611942629.dbf NO NO
query the first_change# on the standby db like this :
SEQUENCE# FIRST_CHANGE# APP ARC
22646 2983721221 NO YES
22647 2983911304 NO YES
22648 2984028173 NO YES
23813 2984013365 NO YES
23814 2984118027 NO YES
62546 2984027708 NO YES
SEQUENCE# FIRST_CHANGE# APP ARC
62547 2984163823 NO YES
23815 2984132128 NO YES
23816 2984312713 NO YES
62548 2984255538 NO YES
62549 2984312692 NO YES
22649 2984028196 NO YES
23817 2984351070 NO YES
then ,how to fix the dataguard and apply the archivelog on standby db ?
why I can found 2984028173 with 22648,but can not found 2984013192 ??
and why there have three 22648 with different applied status and deleted status on standby db ???
Thanks all.Thank you for your reply.
the trc file like this:
/oracle/admin/xxx/bdump/xxx_mrp0_12863.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /oracle/product/10.2.0/database
System name: SunOS
Node name: stdb
Release: 5.9
Version: Generic_122300-25
Machine: sun4u
Instance name: xxx
Redo thread mounted by this instance: 1
Oracle process number: 27
Unix process pid: 12863, image: oracle@stdb (MRP0)
*** SERVICE NAME:() 2009-01-08 15:44:24.179
*** SESSION ID:(197.3) 2009-01-08 15:44:24.179
ARCH: Connecting to console port...
*** 2009-01-08 15:44:24.180 61287 kcrr.c
MRP0: Background Managed Standby Recovery process started
*** 2009-01-08 15:44:29.191 1103 krsm.c
Managed Recovery: Initialization posted.
*** 2009-01-08 15:44:29.192 61287 kcrr.c
Managed Standby Recovery starting Real Time Apply
Recovery target incarnation = 5, activation ID = 721050634
Influx buffer limit = 152383 (50% x 304766)
Successfully allocated 3 recovery slaves
Using 367 overflow buffers per recovery slave
Start recovery at thread 3 ckpt scn 2984013192 logseq 22648 block 2
*** 2009-01-08 15:44:31.181
Media Recovery add redo thread 3
*** 2009-01-08 15:44:31.181
Media Recovery add redo thread 1
*** 2009-01-08 15:44:31.182
Media Recovery add redo thread 2
*** 2009-01-08 15:44:31.184 1103 krsm.c
Managed Recovery: Active posted.
*** 2009-01-08 15:44:31.838
Media Recovery Log +DGARCH/whut/3_22648_611942629.dbf
*** 2009-01-08 15:44:31.851 61287 kcrr.c
MRP0: Background Media Recovery terminated with error 326
ORA-00326: log begin at 2984028173, need earlier 2984013192
ORA-00334: archivelog: '+DGARCH/whut/3_22648_611942629.dbf'
*** 2009-01-08 15:44:31.851 61287 kcrr.c
Managed Standby Recovery not using Real Time Apply
*** 2009-01-08 15:44:31.851
Media Recovery drop redo thread 3
*** 2009-01-08 15:44:31.851
Media Recovery drop redo thread 1
*** 2009-01-08 15:44:31.851
Media Recovery drop redo thread 2
*** 2009-01-08 15:44:34.269 1103 krsm.c
Managed Recovery: Not Active posted.
ORA-00326: log begin at 2984028173,need earlier 2984013192
ORA-00334: archivelog: '+DGARCH/whut/3_22648_611942629.dbf'
ARCH: Connecting to console port...
*** 2009-01-08 15:44:34.359 61287 kcrr.c
MRP0: Background Media Recovery process shutdown
*** 2009-01-08 15:44:34.359 1103 krsm.c -
Physical stndby doesn'1 apply redo or primary standby didn't transport redo
I setup physical standby (OEL5.0, DB 11.2), every things seem right. But when i create table on primary DB, it does not appear on standby database. The Physical standby doesn'1 apply redo or primary standby didn't transport redo to standby Datadase
Please consider mine configuration
----Standby :
SQL> select database_role, protection_mode, log_mode from v$database;
DATABASE_ROLE PROTECTION_MODE LOG_MODE
PHYSICAL STANDBY MAXIMUM PERFORMANCE ARCHIVELOG
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 38
Next log sequence to archive 40
Current log sequence 40
------Primary :
SQL> select database_role, protection_mode, open_mode from v$database;
DATABASE_ROLE PROTECTION_MODE OPEN_MODE
PRIMARY MAXIMUM PERFORMANCE READ WRITE
SQL> create table test_stby (
2 cot_1 number,
3 cot_2 number);
Table created.
SQL> insert into test_stby values (10,11);
1 row created.
SQL> commit;
Commit complete.
SQL> alter system switch logfile;
System altered.
---- Standby :
SQL> SELECT MAX(SEQUENCE#), THREAD# FROM V$ARCHIVED_LOG GROUP BY THREAD#;
no rows selected
SQL> SELECT PROCESS, STATUS,SEQUENCE#,BLOCK#,BLOCKS,DELAY_MINS FROM V$MANAGED_STANDBY;
PROCESS STATUS SEQUENCE# BLOCK# BLOCKS DELAY_MINS
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
MRP0 WAIT_FOR_LOG 40 0 0 0
- Standby cancel redo apply, open read only and query for table test_stby, it does not have this table
Please help
ChI did solved this problem :)
-
Avoid read-only access at physical standby
Hi!
DB=11.2.0.2
when I start the standby with
SQL> startup
the db is open read-only.
Is there a way to configure the db so that startup command only mounts the db and start redo apply?
this is the config:
DGMGRL> show configuration verbose;
Configuration - w
Protection Mode: MaxPerformance
Databases:
w_01 - Primary database
w_02 - (*) Physical standby database
(*) Fast-Start Failover target
Properties:
FastStartFailoverThreshold = '30'
OperationTimeout = '30'
FastStartFailoverLagLimit = '30'
CommunicationTimeout = '180'
FastStartFailoverAutoReinstate = 'TRUE'
FastStartFailoverPmyShutdown = 'TRUE'
BystandersFollowRoleChange = 'ALL'
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: w_02
Observer: ora
Lag Limit: 30 seconds
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Configuration Status:
SUCCESS
DGMGRL> show database w_02
Database - w_02
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: OFF
Instance(s):
w
Database Status:
SUCCESS
br
DanielIf Data Guard is setup correctly the application is not losing data, you cannot read from it, but it will apply logs:
Ex.
/home/oracle:STANDBY >sqlplus "/ as sysdba"
SQL> select * from BIGSHOW.CUSTOMER;
select * from BIGSHOW.CUSTOMER
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
So even as the SYS user I cannot read from my test user's tables.
ORA-01219 is expected when the standby is in this state.
You can open READ ONLY if you have Active Data Guard, but generally that will cost you extra.
OR, you can do thing to check your data:
To open a standby database for read-only access when it is currently performing managed recovery:
Cancel log apply services:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Open the database for read-only access:
SQL> ALTER DATABASE OPEN READ ONLY;
At some point you have start the recovery again, you probably don't have an issue.
If you want more peace of mind on this you have to setup a test Data Guard system and bang on it.
Best Regards
mseberg -
Data Guard Archive Latency with Physical Standby
I'm trying to get a latency number that tells me how long it took ARCH to move an archive file from the Primary instance to the physical standby instance and "apply it". I see lots of numbers but I can't make heads or tails of them. Does a metric such as this exist in a log file, a V$ view, or can it possibly be calculated or extrapolated?
Thanks
Steve ([email protected])This is how calculated the same in a test env.
1. stop standby listener
2. shutdown standby
3. perform a data load (import)
4. start the standby listener. This will cause arch files to be shipped to the standby. Monitor the files being shipped and time it
5. start the standby db in recovery mode
6. repeatedly execute the following query while timing the log apply services:
SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#; -
Log apply was not sync in physical standby
Hi Gurus,
I am very new to Data Guard , here are few questions , please answer , so that my understanding about DR could be very clear?
This is physical standby database running maximum performance mode , with ARCH as transport service
1.explain below in detail ( standby)
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 60099
Next log sequence to archive 0
Current log sequence 60178
2.where this information is picked from , how it will be updated in stand by before the archived log reached this standby site ?
3.Why there will be more than 1 entry for sequence in v$archived_log (primary) ?
4. One scenario ,
select registrar , sequnce# from v$archived_log ; (primary)
ARCH 60109
ARCH 60171
LGWR 60172
60172 entered the standby site even before the archived logs 600109-601171 reach standby, because REGISTRAR is LGWR
5.Log apply is taking to long time( in-memory ) i.e .sequence is not changing for long time ? How to resolve this?
Please feel free to revert , if any question is unclear
Thanks,
UdayHello;
1.explain below in detail ( standby)
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 60099
Next log sequence to archive 0
Current log sequence 60178Not sure how to comment. Try query in question 2.
2.where this information is picked from , how it will be updated in stand by before the archived log reached this standby site ?Would use something else. Try this query :
http://www.visi.com/~mseberg/monitor_data_guard_transport.html
3.Why there will be more than 1 entry for sequence in v$archived_log (primary) ?Because with Data Guard you have more than one destination for Archive so v$archived_log accounts for them all.
4. One scenario ,
select registrar , sequnce# from v$archived_log ; (primary)
ARCH 60109
ARCH 60171
LGWR 60172
60172 entered the standby site even before the archived logs 600109-601171 reach standby, because REGISTRAR is LGWRNot sure how to comment, what are you trying to do?
5.Log apply is taking to long time( in-memory ) i.e .sequence is not changing for long time ? How to resolve this?
Please feel free to revert , if any question is unclearWhat is a long time? If you force a few log switches on the Primary does it take a long time for each one? Or longer?
Best Regards
mseberg -
How to delete archivelogs once they are applied on Physical Standby
We have 10.2.0.4 Primary and Physical Standby.
According to Note, ID 331924.1, we have
on Primary:
RMAN> SHOW ARCHIVELOG DELETION POLICY;
RMAN configuration parameters are:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
on Standby:
RMAN> SHOW ARCHIVELOG DELETION POLICY;
RMAN configuration parameters are:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
I would like to delete the archivelogs from Primary(as soon as they are applied to standby) as well as from standby and schedule a RMAN script which will run every hourly. The archivelogs are taken on flashback area.
Please guide.Handle: chakra
Status Level: Newbie
Registered: Oct 27, 2006
Total Posts: 107
Total Questions: 56 (46 unresolved)
Name Anirban
Why so many open questions. Close the answered questions, give points and keep forum clean.
Refer the below link
Best Way to monitor standby, primary databases, including alert logs, etc.
Edited by: jazz81 on 10-May-2012 16:38 -
How Real Time Apply works while physical standby is open in Read Only mode
Hi,
With Active data guard option, we can open physical standby DB in read only mode, while redo log are being applied. (Real Time Query)
Standby Redo log (SRL) enables Real Time Apply (with "USING CURRENT LOGFILE" clause in recover database command on standby DB)
I am interested to know, how Real Time Query works ?
What is the mechanism with allows us to open physical standby DB in read only mode while redo logs are being applied continuously ?
Regards,
SujitDear user7419391,
That is a new feature in Oracle Database 11g. MRP can use the real time apply in 10g but the concept here is different.
Taken from the following document;
http://www.ascent.co.za/documents/oracle/Oracle%20databse%2011g%20Active-Data-Guard%20datasheet.pdf
*Unique Advantages of Oracle Active Data Guard*
+Active Data Guard is an evolution of Data Guard technology, providing unique+
+performance advantages while leveraging all other enhancements included in Oracle+
+Data Guard 11g. For example, any Data Guard 11g physical standby database can+
+be easily converted to a Snapshot Standby. A Snapshot Standby is open read-write+
+and is ideally suited as a test system, able to process transactions independent of the+
+primary database. A Snapshot Standby maintains protection by continuing to receive+
+data from the production database, archiving it for later use. When tests are+
+complete, a single command discards changes made while open read-write and+
+quickly resynchronizes the standby database with the primary.+
The other link in the previous post is excellent and you really have to read it to understand the active data guard aspects.
Regards.
Ogan -
Starting a Physical Standby DB which is configured with real-time apply
Hi,
I wanted to get clarification on the correct procedure for starting and stopping a physical standby database. The Dataguard documentation states the following:
1. Start and mount the database:
SQL> STARTUP MOUNT;
2. Start log apply services:
To start Redo Apply, issue the following statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
2> DISCONNECT FROM SESSION;
To start real-time apply, issue the following statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
2> USING CURRENT LOGFILE;
My configuration is using real-time apply based on the information provided by the RECOVERY_MODE column of the V$ARCHIVED_DEST_STATUS view. Should I execute both ALTER statements or just the second one. If only the second one, how will the database re-synchronize, especially after a long down time. Also, must I do anything on the primary database prior to starting up the physical standby?
I'm using Oracle 10g SP1 on a linux server.No. But you can recover until the last arch file generated on the primary, then you cancel the recovery and then use query#2 to start applying real-time. Refer to Note:343424.1 on Metalink.
-
How to identify that my physical standby database in use real time apply?
Hi,
Can any one give me the SQL to identifiy that my physical standby database is in real time applying redo logs?
Its urgen please....
Thanks.You could just look at the alert log. Look for "Recovery of Online Redo Log"
Or you could select from v$standby_apply_snapshot to see if the standby is up-to-date.
select thread#, to_char(snapshot_time,'dd-mon-yyyy:hh24:mi'),
to_char(applied_time,'dd-mon-yyyy:hh24:mi'),
to_char(newest_time,'dd-mon-yyyy:hh24:mi') from V$STANDBY_APPLY_SNAPSHOT; -
Hi Guys,
Just wondering.
For eg, I have a Production Database and a physical standby DB.
Only the physical standby DB has flash back on.
For eg, one day if there's a need for me to restore the production DB from tape (point in time recovery, so need to resetlogs).
Do i need to rebuild the physical standby DB? (from the backup of restored db)
Or can i make use of flash back? If i make use of flash back, i will have to re-create the control file right?
thanksHello;
Within Data Guard can use Flashback for the following :
On the Standby to recover data because of a delay in the apply process.
On the Standby ( Physical ) to open the database in snapshot mode.
On the Primary and Standby to flash the database back in time (if Standby then Primary must flashback too)
On the Primary to recover the database after a failover.If I understand you question correctly you are talking "Incomplete recovery" on the Primary with no Flashback there. So the answer is No, Flashback on the Standby cannot help.
You can correct this by setting up flashback on the Primary.
Best Regards
mseberg -
How to apply Oracle patch when physical standby database in place
Dear All,
I want to apply Oracle patchset 8 on 10.2.0.5 when physical standby database in place. What are the steps for Primary site and for standby site.
Thanks in advance
Kamran LaeeqHi Kamran,
You will not upgrade or patch the standby database by importing offline redologs. On the contrary, there is a procedure to do this. Please note that you will not transitiate the role from standby to primary or startup the database. You will just startup the database by executing "startup mount" and "startup upgrade", during the upgrade. It means that you will not change database role standby to primary and you will be able to continue to the log shipment after the respective upgrade.
But, it is very important that you should stop the log shipment and apply all the offline redologs, before the upgrade. Technically, you can import offline redologs after the upgrade, by changing "compatibility" parameter in oracle, but regarding to my experiences it may cause some problems after you transitiate the role from standby to primary.
In short;
In order to stop log shipment, at the primary site;
alter system set log_archive_dest_state_2=defer;
In order to import all the offline redologs without a delay, at the standby site;
alter database recover managed standby database cancel;
alter database recover managed standby database nodelay disconnect from session;
I hope that I clarified the issue,
Best regards,
Orkun Gedik -
Apply missing log on physical standby database
How to apply the missing log on physical standby database?
I already registered the missing log and started the recovery process.
Still...having log on standby that has status ..not applied.
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# APP
16018 YES
16019 YES
16020 NO ---------------------> Not applied.
16021 YES
ThanksNot much experience doing this, but according to the 9i doc (http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96653/log_apply.htm#1017352), all you need is properly-configured FAL_CLIENT and FAL_SERVER initialization parameters, and things should take care of themselves automatically. Let us know if that doesn't work for you, we might be able to think of something else.
Daniel -
Applying patches to physical standby node(Data Guard 10.2.0.3)
Hello,
I have a data guard 10.2.0.3 environment (1 primary and 1 physical standby on a separate node) on solaris 10 and i want to document the procedure in applying patches to this environment.
I saw the article in Metalink Note 278641.1 which describes the procedure in applying a patchset to both nodes. It looks like both nodes need to be down before applying the oracle patchset.
Can we not apply the patches on only the standby while the primary stays up and running? My guess is you can't if the patches are significant i.e. it changes versions of the oracle binaries. But i want to confirm this.
Also, if we are applying solaris patches, i.e. nothing related to Oracle, we should be able to just apply them to the standby while keeping the primary up and running right?
The following has worked so far but i wanted to find some documentation that confirms it's ok.
1. shutdown oracle on standby node.
2. apply solaris patches...
3. restart oracle on standby node and put in managed recovery mode.
Any comments are appreciated.
Thanks.Hi
Did you get an answer for your question yet? I have the same problem with one of our databases. Would be very nice, if you could tell me.
Regards
Felix -
Monitoring Physical standby database through OEM
HI ,
We are monitoring Physical standby database through OEM and we monitor from console using SYS user
As per our company policy we change our sys password every month so after change it we need to change SYS password from console also
so is any way we can change SYS password on console using command line utility? if yes then please give us the command
Thankswe monitor from console using SYS userYou have to monitor it using a SYSDBA user not necessarily SYS. So you can create a user e.g. SYS_MONITOR which has different policy than SYS. Although it is best to change that password on regular bases too, maybe every 3 months.
so is any way we can change SYS password on console using command line utility?I don't get your question. Are you asking if it is possible to change the monitoring username/password using some command line utility? If so, I haven't heard of such tool. But there could be a package like MGMT_TARGET which you can manipulate the credentials if you know how to use it.
Maybe you are looking for
-
Update to RoboHelp Dropping all Files/Content
Hi, My colleague has now encountered the same problem as I described here: http://forums.adobe.com/message/5300528#5300528 Here is the content of her report: "A similar problem that happened earlier to Derek is now happening to me. I was generating t
-
My Photo is missing after iCloud restore
Before I restore my iPhone i see all of my photo is keep in my Photo steam but after i restore my phone with iCloud.My photo is missing Thank you
-
hi Friends, In the Actions infotype , in the Customer Specific Status, we have given some customer specific status ......which is coming in the drop-down but the field is grayed & we are not able to select the inputs from drop-down....... how can we
-
Unicode error :MESSAGEG-I
Hi , Please check below code: select-options: s_re for VARI-REPORT, s_var for VARI-VARIANT. message e001(zg) with s_var+3 s_rep+3. I am getting error :<b>The sum of the offset and length (=34) exceeds the length of the start (=31) of t
-
Sliding images off the screen with javafx
I am writing my first javafx app and I am trying to get images to slide on and off the screen. I have accomplished this to some degree using the below code. the problem is that the images slide off just fine but when they come back on they stop befor