V$dataguard_stats showing 8 hrs delay between Primary and standby

Hello All,
My Primary and standby database are in sync but v$dataguard_stats on standby server showing 8 hrs delay between Primary and standby.
DB Version:11.2.0.1.0
Server :AIX
Primary:
SQL> select /*+ FULL(c) PARALLEL(c, 35) */ distinct SEQUENCE# "Last Sequence Generated" FROM V$ARCHIVED_LOG c WHERE (THREAD#,FIRST_TIME ) IN (select /*+ FULL(c) PARALLEL(c, 35) */ THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG c GROUP BY THREAD#);
Last Sequence Generated
                   4521
Standby:
SQL> SELECT  APPL.SEQUENCE# "Last Sequence Applied"
FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
  2    3  (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
  4  WHERE ARCH.THREAD# = APPL.THREAD#;
Last Sequence Applied
                 4521
SQL> SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference"
  2  FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
  3  (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE ARCH.THREAD# = APPL.THREAD#;
  4
    Thread Last Sequence Received Last Sequence Applied Difference
         1                   4521                  4521          0
SQL> select name, 'Hours', to_number(substr(value,5,2)) from v$dataguard_stats where name = 'apply lag' ;
NAME                             'HOUR TO_NUMBER(SUBSTR(VALUE,5,2))
apply lag                        Hours                            8------------------------------------------------------------------>>>Problem area

SQL> SELECT status, error
FROM V$ARCHIVE_DEST_STATUS
WHERE STATUS <> 'DEFERRED' AND STATUS <> 'INACTIVE';  2    3
STATUS    ERROR
VALID
VALID
Standby--Generally in Night it happens that primary and standby 'apply lag' is 8/10/4 hrs .When manually checked database are in sync but  v$dataguard_stats showing difference in hrs
NAME                             'AL
SUBSTR(VALUE,1,12)
apply lag                        ALL
+00 04:11:03
SQL> SQL>   2
NAME                             'SECOND TO_NUMBER(SUBSTR(VALUE,11,2))
apply lag                        Seconds                             3
SQL> SQL>   2
NAME                             'MINUTE TO_NUMBER(SUBSTR(VALUE,8,2))
apply lag                        Minutes                           11
SQL> SQL>   2
NAME                             'HOUR TO_NUMBER(SUBSTR(VALUE,5,2))
apply lag                        Hours                            4
SQL> SQL>   2
NAME                             'DAY TO_NUMBER(SUBSTR(VALUE,2,2))
apply lag                        Days                            0

Similar Messages

  • Shared FRA disk between Primary and Standby RAC

    Hello all,
    I need some clarification.  Can a ASM +FRADG shared between RAC 2 nodes 11gR2 Primary and RAC 2 nodes 11gR2 Physical Standby Database in order to use it for backup and recovery on both databases.
    Thank you.

    Hi,
    If you are looking this document:
    http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmcon.htm#OSTMG94055
    Then I understand it that you can use ASM diskgroups only inside same Oracle Clusterware.
    So if you have two separate RAC clusters (two separate Oracle Clusterware) then you cannot share ASM between those.
    And I don't think it would be wise even if it would be possible.
    This is because if one database will fill up your FRA disks then both RAC databases are hold (if you are putting your archivelogs in the FRA).
    Also disk/diskgroup maintenance jobs might be difficult in that kind of configuration.

  • Archive gap between primary and standby

    Hi,
    I've a production environment with 2node RAC with ASM as primary and standalone standby with datafiles stored on the filesystem.
    Always on the standby side, there is only one archive gap on the standby end, it is not applying it even after arrival of the archivelog.
    How to overcome it?
    Thanks

    Hello;
    Depending upon the query you are using "Real time apply" might show as 1 log behind. Is this possible?
    Example from mine :
    STANDBY               SEQUENCE# APPLIED    COMPLETIO                                               
    STANDBY2                 10711 YES        31-MAY-12                                               
    STANDBY2                 10712 YES        31-MAY-12                                               
    STANDBY2                 10713 YES        31-MAY-12                                               
    STANDBY2                 10714 YES        31-MAY-12                                               
    STANDBY2                 10715 YES        31-MAY-12                                               
    STANDBY2                 10716 YES        31-MAY-12                                               
    STANDBY2                 10717 YES        31-MAY-12                                               
    STANDBY2                 10718 YES        31-MAY-12                                               
    STANDBY2                 10719 YES        31-MAY-12                                               
    STANDBY2                 10720 YES        31-MAY-12                                               
    STANDBY2                 10721 YES        31-MAY-12                                               
    STANDBY2                 10722 YES        31-MAY-12                                               
    STANDBY2                 10723 YES        31-MAY-12                                               
    STANDBY2                 10724 YES        31-MAY-12                                               
    STANDBY2                 10725 NO         01-JUN-12     So sequence 10725 is still in progress so it shows 'NO'.
    Can you post the query you are using?
    Best Regards
    mseberg
    Edited by: mseberg on Jun 14, 2012 7:28 AM

  • Switching between Primary and Standby database

    Hi,
    I managed to setup a standby database that is updated by the primary db either when doing a log file switch or when changing the role of the primary db to standby.
    Now I want to put the standby database (that was in primary role for a short period) back into its standby role. I entered
    "Alter database commit to switchover to physical standby with session shutdown;"
    The archived redo logs as well as the control file are updated on the primary database (which was in standby role for the same short period). When I enter
    "Alter database commit to switchover to primary" I am receiving the following error message:
    SQL> alter database commit to switchover to primary;
    alter database commit to switchover to primary
    ERROR at line 1:
    ORA-16139: media recovery required
    After issuing the recovery statement I get this message:
    SQL> recover database
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    At the same time this log entry is written into the alert log:
    Database not available for switchover
    End-Of-REDO archived log file has been received
    Archived log files detected beyond End-Of-REDO
    Incomplete recovery SCN:0:962365 archive SCN:0:977340
    Switchover: Media recovery required - standby not in limbo
    ORA-16139 signalled during: alter database commit to switchover to primary...
    But when I try to use the BACKUP CONTROLFILE statement during recovery I get this error message:
    SQL> recover database using backup controlfile;
    ORA-00283: recovery session canceled due to errors
    ORA-01666: control file is for a standby database
    Although being quite a newbie it's obvious that the primary database (which was standby for a short period) is worried that there are older archived redo logs than online logs. I guess this happens because of the log_archive_dest definition on the standby database :
    *.LOG_ARCHIVE_DEST_3='SERVICE=ORAMPPRD REOPEN=60 MAX_FAILURE=3 LGWR SYNC
    VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORAMPPRD'
    Changes are applied immediately and only written to the archive.
    But how can it be managed that the online redo logs on the primary system are also updated when switching back from standby ???
    Thanks,
    Philipp.

    Thanks, it's working now.
    I think it's important to explizitely follow the steps to switchover standby and primary for it to work. I maybe shutdown the standby to early.
    Cheers,
    Philipp.

  • HA SSO doesnt sync certificates between primary and standby

    Hi,
    Since the HA SSO doesn't sync device certificates, how do I get the certs used to authenticate devices (laptops) onto the standby controller?
    Thanks.

    You need to disable AP SSO and once broken apart, you install the certificate on the HA (secondary).  Once you install the cert and reboot the WLC, then you can enable AP SSO. 
    This is the only way. 

  • How to re-synch primary and standby database?

    Hello everyone,
    Working on 10g R2/windows server 2003, I have configured a physical standby database but, I have an issue, and don't know how to resolve it.
    We were making an update that made some DDL and DML on our application, and for security reason we
    1. we ensure that primary and standby are in sync
    2. We made a cold backup of the primary database
    3. We Deferred the redo shipping between primary and standby
    4. We applied changes on primary database
    But the big issue is that, for any reason my colleague did the following.
    a) made above steps 1,2,3,4
    b) after the update he kept the resulted archived log files generated during to another location
    c) He restore the cold backup before the update(step 2 above)
    c) he applied again the update.
    Now the issue is
    At the first update step(2), the sequence# 553 was applied to the stand by before the update
    At the second update step(c) above another sequence# 553 was created but stored localy in the primary database, because the both servers were deverged (step 3 above).
    Technically both servers cannot be in sync again,because sequence# 553 at the first update has next_change# 80307804 and sequenc# 553 at the second update has next_change# 80461356.
    Question:
    How Can I do to rollback the the first sequence# 553 ( before the first update) on the standby database? in order to apply the sequence#553 generated at the second update and then re-sync both servers to roll forward subsequent sequence#? 554,etc...
    Thank you for your help

    Hello,
    I have just tried the FLASHBACK DATABASE TO SCN XXXXXXXX;
    but it doesn't work.
    Here are steps used from my local dev envirronnment
    From the stand by I retrieved the following information.
    SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# FIRST_TIM NEXT_TIME
    95 707168 707906 15-AUG-08 15-AUG-08
    96 707906 708653 15-AUG-08 15-AUG-08
    97 708653 709359 15-AUG-08 15-AUG-08
    100 710951 711794 15-AUG-08 15-AUG-08
    98 709359 710179 15-AUG-08 15-AUG-08
    99 710179 710951 15-AUG-08 15-AUG-08
    101 711794 712762 15-AUG-08 15-AUG-08
    102 712762 713720 15-AUG-08 15-AUG-08
    103 713720 714748 15-AUG-08 15-AUG-08
    104 714748 715920 15-AUG-08 15-AUG-08
    105 715920 739430 15-AUG-08 15-AUG-08
    106 739430 800525 15-AUG-08 16-AUG-08
    107 800525 875810 16-AUG-08 17-AUG-08
    108 875810 916527 17-AUG-08 18-AUG-08
    SQL> alter database recover managed standby database cancel;
    Database altered.
    SQL> alter database activate standby database; --> prepare to open stby in R/W mode
    Database altered.
    SQL> startup mount force;
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1250428 bytes
    Variable Size 180358020 bytes
    Database Buffers 423624704 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    SQL> alter database set standby database to maximize performance;
    Database altered.
    SQL> alter database open;
    Database altered.
    SQL> startup mount force;
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1250428 bytes
    Variable Size 180358020 bytes
    Database Buffers 423624704 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    Now I tried to mimic the flashback database as in the production, to bring it back to sequence# 105 above
    SQL> flashback database to scn 739430;
    flashback database to scn 739430
    ERROR at line 1:
    ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
    ORA-38761: redo log sequence 75 in thread 1, incarnation 2 could not be
    accessed
    I'm reverted back the physical standby to its function
    SQL> alter database convert to physical standby;
    Database altered.
    SQL> startup mount force;
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1250428 bytes
    Variable Size 180358020 bytes
    Database Buffers 423624704 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    SQL> alter database recover managed standby database using current logfile disconne
    Database altered.
    Verifying if the MRP is up and running: YES see below
    SQL> select message from v$dataguard_status;
    MESSAGE
    ARC0: Archival started
    ARC1: Archival started
    ARC2: Archival started
    ARC3: Archival started
    ARC3: Becoming the 'no FAL' ARCH
    ARC3: Becoming the 'no SRL' ARCH
    ARC1: Becoming the heartbeat ARCH
    Attempt to start background Managed Standby Recovery process
    MRP0: Background Managed Standby Recovery process started
    Managed Standby Recovery starting Real Time Apply
    Clearing online redo logfile 1 C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO11.LOG
    11 rows selected.
    SQL> archive log list;
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination C:\local_destination1_orcl
    Oldest online log sequence 110
    Next log sequence to archive 0
    Current log sequence 110
    So, how can I reslove this issue? without creating the standby from scratch?
    Thanks Again for your help

  • When I connect my electric acoustic through an audio jack to usb there is a delay between playing and recording. Can this be overcome?

    when I connect my electric acoustic through an audio jack to usb there is a delay between playing and recording. Can this be overcome?

    Hi johnbwebster,
    Welcome to the Support Communities!
    The Logic Express 9 Manual shows how to Adjust the "Recording Delay" in the Audio Preferences:
    Click on the link below for more information and screen shots:
    Logic Express 9 User Manual: Audio Preferences in Logic Express
    https://documentation.apple.com/en/logicexpress/usermanual/index.html#chapter=43 %26section=4%26tasks=true
    Cheers,
    - Judy

  • Experiencing Delay Between Midi and Audio MOTU 828 Mk1

    Hi everyone
    Wondering if somebody can point me in the right direction. I'm using an Intel iMac running Leopard 10.5.8 and Logic 8. I just got hold of a MOTU 828 MkI and am experiencing a severe delay between midi and audio.
    Clock source is set to internal in the 828 settings and sample rate is set at 44100, so that's all as it should be.
    I'm at a loss has anybody got any ideas?
    Many thanks.

    Hi,
    I assume MIDI is earlier than audio.
    Do You have plugins in busses and or master outputs?. Try to disable them and see if that still happens.
    Here I had issues with 9.01 that aren`t plugin related and had to reboot to solve it. I upgraded to 9.02 and didn`t see them again (yet.)
    If you HAVE to have your plugins in the busses and master and still want to have your MIDI properly aligned... Well you´re asking too much, my friend. Write a polite letter to Apple telling them if they´re joking calling Pro to this app that can´t keep two basic features in sync. BTW: same happens with video (at leat in L8. Didn`t check 9 with that yet)
    After that, breath deeply and use the input objects to route your midi instruments inside Logic. Then they´ll be in sync, but at the price of loosing all their analog warm. Weird, isn´t it?

  • How to switch between primary and secondary langua...

    Hi guys,
    I've got an e52 but the only way to type in sec. Language while writing a message is:
    Option-> Input Options-> writing language-> primary writing language (which must be changed to new one)
    so there is no use of second. lang. or at least I don't know how to switch quickly between primary and second language without going that path.
    ANY HELP WOULD BE APPRECIATE.
    Aram

    HI Everyone,
    not sure if this helps. My solution is more fo Singpore users.
    As i text between English and Chinese, I was unable to set my Secondary language to Chinese as there is no option to do so in the Writing language menu.
    By discovery, i first set my Primay language as Chinese. Then further down the Language menu there is this option Default input. Click on that and select the default using Text case and select Ok.
    When writing sms, you can switch between this 2 languages using the # key.
    Hope it helps.
    Have a pleasant day.
    Aram_ocp wrote:
    Hi guys,
    I've got an e52 but the only way to type in sec. Language while writing a message is:
    Option-> Input Options-> writing language-> primary writing language (which must be changed to new one)
    so there is no use of second. lang. or at least I don't know how to switch quickly between primary and second language without going that path.
    ANY HELP WOULD BE APPRECIATE.
    Aram

  • Time zone difference between primary and physical standby

    Dear Team,
    We have Primary database server (with EST Time zone) and physical standby (with PST time zone), in case of switch over/fail over to physical standby
    what are the major impacts.
    Is it mandatory to be in time sync?
    Thanks in advance
    Aj

    CURRENT_TIMESTAMP
    04-FEB-10 10.22.20.444692 AM +05:30
    ( above is same on primary and standby)
    SQL> select systimestamp from dual;
    SYSTIMESTAMP
    03-FEB-10 08.52.46.934125 PM -08:00
    (above is 3hr diff from primary and standby)It is 13hrs difference
    One is around Indian subcontinent and other should be in US western region ?
    Systimestamp is the timestamp of the OS of the server and hence the difference and the sysdate value will be from systimestamp and if the applications uses SYSDATE then there can be an issue...

  • Sync config between active and standby CSM

    Is there a way to sync config between active and standby CSMs? Just as one that in CSS.
    How about two SSL Service module in two different 6500 chassis?
    Thanks.

    HI,
    there is right now no command to commit redundancy between two CSM-Modules. Maybe in the future there will be one. Okay in regards of sync the only way is to check for redundancy is the show mod csm x ft command. But be aware that some slight differences like a real not being in service are sometimes not recognized.
    In regards of the SSLModule there is no way as far as I know to sync them. This won't be present in the future in my opinion as there are certificates which require a password or something like that and one won't be able to do redundncy without those passwords. So In my opinion no way to sync two SSL-Module because of security issues.
    Kind regards,
    Joerg

  • Oracle data guard configuration for primary and standby db_name

    I am working on configuring an active data guard for one primary DB and one standby DB. I have a few questions:
    1. Can I use different db_name, db_unique_name and instance_name for primary and standby. For example: primary(db_name, db_unique_name and instance_name)=chicago. When I create standby DB with Rman backup and copy of pfile and control file from primary DB or use Grid control to create standby database. Oracle document or Grid control all keep standby db_name=chicago. Only make standby db_unique_name and instance_name=boston. Due to my application system condition, I want to make db_name=boston, not keep it as the same as primary=chicago. Is this valid configuration?
    2. In primary datafiles, application system generate datafile name like this: hr_chicago_01.dbf, fn_chicago_01.dbf. When I move datafiles to standby server, if I plan to use db_name=boston for standby DB, can I rename datafiles as
    hr_boston_01.dbf, fn_boston_01.dbf? In this way, datafile name match up with db_name. but I will create standby log group and members on primary and standby identically. If in future switching over, DB will not have problems.
    3. If I don't use primary DB backup. Instead, I copy all datafiles, redo_log files (no control files) to standby. Then "alter database backup controlfile to trace" from promary and also " create pfile='/xxx/initSTANDBY.ora' from primary. Then modify init.ora and controlfile. Then run control.sql to bring standby DB up. After that, configure redo log shipping and apply with data guard or SQL. Is this a acceptable way to create physical standby DB?
    Please advise your comments. Thanks in advance.

    I want to make db_name=boston, not keep it as the same as primary=chicago. Is this valid configuration?NO. DB_NAME must be the same ("chicago") at both sites. The Standby will be using a different DB_UNIQUE_NAME (e.g. "boston") and can be using a different Instance name / SID (e.g. "boston").
    can I rename datafiles Yes. The database file names can be changed.
    If I don't use primary DB backup. Instead, I copy all datafiles, redo_log files (no control files) to standbyWhat is the difference between the first sentence (a backup of the primary) and the second sentence (a copy of the primary) ? A Copy is a backup.
    Are you intending to differentiate between an RMAN Backup and a User-Managed (aka "scripted") backup ?
    Normally, for DataGuard, tou can use non-RMAN methods to copy the database but there's no value add in this.
    You'd still have to setup DataGuard ! (and I wonder if you'd have complications setting up Active DataGuard).
    But remember that you MUST create the Standby controlfile from the Primary and copy it over to your Standby -- particularly as you are planning to use DataGuard. This is not created by 'alter database backup controlfile to trace' , but by 'ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'filename''
    Hemant K Chitale

  • Goldengate between active and standby database server

    Hi:
    I want to make goldengate connection between active and standby database servers (bidirectional). is it possible?
    if yes what steps is required rather than active-active connection.
    PLease help!!!
    Regards,
    Abhishek

    What do you mean by "standby" server? If you are referring to a Data Guard standby, how would bidirectional work? That's why one is primary, the other is standby.
    If you are doing A-A, your "standby" is just another master in the N-way master architecture, so you already have a bi-di setup, right? Are you looking to replace Streams with GG?

  • Standby database(11g) was still in sync after stopping the primary and standby database listener.

    Hello !!!
    I have noticed that my standby database(11g) was still in sync after stopping the primary and standby database listener.
    If this is the case then how log is transferring from primary to standby ? it is not using listener service ? kindly clarify

    Read this Metalink Note:407040.1

  • Require 9i Primary and Standby redo logs files same size?

    Hi,
    We have 9.2.0.6 Oracle RAC (2 node) and configured data guard (physical standby).
    I want to increase redo log files size, but i can't this do same time primary and standby side.
    Is there a rule, primary and standby database instances have same size redo log files?
    If I increase only primary redo log files, is there any side effect? However I try this issue on test system. I increased all primary redo log files(if status='INACTIVE' drop redo log group and add redo log group, switch logfile,...)
    , but i couldn't changed standby side. So the system is work well. Is this correct solution or not? How can i increase both sides redo log files?
    Thank you for helps..

    Thank you for your helps.. I found this issue answer:
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1010448
    Consequently, when you add or drop an online redo log file at the primary site, it is important that you synchronize the changes in the standby database by following these steps:
    If Redo Apply is running, you must cancel Redo Apply before you can change the log files.
    If the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO, change the value to MANUAL.
    Add or drop an online redo log file:
    To add an online redo log file, use a SQL statement such as this:
    SQL> ALTER DATABASE ADD LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log' SIZE 100M;
    To drop an online redo log file, use a SQL statement such as this:
    SQL> ALTER DATABASE DROP LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log';
    Repeat the statement you used in Step 3 on each standby database.
    Restore the STANDBY_FILE_MANAGEMENT initialization parameter and the Redo Apply options to their original states.
    bye..

Maybe you are looking for

  • How to tune buffer busy waits in RAC

    Hi, In our environment we se lot of buffer busy waits. How can I tune that. we are using 9i RAC on HACMP. Regards MMU

  • Problem regional formats setting

    Hi all, in my Dashboard I am using the SDK KPI Tile to show some values (but this problem occurs in others components too). In the initial view of my datasource I selected scaling factor 1,000. The KPI Tile should display the value 300 000 as 300 T€.

  • There are some strange problems when i used swc files in my as3 project

    Hello everyone,         My development environment:  fdk4.0,  flash cs5.5,  I publish fla file by using flash cs5.5,   publish setting is  fp version :10.0&10.1 ->swc. I imported swc files to my as3 project and  complied them by using flex sdk4.0. Wh

  • Computer freezes after connecting zen mi

    I formated my computer about a week ago and I didn't connect my micro to computer since then. But today I install everything that is on CD that came with zen micro and when I plug USB cable ito micro the computer freezes. And I mean FREEZES, I have t

  • Problems in activating the structure CI_Aufk for enhancemant CONFPP07 ?

    Hi , I got a requirement for developing a screen exit for transaction co11n ( i used CONFPP07 exit ) so i have added four field in the screen and added four field in  EXIT_SAPLCORU_S_100 --->  CAUFVD -.> CAUFVTAB-> CI_AUFK . now my problem is when i