Applied_time

How to find applied_time in standby database managed recovery mode (*PHYSICAL STANDBY*).
Regards
Murali R

hi,
see,
SELECT to_char(COMPLETION_TIME,'dd-mon-yyyy hh24:mi:ss') FROM V$ARCHIVED_LOG WHERE APPLIED='YES';run this on both side(primary,standby) will give you the difference.
thanks
Edited by: abdul_ora on Sep 10, 2012 4:20 PM

Similar Messages

  • Logical standby stopped lastnight

    Subject: Logical standby stopped lastnight
    Author: raghavendra rao yella, United States
    Date: Nov 14, 2007, 0 minutes ago
    Os info: solaris 5.9
    Oracle info: 10.2.0.3
    Error info: ORA-16120: dependencies being computed for transaction at SC
    N 0x0002.c8f6f182
    Message: Our logical standby stopped last night. we tried to stop and start the standby but no help.
    Below are some of the queries to get the status:
    APPLIED_SCN LATEST_SCN MINING_SCN RESTART_SCN
    11962328446 11981014649 11961580453 11961536228
    APPLIED_TIME LATEST_TIME MINING_TIME RESTART_TIME
    07-11-13 09:09:41 07-11-14 10:26:26 07-11-13 08:57:53 07-11-13 08:56:36
    sys@RP06>SELECT TYPE, HIGH_SCN, STATUS FROM V$LOGSTDBY;
    TYPE HIGH_SCN STATUS
    COORDINATOR 1.1962E+10 ORA-16116: no work available
    READER 1.1962E+10 ORA-16127: stalled waiting for additional transact
    ions to be applied
    BUILDER 1.1962E+10 ORA-16127: stalled waiting for additional transact
    ions to be applied
    PREPARER 1.1962E+10 ORA-16127: stalled waiting for additional transact
    ions to be applied
    ANALYZER 1.1962E+10 ORA-16120: dependencies being computed for transac
    tion at SCN 0x0002.c8f6c002
    APPLIER ORA-16116: no work available
    APPLIER ORA-16116: no work available
    APPLIER ORA-16116: no work available
    APPLIER ORA-16116: no work available
    APPLIER ORA-16116: no work available
    10 rows selected.
    Select PID,
    TYPE,
    STATUS
    From
    V$LOGSTDBY
    Order by
    HIGH_SCN; 2 3 4 5 6 7 8
    PID TYPE STATUS
    17896 ANALYZER ORA-16120: dependencies being computed for transaction at SC
    N 0x0002.c8f6f182
    17892 PREPARER ORA-16127: stalled waiting for additional transactions to be
    applied
    17890 BUILDER ORA-16243: paging out 8144 bytes of memory to disk
    17888 READER ORA-16127: stalled waiting for additional transactions to be
    applied
    28523 COORDINATOR ORA-16116: no work available
    17904 APPLIER ORA-16116: no work available
    17906 APPLIER ORA-16116: no work available
    17898 APPLIER ORA-16116: no work available
    17900 APPLIER ORA-16116: no work available
    17902 APPLIER ORA-16116: no work available
    10 rows selected.
    How can i get this transaction information, which log miner is looking for dependencies?
    Let me know if you have any questions.
    Thanks in advance.
    Message was edited by:
    raghu559

    Hi reega,
    Thanks for your reply, our logical stdby has '+RT06_DATA/RT06'
    and primary has '+OT06_DATA/OT06TSG001'
    so we are using db_file_name_convert init parameter but it doesn't work.
    Is there any thing particular steps hiding to use this parameter? as i tried this parameter for rman cloning it din't work, as a workaround i used rman set new name command for clonning.
    Let me know if you have any questions.
    Thanks in advance.

  • How to apply the changes in logical standby database

    Hi,
    I am new to Dataguard. I am now using 10.2.0.3 and followed the steps from Oracle Data Guard Concepts and Administration Guide to setup a logical standby database.
    When I insert a record to a table from the primary database side, when i query the same table from the logical standby database, it doesn't show the new records.
    Did I miss something? What I want to do is when I insert a record in the primary db, then the corresponding record will be inserted in the standby db.
    Or I totally misunderstand what Oracle data guard is? Any help are appreciated.
    Denis

    Hi
    Can anyone help to answer me is my logical standby db have a archive gap?
    SQL> SELECT APPLIED_SCN, APPLIED_TIME, READ_SCN, READ_TIME, NEWEST_SCN, NEWEST_T
    IME FROM DBA_LOGSTDBY_PROGRESS;
    APPLIED_SCN APPLIED_TIME READ_SCN READ_TIME NEWEST_SCN
    NEWEST_TIME
    851821 29-JUL -08 17:58:29 851822 29-JUL -08 17:58:29 1551238
    08-AUG -08 08:43:29
    SQL> select pid, type, status, high_scn from v$logstdby;
    no rows selected
    SQL> alter database start logical standby apply;
    Database altered.
    SQL> select pid, type, status, high_scn from v$logstdby;
    PID
    TYPE
    STATUS HIGH_SCN
    2472
    COORDINATOR
    ORA-16116: no work available
    3380
    READER
    ORA-16127: stalled waiting for additiona 852063
    l transactions to be applied
    2480
    BUILDER
    ORA-16116: no work available
    2492
    ANALYZER
    ORA-16111: log mining and apply setting
    up
    2496
    APPLIER
    ORA-16116: no work available
    2500
    APPLIER
    ORA-16116: no work available
    3700
    APPLIER
    ORA-16116: no work available
    940
    APPLIER
    ORA-16116: no work available
    2504
    APPLIER
    ORA-16116: no work available
    9 rows selected.
    Thanks a lot.
    Message was edited by:
    Denis Chan

  • Slow SQL Apply on Logical Standby Database in Oracle10g

    Hi,
    We are using Oracle 10g Logical Standby database in our production farm but whenever there is bulk data load (5-6 GB data) on the primary database, the logical standby seems to be hung. It takes days to apply the 5-6 GB data on the logical standby.
    Can anybody give me some pointers how can I make my SQL Apply fast on the logical standby for bulk data.
    Thanks
    Amit

    Hi there,
    I've a similar problem. I did an insert of 700k on a table. It takes me over 1 1/2 hours to see the data. Notice, I increased the "max_sga" to 300m and "max_servers" to 25" and didn't help the performance at all.
    My version is 10.2.0.3 with the patch 6081550.
    APPLIED_SCN APPLIED_TIME RESTART_SCN RESTART_TIME LATEST_SCN LATEST_TIME MINING_SCN MINING_TIME
    1015618 29-NOV-2007 18:28:51 1009600 29-NOV-2007 18:28:51 1017519 29-NOV-2007 19:54:07 1015656 29-NOV-2007 18:32:14

  • Logical standby not synced with primary!

    Dear All,
    I am in a new environment. Oracle 10g database is running on windows 2003 server. This is the primary database and there is a logical database 10gR2 also on windows.
    Since yesterday all SCN were applied on standby and it was 100% synced with production.
    Just not I have seen quering this view  "SELECT APPLIED_SCN, NEWEST_SCN, NEWEST_SCN-APPLIED_SCN LAG, READ_SCN, APPLIED_TIME FROM DBA_LOGSTDBY_PROGRESS;
    That the last update was on 9/30/2013 7:56
    This is a new environment for me, where should i start troubleshooting from?
    Kindly help
    Regards

    Hi, This is what I have found in alert log file
    LOGSTDBY stmt: ALTER USER KAMRAN IDENTIFIED BY  VALUES '***************'
    LOGSTDBY status: ORA-28007: the password cannot be reused
    LOGSTDBY id: XID 0x0009.014.0016c1e2, hSCN 0x0000.7bfb3c98, lSCN 0x0000.7bfb3c98, Thread 1, RBA 0x53a56.0000023d.144, txnCscn 0x0000.7bfb3c9c, PID 320, ORACLE.EXE (P004)
    LOGSTDBY Apply process P004 pid=21 OS id=320 stopped
    Mon Sep 30 07:57:04 2013
    Errors in file c:\oracle\ora10gr2\admin\logstby\bdump\logstby_lsp0_2532.trc:
    ORA-12801: error signaled in parallel query server P004
    ORA-28007: the password cannot be reused
    LOGSTDBY Analyzer process P003 pid=26 OS id=2704 stopped
    LOGSTDBY Apply process P007 pid=30 OS id=2412 stopped
    LOGSTDBY Apply process P008 pid=31 OS id=2656 stopped
    LOGSTDBY Apply process P006 pid=29 OS id=2676 stopped
    LOGSTDBY Apply process P005 pid=28 OS id=2688 stopped
    Mon Sep 30 08:00:39 2013""
    Since this command was issued on standby the sync process is stoped.
    When i query :
    SEQUENCE#, FIRST_TIME, APPLIED FROM DBA_LOGSTDBY_LOG ORDER BY SEQUENCE#; I get
    Row# SEQUENCE# FIRST_TIME APPLIED
    33 342614 9/30/2013 7:56:11 AM CURRENT
    34 342615 9/30/2013 8:00:39 AM NO
    Please help

  • Delay=60 not working in 11.2.0.2 Data Guard

    Hi Friends,
    I am using 11.2.0.2 Data Guard.
    I had set Delay=60 for Standby Database in init parameters of Primary Database and bounced both Primary and Standby DB.
    But as soon as i perform log switch in Primary DB it is being applied in Standby DB immediately ignoring my Delay parameter.
    The Physical Standby is mounted and redo apply is enabled.
    Please let me know the reason.
    Parameters:
    LOG_ARCHIVE_DEST_1=
    'LOCATION=/data/dg/arch1/chicago/
    VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
    DB_UNIQUE_NAME=chicago'
    LOG_ARCHIVE_DEST_2=
    'SERVICE=boston ASYNC DELAY=60
    VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
    DB_UNIQUE_NAME=boston'
    LOG_ARCHIVE_DEST_STATE_1=ENABLE
    LOG_ARCHIVE_DEST_STATE_2=ENABLE
    Standby:
    SEQUENCE# APPLIED
    1208 YES
    1209 YES
    1210 YES
    1211 YES
    1212 YES
    1213 YES
    1214 YES
    1215 YES
    1216 IN-MEMORY
    Regards,
    DB

    Hello;
    There must be some small mistake.
    Test
    Release 11.2.0.3.0
    Test of Sync before
    DB_NAME    HOSTNAME       LOG_ARCHIVED LOG_APPLIED APPLIED_TIME   LOG_GAP
    PRIMARY    MYHOST                  221         221 20-MAR/08:33         0
    1 row selected.
    Setting of log_archive_dest_n
    log_archive_dest_2='SERVICE=STANDBY LGWR ASYNC DELAY=90 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STANDBY'Perform several log switches
    Check the time
    SQL> !date
    Wed Mar 20 08:44:15 CDT 2013
    Changes to Standby = None
    Query used to check apply :
    http://www.visi.com/~mseberg/data_guard/monitor_data_guard_transport.html
    Check the time again
    SQL> !date
    Wed Mar 20 08:49:45 CDT 2013
    Test of Sync after
    DB_NAME    HOSTNAME       LOG_ARCHIVED LOG_APPLIED APPLIED_TIME   LOG_GAP
    PRIMARY    MYHOST                  226         221 20-MAR/08:33         5
    1 row selected.Works.
    Test after 10 minutes
    SQL> !date
    Wed Mar 20 08:54:54 CDT 2013
    DB_NAME    HOSTNAME       LOG_ARCHIVED LOG_APPLIED APPLIED_TIME   LOG_GAP
    PRIMARY    MYHOST                  226         221 20-MAR/08:33         5
    1 row selected.
    half hour check
    SQL> !date
    Wed Mar 20 09:16:25 CDT 2013
    DB_NAME    HOSTNAME       LOG_ARCHIVED LOG_APPLIED APPLIED_TIME   LOG_GAP
    PRIMARY    MYHOST                    226         221 20-MAR/08:33         5
    1 row selected.
    Much later after the delay has past the logs are applied as expected.
    SQL> !date
    Wed Mar 20 12:12:53 CDT 2013
    DB_NAME    HOSTNAME       LOG_ARCHIVED LOG_APPLIED APPLIED_TIME   LOG_GAP
    PRIMARY    MYHOST                   226         226 20-MAR/08:44         0
    1 row selected.
    Standby alert log
    Media Recovery Delayed for 88 minute(s) (thread 1 sequence 222)
    Wed Mar 20 10:01:12 2013
    Media Recovery Log /u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2013_03_20/o1_mf_1_222_8nmgnnjk_.arc
    Media Recovery Log /u01/app/oracle/flash_recovery_area/STANDBY/archivelog/2013_03_20/o1_mf_1_223_8nmgno26_.arc
    Media Recovery Delayed for 89 minute(s) (thread 1 sequence 224)Best Regards
    mseberg

  • Archived log files not registered in the Database

    I have Widows Server 2008 R2
    I have Oracle 11g R2
    I configured primary and standby database in 2 physical servers , please find below the verification:
    I am using DG Broker
    Renetly I did failover from primary to standby database
    Then I did REINSTATE DATABASE to returen the old primary to standby mode
    Then I did Switchover again
    I have problem that archive logs not registered and not imeplemented.
    SQL> select max(sequence#) from v$archived_log; 
    MAX(SEQUENCE#)
             16234
    I did alter system switch logfile then I ssue the following statment to check and I found same number in primary and stanbyd has not been changed
    SQL> select max(sequence#) from v$archived_log;
    MAX(SEQUENCE#)
             16234
    Any body can help please?
    Regards

    Thanks for reply
    What I mean after I do alter system switch log file, I can see the archived log files is generated in the physical Disk but when
    select MAX(SEQUENCE#) FROM V$ARCHIVED_LOG;
    the sequence number not changed it should increase by 1 when ever I do switch logfile.
    however I did as you asked please find the result below:
    SQL> alter system switch logfile;
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> SELECT DB_NAME,HOSTNAME,LOG_ARCHIVED,LOG_APPLIED_02,LOG_APPLIED_03,APPLIED_TIME,LOG_ARCHIVED - LOG_APPLIED_02 LOG_GAP_02,
      2  LOG_ARCHIVED - LOG_APPLIED_03 LOG_GAP_03
      3  FROM (SELECT NAME DB_NAME FROM V$DATABASE),
      4  (SELECT UPPER(SUBSTR(HOST_NAME, 1, (DECODE(INSTR(HOST_NAME, '.'),0, LENGTH(HOST_NAME),(INSTR(HOST_NAME, '.') - 1))))) HOSTNAME FROM V$INSTANCE),
      5  (SELECT MAX(SEQUENCE#) LOG_ARCHIVED FROM V$ARCHIVED_LOG WHERE DEST_ID = 1 AND ARCHIVED = 'YES'),
      6  (SELECT MAX(SEQUENCE#) LOG_APPLIED_02 FROM V$ARCHIVED_LOG WHERE DEST_ID = 2 AND APPLIED = 'YES'),
      7  (SELECT MAX(SEQUENCE#) LOG_APPLIED_03 FROM V$ARCHIVED_LOG WHERE DEST_ID = 3 AND APPLIED = 'YES'),
      8  (SELECT TO_CHAR(MAX(COMPLETION_TIME), 'DD-MON/HH24:MI') APPLIED_TIME FROM V$ARCHIVED_LOG WHERE DEST_ID = 2 AND APPLIED = 'YES');
    DB_NAME HOSTNAME           LOG_ARCHIVED   LOG_APPLIED_02    LOG_APPLIED_03     APPLIED_TIME     LOG_GAP_02      LOG_GAP_03
    EPPROD  CORSKMBBOR01     16252                  16253                        (null)                      15-JAN/12:04                  -1                   (       null)

  • Sync of Primary and Standby

    Hi,
    SQL> select database_role from v$database;
    DATABASE_ROLE
    PRIMARY
    SQL> select applied,status from v$archived_log where applied='NO' and status='A';
    APP S
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    APP S
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    NO A
    18 rows selected.
    SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
    no rows selected
    On my standby
    SQL> select database_role from v$database;
    DATABASE_ROLE
    PHYSICAL STANDBY
    SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
    no rows selected
    IS my primary in sync with standby, if "yes", why am I getting the applied status as "NO" from v$archived_log
    Thanks

    OK
    If you run this :
    select applied,status from v$archived_log where applied='NO' and status='A';  -- Available On the Primary side you won't get "Applied".
    One option is to run something like this on the Primary changing SYSDATE and DEST_ID as needed. :
    SELECT 
      NAME AS STANDBY,
      SEQUENCE#,
      APPLIED,
      COMPLETION_TIME
    FROM
      V$ARCHIVED_LOG
    WHERE 
      DEST_ID = 2
    AND
      NEXT_TIME > SYSDATE -1;
      You can also add DEST_ID to the SELECT statement and take it out of the WHERE clause to get a better idea how V$ARCHIVED_LOG works.
    SELECT 
      NAME AS STANDBY,
      SEQUENCE#,
      APPLIED,
      COMPLETION_TIME,
      DEST_ID
    FROM
      V$ARCHIVED_LOG
    AND
      NEXT_TIME > SYSDATE -1;
      V$ARCHIVE_GAP has never helped me with gaps. For some reason I have alway gotton the same results as you, "no rows selected" .
    This query ( again run from the Primary ) covers a lot of ground because it tells you in a single line
    the last Sequence number, the last applied, the applied time and size of gap ( so zero is good )
    SET PAGESIZE 140
    COL DB_NAME FORMAT A10
    COL HOSTNAME FORMAT A14
    COL LOG_ARCHIVED FORMAT 999999
    COL LOG_APPLIED FORMAT 999999
    COL LOG_GAP FORMAT 9999
    COL APPLIED_TIME FORMAT A14
    SELECT
       DB_NAME, HOSTNAME, LOG_ARCHIVED, LOG_APPLIED, APPLIED_TIME, LOG_ARCHIVED-LOG_APPLIED LOG_GAP
    FROM
    ( SELECT
       NAME DB_NAME
    FROM
       V$DATABASE
    SELECT
       UPPER(SUBSTR(HOST_NAME,1,(DECODE(INSTR(HOST_NAME,'.'),0,LENGTH(HOST_NAME), (INSTR(HOST_NAME,'.')-1))))) HOSTNAME
    FROM
       V$INSTANCE
    SELECT
       MAX(SEQUENCE#) LOG_ARCHIVED
    FROM
       V$ARCHIVED_LOG
    WHERE
       DEST_ID=1
    AND
       ARCHIVED='YES'
    SELECT
       MAX(SEQUENCE#) LOG_APPLIED
    FROM
       V$ARCHIVED_LOG
    WHERE
       DEST_ID=2
    AND
       APPLIED='YES'
    SELECT
       TO_CHAR(MAX(COMPLETION_TIME),'DD-MON/HH24:MI') APPLIED_TIME
    FROM
       V$ARCHIVED_LOG
    WHERE
       DEST_ID=2
    AND
       APPLIED='YES'
    );Try some of these and see if they help you.
    Best Regards
    mseberg

  • Facing issues in standby database

    standby database is in sync but when we say archive log list "Current log sequence " and "Oldest online log sequence" are not geting updated
    even though archives are getting applied.
    Solution :- We can create new standby controlfile in order to get those archive sync .
    Question :- why we are still receiving alert log errors when the standby database is running in Max performance? We have these standby files from so many days but  recently we are able to see these errors
    Any help regarding this is much appreciate.
    SQL> archive log list;
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination /ofa/u001/PRMAN/app/oracle/admin/arch
    Oldest online log sequence 179147
    Next log sequence to archive 0
    Current log sequence 179149
    Standby alert log error message:-
    Media Recovery Log /ofa/u001/PRMAN/app/oracle/admin/arch/1_189733_608563408.dbf
    Clearing online log 6 of thread 0 sequence number 0
    Errors in file /ofa/u001/PRMAN/app/oracle/admin/diag/rdbms/prmangfd/PRMAN/trace/PRMAN_ora_18720.trc:
    ORA-00367: checksum error in log file header
    ORA-00315: log 6 of thread 0, wrong thread # 1 in header
    ORA-00312: online log 6 thread 0: '/ofa/u001/PRMAN/oradata/redologs1/stbyredo03.log'
    RFS[16]: Opened log for thread 1 sequence 189734 dbid 1005584078 branch 608563408
    Media Recovery Waiting for thread 1 sequence 189734 (in transit)
    Mon Jul 29 12:06:03 2013
    Archived Log entry 13297 adde
    Trace file info:-
    ORA-00367: checksum error in log file header
    ORA-00315: log 6 of thread 0, wrong thread # 1 in header
    ORA-00312: online log 6 thread 0: '/ofa/u001/PRMAN/oradata/redologs1/stbyredo03.log'
    DDE rules only execution for: ORA 312
    Standby sync status:-
    DB_NAME HOSTNAME LOG_ARCHIVED LOG_APPLIED APPLIED_TIME LOG_GAP
    PRMAN GFDHP122 176449 189700 29-JUL/10:29 -13251
    Primary:-
    DB_NAME HOSTNAME LOG_ARCHIVED LOG_APPLIED APPLIED_TIME LOG_GAP
    PRMAN NGMHP121 189702 189700 29-JUL/10:41 2
    standby redo logs :-
    select group#, dbid, thread#, blocksize,used, status, sequence# from v$standby_log
    GROUP# DBID THREAD# BLOCKSIZE USED STATUS SEQUENCE#
    4 UNASSIGNED 0 1024 0 UNASSIGNED 0
    5 UNASSIGNED 0 1024 0 UNASSIGNED 0
    6 UNASSIGNED 0 1024 0 UNASSIGNED 0
    Members of standby redo log file:-
    select * from v$logfile where type='STANDBY'
    SQL> /
    GROUP# STATUS TYPE MEMBER IS_
    4 STANDBY /ofa/u001/PRMAN/oradata/redologs1/stbyredo01.log NO
    5 STANDBY /ofa/u001/PRMAN/oradata/redologs1/stbyredo02.log NO
    6 STAND
    Thanks,
    Kumar Dharamoni

    Hello;
    I think I would try to clear the log :
    Example
    ALTER DATABASE CLEAR LOGFILE GROUP 3;
    Do this for any groups you are having this issue with.
    Best Regards
    mseberg

  • Help! 10g logical standby not replicating "create table" on standby

    Hi,
    I'm setting up a logical standby environment and everything works, except when I tried to create a simple table on the primary, the table doesn't show up on the standby. I tried creating a new tablespace on the primary and it shows up right away on the standby. I checked the error logs on both primary and standby and no errors.
    create table test1 (id number(10) primary key, col1 varchar(20), col2 varchar(20));
    The table is created successfully on primary and I also inserted couple of rows and all committed.
    I even tried the following query on the standby to check any failed events and the "create table" DDL doesn't show up , even if it failed:
    select event_time, status, event from dba_logstdby_events order by event_timestamp, commit_scn
    So I'm now confused. The logical standby is active and applying. What would be the issue? How do I find out ?
    Thanks

    had you started apply using this syntax
    real time apply
    alter database start logical standby apply immediate;
    check lag:
    alter session set nls_date_format='dd/mm hh24:mi';
    select newest_time || chr(22)|| newest_scn||chr(10)||applied_time||chr(22)||applied_scn||chr(13)||chr(16)||(newest_scn-applied_scn) lag from dba_logstdby_progress
    /

  • Logical Standby Apply became TOO SLOW !!

    Hi,
    I recently have setup a logical standby database. Everything was fine until the apply procedure on the standby became too slow:
    SQL> alter session set nls_date_format = 'HH24:MI:SS (MM/DD)';
    Session altered.
    SQL> SELECT APPLIED_SCN, APPLIED_TIME, READ_SCN, READ_TIME, NEWEST_SCN, NEWEST_TIME FROM DBA_LOGSTDBY_PROGRESS;
    APPLIED_SCN APPLIED_TIME READ_SCN READ_TIME NEWEST_SCN
    NEWEST_TIME
    3036960310 18:33:28 (05/31) 3035938077 18:12:43 (05/31) 3060387972
    16:30:16 (06/02)
    SQL>
    The applied time changed about 20 minutes during last 46 hours. v$logstdby says:
    COORDINATOR: ORA-16116: no work available
    READER, BUILDER and PREPARER: ORA-16127: stalled waiting for additional transactions to be applied
    All APPLIERs: ORA-16116: no work available
    I really don't have any idea about this issue. Any help will be appreciated.
    regards

    One reason could be the SQL Apply engine performs too many slow full table scans, check metalink note:
    Determining if SQL Apply Engine is Performing Full Table Scans
    Doc ID: Note:255958.1
    If this is the reason for the slowness you have to tune your DML statements.
    Werner

  • Data file time stamp on Logical Standby

    Dear All,
    My Logical Standby Database that is Oracle 10gR2 on Wondows 2003 Server is fully synced with the production database.
    If i query number of records on Logical Standby they are the same as on production.
    And when i query applied_time from dba_logstby_progress view, there is hardly a difference of second since I have configured real time apply.
    BUT the date and time stamp of my data files and index files on Logical Standby is more than 12 days old.
    I am confused, why this its like this. Is there any workout to fix that? Is it normal? or what?
    Kindly help.
    Regards, Imran

    misterimran wrote:
    Dear All,
    My Logical Standby Database that is Oracle 10gR2 on Wondows 2003 Server is fully synced with the production database.
    If i query number of records on Logical Standby they are the same as on production.
    And when i query applied_time from dba_logstby_progress view, there is hardly a difference of second since I have configured real time apply.
    BUT the date and time stamp of my data files and index files on Logical Standby is more than 12 days old.
    I am confused, why this its like this. Is there any workout to fix that? Is it normal? or what?
    Kindly help.
    Regards, Imran
    Is there any workout to fix that?
    Who said it is something to "fix"?

  • 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;

  • Standby database not applying archivelogs, manually apply after registering

    Hi
    I have a small problem with physical standby db.
    Standby db was created and it was working fine, was applying logs with no problem. One day I had to switch it to read only mode, it stayed in this mode for quiet a while. Then there was a problem with space for archive logs. I fixed this, copied missing logs, registered them and these were applied.
    And then database stopped on the sequence which was automatically registered by primary database.
    v$managed_standby:
    PROCESS STATUS CLIENT_P SEQUENCE# DELAY_MINS BLOCK#
    ARCH CLOSING ARCH 19667 0 126977
    ARCH CLOSING ARCH 19668 0 133121
    MRP0 WAIT_FOR_LOG N/A 19600 0 0
    As you can see there is WAIT_FOR_LOG sequence 19600 which should be applied, which is in the directory, to which oracle user has rights to read etc, etc.
    Only way to force database to apply this log is to manually register it, but I have to add "or replace", because file is already registered.
    /path/dbsid1_19600_668777138.log 2 19600 YES NO NO A 28-OCT-09 28-OCT-09
    alter database register or replace physical logfile '/path/dbsid1_19600_668777138.log';
    After this I have:
    /path/dbsid_19600_668777138.log 2 19600 YES NO NO A 28-OCT-09 28-OCT-09
    /path/dbsid_19600_668777138.log 0 19600 YES YES NO A 29-OCT-09 28-OCT-09
    Registering this file causes applying at once.
    In pfile on primary:
    log_archive_dest_2 string SERVICE=DRSTDB2 ARCH DELAY=2880
    Pay attention - destination 2.
    Question is obvious - why logs are not applied automatically?
    Why logs ARE applying manually but the DEST_ID is set to 0?
    There was no major structure change in primary, besides - logs are applied after all. Bouncing the database doesn't give me any good, switching to readonly and back to recovery mode neither.
    Please can you help? I can build this standby again but this is not a solution.
    Any additional info on request.
    Regards
    Jarek Jozwik
    Edited by: user11281267 on 30-Oct-2009 06:15

    You haven't given any usefuly information on your problem.
    show parameter log_archive_dest
    show parameter fal
    show parameter dg
    What errors are in your alert logs ?
    What command are you using to recover ?
    Check the contents of v$archived_log
    # run on primary to detect failures :-
    select destination, status, fail_date, valid_now
    from v$archive_dest
    where status != 'VALID' or VALID_NOW != 'YES';
    # run on standby to get exact position of rollforward :-
    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;
    Are you using dataguard broker ?

  • Recovery process applies old archivelogs on standby database

    Right now my standby database is in sync with my primary database and is waiting for the archived log sequeuence# 8378 to arrive.
    But when I stop the recovery process (alter database recover managed standby database cancel;) and re-start it (alter database recover managed standby database disconnect), it starts all over again and starts applying archive logs starting from the sequence# 5739 (looks like its scanning thru the logs). To catchup with primary it takes 2+ hours as it need to skim thru all the logs starting from 5739 to 8377.
    Please let me know if you need any further information to fix this.
    Thank you
    Sunny boy
    Details:
    Database version: 11.2.0.3
    OS : RHEL 5
    On Standby Database
    SQL> SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG"
    FROM V$LOG_HISTORY
    GROUP BY THREAD#; 2 3
    THREAD# LAST_APPLIED_LOG
    1 8377
    Alert log
    alter database recover managed standby database disconnect
    Attempt to start background Managed Standby Recovery process (MNODWDR)
    Tue May 08 16:13:09 2012
    MRP0 started with pid=28, OS id=26150
    MRP0: Background Managed Standby Recovery process started (MNODWDR)
    started logmerger process
    Tue May 08 16:13:15 2012
    Managed Standby Recovery not using Real Time Apply
    Parallel Media Recovery started with 8 slaves
    Waiting for all non-current ORLs to be archived...
    All non-current ORLs have been archived.
    Completed: alter database recover managed standby database disconnect
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/arch/mnodw_1_5739_765032423.arc
    Tue May 08 16:13:48 2012
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5740.1466.781015749
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5741.1468.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5742.1474.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5743.1473.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5744.1477.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5745.1478.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5746.1472.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5747.1475.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5748.1469.781017203
    Media Recovery Log +MNODW_FRA_GRP/mnodwdr/archivelog/2012_04_19/thread_1_seq_5749.1470.781017203
    Tue May 08 16:13:57 2012
    Edited by: Sunny boy on May 8, 2012 5:29 PM

    Hello;
    V$LOG_HISTORY is the information from the control file. I would use a different query to check :
    From the Primary :
    SET PAGESIZE 140
    COL DB_NAME FORMAT A10
    COL HOSTNAME FORMAT A14
    COL LOG_ARCHIVED FORMAT 999999
    COL LOG_APPLIED FORMAT 999999
    COL LOG_GAP FORMAT 9999
    COL APPLIED_TIME FORMAT A14
    SELECT
       DB_NAME, HOSTNAME, LOG_ARCHIVED, LOG_APPLIED, APPLIED_TIME, LOG_ARCHIVED-LOG_APPLIED LOG_GAP
    FROM
    ( SELECT
       NAME DB_NAME
    FROM
       V$DATABASE
    SELECT
       UPPER(SUBSTR(HOST_NAME,1,(DECODE(INSTR(HOST_NAME,'.'),0,LENGTH(HOST_NAME), (INSTR(HOST_NAME,'.')-1))))) HOSTNAME
    FROM
       V$INSTANCE
    SELECT
       MAX(SEQUENCE#) LOG_ARCHIVED
    FROM
       V$ARCHIVED_LOG
    WHERE
       DEST_ID=1
    AND
       ARCHIVED='YES'
    SELECT
       MAX(SEQUENCE#) LOG_APPLIED
    FROM
       V$ARCHIVED_LOG
    WHERE
       DEST_ID=2
    AND
       APPLIED='YES'
    SELECT
       TO_CHAR(MAX(COMPLETION_TIME),'DD-MON/HH24:MI') APPLIED_TIME
    FROM
       V$ARCHIVED_LOG
    WHERE
       DEST_ID=2
    AND
       APPLIED='YES'
    );Change DEST_ID as needed for your system. I would also bump the parameter LOG_ARCHIVE_MAX_PROCESSES assuming its set to default to a higher value up to 30.
    Maybe instead of stopping the recovery process you should DEFER on the Primary
    alter system set log_archive_dest_state_2=defer;Change the _n from 2 to what your system requires. I use this and have watch DG catch up 200 archives in about 15 minutes.
    You have Standby Redo setup and are using the same size as your redo right?
    Have never seen the Standby try to apply twice.
    ORA-600 [3020] "Stuck Recovery" [ID 30866.1] ( But I do not see your issue )
    Metalink Note 241438.1 Script to Collect Data Guard Physical Standby Diagnostic Information
    Metalink Note 241374.1 Script to Collect Data Guard Primary Site Diagnostic Information
    Best Regards
    mseberg
    Edited by: mseberg on May 8, 2012 5:16 PM

Maybe you are looking for