Controlling "Log apply" on Logical standby.

Hi,
We are going Live with logical standby ina day or two, and suddenly found what seems to be a potential problem in the near future.
Despite issuing the command
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;Logs are not getting applied immediately. Each of the logfile is taking somewhere around 5 to 10 minutes. That, was considered not so serious a problem. But sometimes, we find that there are too many logfiles left behind, and it is taking more than a day to get applied. I don't know how to prevent such a situation. I don't know how to get them all applied if at all such situation arises.
DB Version: 10.2.0.4
O/S: RHEL 4
Logfile size: 50M
Please help. I will be prepared with all documents to face this situation.
Aswin.
Edited by: ice_cold_aswin on May 6, 2010 7:12 PM

In Logical Standby the redo generated on the primary is converted to SQL and applied at the Logical Standby DB.
Check the network to see if there is any latency. And also check the views like v$system_event to get an overview of the wait events on the Primary DB.
Once refer to the docs for the Logical Standby Wait events.
Edited by: user8710159 on May 6, 2010 10:15 AM

Similar Messages

  • Slow apply on logical standby

    Hi ,
    oracle 10.2.0.3 enterprise edition logical standby
    We performed heavy updates on our production database due to which logical standby gone lots of logs behind with primary database and log are getting apply on logical standby very slowly.
    Kindly suggest how to speed up apply process on logical standby ....

    Santosh Pradhan wrote:
    Hi ,
    oracle 10.2.0.3 enterprise edition logical standby
    We performed heavy updates on our production database due to which logical standby gone lots of logs behind with primary database and log are getting apply on logical standby very slowly.
    Kindly suggest how to speed up apply process on logical standby ....Hope you are using "ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;" command
    Here please check the below note for Adjusting the Number of APPLIER Processes , also if redo transport is slow check the settings for "LOG_ARCHIVE_MAX_PROCESSES"
    http://docs.oracle.com/cd/B28359_01/server.111/b28294/manage_ls.htm#CHDBGBFC

  • Materialized View Logs in a logical standby database

    I am trying to create materialized views based on a few tables in a logical standby database.
    The target database (11g R2) where the MVs will be created is a stand-alone database.
    The DB where the base tables reside is a logical standby database (11g R2).
    The requirement is to do a "FAST REFRESH" of the Materialized Views.
    My questions are :
    1. Can I create MV logs in the logical standby DB?
    2. If the answer to question no. 1 is "Yes", do I need to do anything different or configure the logical standby DB in a specific manner in order to create MV logs. From what I understand, the objects in the logical standby database are in a locked state. Is that going to be a problem ?
    Any other information that might be relevant is greatly appreciated.
    Thanks in advance.

    HI Daniel,
    I appreciate your quick response.
    My choice of name may not have been ideal, however changing new to another name - like gav - does not solve the problem.
    SYS@UATDR> connect / as sysdba
    Connected.
    SYS@UATDR>
    SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
    2 from v$database
    3 /
    NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
    UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
    SYS@UATDR>
    SYS@UATDR> create tablespace ts_gav
    2 /
    Tablespace created.
    SYS@UATDR>
    SYS@UATDR> create user gav
    2 identified by gav
    3 default tablespace ts_gav
    4 temporary tablespace temp
    5 quota unlimited on ts_gav
    6 /
    User created.
    SYS@UATDR>
    SYS@UATDR> grant connect, resource to gav
    2 /
    Grant succeeded.
    SYS@UATDR> grant unlimited tablespace, create table, create any table to gav
    2 /
    Grant succeeded.
    SYS@UATDR>
    SYS@UATDR> -- show privs given to gav
    SYS@UATDR> select * from dba_sys_privs where grantee='GAV'
    2 /
    GRANTEE PRIVILEGE ADM
    GAV CREATE TABLE NO
    GAV CREATE ANY TABLE NO
    GAV UNLIMITED TABLESPACE NO
    SYS@UATDR>
    SYS@UATDR> -- create objects in schema
    SYS@UATDR> connect gav/gav
    Connected.
    GAV@UATDR>
    GAV@UATDR> -- prove ability to create tables
    GAV@UATDR> create table gav
    2 (col1 number not null)
    3 tablespace ts_gav
    4 /
    create table gav
    ERROR at line 1:
    ORA-01031: insufficient privileges
    GAV@UATDR>

  • When to use Real Time Apply for Logical standby..!!

    Hello All,
    I have been trying many ways to speed up the archival on primary and improve sql apply on logical standby, but still we are getting about 45-50 mins of delay between primary and logical standby.
    We wanted to have our transactions applied on logical standby within couple minutes. Which i guess wont be possible in async mode.
    That's why i am planning to implement Real Time apply between primary and logical standby.
    Now since both our databases are too far away from each other (Primary is in US and logical is in India) would it be recommended to implement real time apply in such scenario? And if implemented would it affect Primary DB Performance?
    Also if there might be some packet loss or network hitch would Primary will try again and keep logical DB in Sync with Primary?
    Any help or suggestions would be great.
    Thanks.

    yes, real time apply is recommended in your scenario.
    however due to the geographical distance between your primary and standby; I would suggest to keep your standby in current mode - max performance ; ASYNC- itself. It would not affect the performace of the primary.
    As long as you set the FAL parameters and configure tnsnames properly and ensure proper deletion policy for archivelog cleanup in primary ( so that it's not deleted before shipping if need be), you shouldn't find any problem with primary & standby synching.
    Good Luck.
    Cheers.

  • Real time apply for logical standby

    Hi
    Oracle 11.2.0.3.0
    I have a primary database orcl and logical standby database orcl_std.
    Real time apply is enabled. I have standby redologs in both primary and standby sides and I`ve started recovery with below command:
    ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
    When I create a new table in primary database, I am unable to see it on standby database (Although real time apply is enabled)
    However, when I switch log in primary, I can see the new table in standby database.
    My question is, why realtime apply is not working in my scenerio ? I was expecting to see the new table immediately in standby database once it is created in primary database. Why am I supposed to wait for log switch in real time apply ?

    Using Real-Time Apply to Apply Redo Data Immediately
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/log_apply.htm#i1022881
    1.What is compatible parameter, it should be 11.1
    2.Try to check parameters mentioned in below link:
    http://easyoradba.com/2011/01/10/real-time-apply-in-oracle-data-guard-10g/
    Regards
    Girish Sharma
    Edited by: Girish Sharma on Nov 15, 2012 12:37 PM

  • Real-time apply cascaded logical standby database

    Hi
    I have a primary database orcl
    Pysical standby database orcl_std
    Cascaded logical standby database orcl_tri which receives archivelogs from orcl_std
    Real time apply is enabled both in orcl_std (physical standby) and orcl_tri (logical standby)
    When I create a table in primary orcl, I am unable to see it on orcl_tri (Although real time apply is enabled)
    However, when I switch log in primary, I can see the new table on orcl_tri.
    My question is, why realtime apply is not working in my scenerio ?
    orcl_std : ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION USING CURRENT LOGFILE;
    orcl_tri: ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
    Oracle 11.2.0.3.0

    Hi mseberg,
    Thanks for your reply.
    There is no load or network issue as I`ve just created these databases for the experiement.
    I have the same output from standby and primary databases.
    SQL> select bytes/1024/1024 from  v$standby_log;
    BYTES/1024/1024
                 10
                 10
                 10I can see below output in standby alertlog
    Fri Nov 16 08:39:51 2012
    ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE
    ALTER DATABASE START LOGICAL STANDBY APPLY (orcl)
    with optional part
    IMMEDIATE
    Attempt to start background Logical Standby process
    Fri Nov 16 08:39:51 2012
    LSP0 started with pid=37, OS id=16141
    Completed: ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE
    LOGMINER: Parameters summary for session# = 1
    LOGMINER: Number of processes = 3, Transaction Chunk Size = 201
    LOGMINER: Memory Size = 30M, Checkpoint interval = 150M
    LOGMINER: SpillScn 1953318, ResetLogScn 995548
    LOGMINER: summary for session# = 1
    LOGMINER: StartScn: 0 (0x0000.00000000)
    LOGMINER: EndScn: 0 (0x0000.00000000)
    LOGMINER: HighConsumedScn: 1955287 (0x0000.001dd5d7)
    LOGMINER: session_flag: 0x1
    LOGMINER: Read buffers: 16
    Fri Nov 16 08:39:55 2012
    LOGMINER: session#=1 (Logical_Standby$), reader MS00 pid=30 OS id=16145 sid=49 started
    Fri Nov 16 08:39:55 2012
    LOGMINER: session#=1 (Logical_Standby$), builder MS01 pid=39 OS id=16149 sid=44 started
    Fri Nov 16 08:39:55 2012
    LOGMINER: session#=1 (Logical_Standby$), preparer MS02 pid=40 OS id=16153 sid=50 started
    LOGMINER: Turning ON Log Auto Delete
    LOGMINER: Begin mining logfile during commit scan for session 1 thread 1 sequence 202, +DATA/orcl_std/archivelog/2012_11_15/thread_1_seq_202.349.799450179
    LOGMINER: End mining logfiles during commit scan for session 1
    LOGMINER: Turning ON Log Auto Delete
    LOGMINER: Begin mining logfile for session 1 thread 1 sequence 202, +DATA/orcl_std/archivelog/2012_11_15/thread_1_seq_202.349.799450179
    LOGMINER: End   mining logfile for session 1 thread 1 sequence 202, +DATA/orcl_std/archivelog/2012_11_15/thread_1_seq_202.349.799450179
    Fri Nov 16 08:40:04 2012
    LOGSTDBY Analyzer process AS00 started with server id=0 pid=41 OS id=16162
    Fri Nov 16 08:40:05 2012
    LOGSTDBY Apply process AS03 started with server id=3 pid=45 OS id=16175
    Fri Nov 16 08:40:05 2012
    LOGSTDBY Apply process AS04 started with server id=4 pid=46 OS id=16179
    Fri Nov 16 08:40:05 2012
    LOGSTDBY Apply process AS01 started with server id=1 pid=42 OS id=16167
    Fri Nov 16 08:40:05 2012
    LOGSTDBY Apply process AS05 started with server id=5 pid=47 OS id=16183
    Fri Nov 16 08:40:05 2012
    LOGSTDBY Apply process AS02 started with server id=2 pid=44 OS id=16171Do you think real-time apply wasnt setup properly ?

  • Create function as "/ as sysdba" not shipped/applied to logical standby

    As the subject states, I was creating a password verify function and profile that used the function as sys "/ as sysdba" .
    The function was not created on the logical standby and thus the profile create statement failed. The function was not even listed in the standby's alertlog, although the create profile statement was.
    I created the function manually on the standby by connecting / as sysdba and creating the function and then restarted logical standby apply. The standby then created the profile and continued without error.
    Is this a bug?
    Should the SYS 'create function' be shipped and applied or not?
    When the function create statement was run on the primary as a non-sys user with DBA privs, it created ok and was shipped and appeared on logical standby ok.
    Any ideas DataGuard Gurus?
    (9.2.0.7 on Solaris 8)

    I logged a Tar. Oracle says:
    "Ideally any object created on sys schema should get skipped automatically. sys is consider as internal schema and objects created in sys schema should get
    skipped"
    "But because of the internal Bug.3576307 "LOGICAL STANDBY IS NOT SKIPPING DDL IT SHOULD." it is not skipping the DDL executed on sys schema. This bug
    is fixed in 10.2.
    You can issue following statement to enable the DDL skip on sys schema.
    SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
    SQL> EXECUTE DBMS_LOGSTDBY.SKIP_ERROR(‘SCHEMA_DDL’, ‘SYS’, null, null)
    SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;
    After which all DDL errors encountered on any object in the SYS schema would be ignored and processing continued. This can render the TEST schema objects unusable and, if necessary, you can later recreate the tables
    using the INSTANTIATE_TABLE procedure."
    Makes sense now.

  • Redo data not applied on logical standby database 10g

    after a network problem within the primary and the logical standby database. The redo data is not applied on the logical standby even if all the archived log are sent to it.
    The below is the output from v$archive_gap and DBA_LOGSTDBY_LOG
    SQL> select * from v$archive_gap;
    no rows selected
    SQL> SELECT SEQUENCE#, FIRST_TIME, APPLIED
    FROM DBA_LOGSTDBY_LOG
    ORDER BY SEQUENCE#; 2 3
    SEQUENCE# FIRST_TIME APPLIED
    3937 24-FEB-10 01:48:23 CURRENT
    3938 24-FEB-10 10:31:22 NO
    3939 24-FEB-10 10:31:29 NO
    3940 24-FEB-10 10:31:31 NO
    3941 24-FEB-10 10:33:44 NO
    3942 24-FEB-10 11:54:17 NO
    3943 24-FEB-10 12:05:30 NO
    Any help?
    Thanks

    ORA-00600: internal error code, arguments: [krvxgirp], [], [], [], [], [], [], []
    LOGSTDBY Analyzer process P003 pid=48 OS id=8659 stopped
    Wed Feb 24 16:49:04 2010
    Errors in file /oracle/product/10.2.0/admin/umarket/bdump/oradb_lsp0_8651.trc:
    ORA-12801: error signaled in parallel query server P003
    ORA-00600: internal error code, arguments: [krvxgirp], [], [], [], [], [], [], []
    and below an Warning: Apply error received: ORA-26714: User error encountered while applying. Clearing. from oradb_lsp0_8651.trc
    Thanks

  • Determining the last archive applied on Logical Standby

    Hi,
    I am trying to determine the last log received and applied on my Logical Standby
    SQL> select thread#, max(sequence#) "Last Standby Seq Received"
    from v$archived_log val, v$database vdb
    where val.resetlogs_change# = vdb.resetlogs_change#
    group by thread# order by 1;
       THREAD# Last Standby Seq Received
             1                       14
    SQL> select thread#, max(sequence#) "Last Standby Seq Applied"
    from v$archived_log val, v$database vdb
    where val.resetlogs_change# = vdb.resetlogs_change#
    and applied='YES'
    group by thread# order by 1;
    Does not return anything
    These statements work ok on a physical standby.
    I know Sql Apply is enabled on my logical standby - my broker configuration is enabled and for the logical standby database, it is showing the Intended State as APPLY-ON with no Transport or Apply Lag on any of the databases
    Q. How do I determine the last seq applied on my logical standby ?
    thanks,
    Jim

    Hello;
    I have this from my notes:
    SELECT
      L.SEQUENCE#,
      L.FIRST_TIME,
      (CASE WHEN L.NEXT_CHANGE# < P.READ_SCN THEN 'YES'WHEN L.FIRST_CHANGE# < P.APPLIED_SCN THEN 'CURRENT' ELSE 'NO' END) APPLIED
    FROM
      DBA_LOGSTDBY_LOG L, DBA_LOGSTDBY_PROGRESS P
    ORDER BY SEQUENCE#;
    Best Regards
    mseberg

  • 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

  • Reshipping the log files to logical standby

    Hi All
    I am getting this error in the logical standby "ORA-01291: missing logfile" . The problem I had some wrong configuration in "standby_archive_dest" parameter in the logical database but I fixed it and now I need to reship the logfiles from primary to logical standby. I am using ASM in the primary and logical standby as well and I did NOT turn on the flash back in both side. Is there any way for me to reship the log files from the primary to the logical standby ?
    Thanks

    user12302159 wrote:
    Hi All
    I am getting this error in the logical standby "ORA-01291: missing logfile" . The problem I had some wrong configuration in "standby_archive_dest" parameter in the logical database but I fixed it and now I need to reship the logfiles from primary to logical standby. I am using ASM in the primary and logical standby as well and I did NOT turn on the flash back in both side. Is there any way for me to reship the log files from the primary to the logical standby ?
    ThanksIf you have set FAL_CLIENT and FAL_SERVER correctly, then the missing archives should be transferred automatically to standby database.
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10726/appconfig.htm#g635923
    Regards,
    S.K.

  • Data guard real time apply vs archived log apply on physical standby

    Dear DBA's,
    last week i configuared DR , now the phyiscal stanby database is archive apply mode,
    i want to confirm is it better to apply the archived log or should i cahnge it to real time apply .
    give me sugesstions.
    Thanks and Regards
    Raja...

    One question are you using ARCH transport to move the redo? or have you configured standby redo logs and logwr transport (either async or syncronous), if you are using the archiver to transport the logs then you can not use real time apply.
    If you are using log writer to transpor the redo the realtime apply reduces the recovery time required if you need to failover as trher should be less redo to apply to bring the standby up to date, which mode you use to transport redo will depend on what is acceptable in terms of data loss and the impact on performance.

  • Logical standby | archive log deleted | how to remove gap ???

    hi gurus...
    i have problem on logical standby
    by mistake standby log coming to logical standby has been deleted , now how to fill up the gap ???
    ON STANDBY
    SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# APPLIED
    228 674847 674872 YES
    229 674872 674973 CURRENT
    230 674973 674997 NO
    231 674997 675023 NO
    232 675023 675048 NO
    233 675048 675109 NO
    234 675109 675135 NO
    235 675135 675160 NO
    236 675160 675183 NO
    237 675183 675208 NO
    238 675208 675232 NO
    239 675232 675257 NO
    240 675257 675282 NO
    241 675282 675382 NO
    242 675382 675383 NO
    243 675383 675650 NO
    244 675650 675652 NO
    245 675652 675670 NO
    246 675670 675688 NO
    247 675688 675791 NO
    248 675791 678524 NO
    archive log are shipping to standby location also and getting registered
    ALERT LOG OF STANDBY
    Fri May 7 12:25:36 2010
    Primary database is in MAXIMUM PERFORMANCE mode
    RFS[21]: Successfully opened standby log 5: '/u01/app/oracle/oradata/BEST/redo05.log'
    Fri May 7 12:25:37 2010
    RFS LogMiner: Registered logfile [u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_248_1_715617824.dbf] to LogMiner session id [1]
    but i dont have standby log after 229 sequence ...
    ON PRIMARY
    SYS@TEST AS SYSDBA> archive log list
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination /u01/app/oracle/flash_recovery_area/TEST/standlogOldest online log sequence 247
    Next log sequence to archive 249
    Current log sequence 249
    what to do next to apply sequences and bring both in sync.
    please help me ,,,,
    Edited by: user12281508 on May 7, 2010 9:45 AM

    thanks for response.
    no its pure logical standby
    i have tried to ftp the archive logs of primary to standby and applied manually
    SYS@BEST AS SYSDBA> alter database register logfile '/u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_230_1_715617824.dbf';
    alter database register logfile '/u01/app/oracle/flash_recovery_area/BEST/archivelog/archBEST_230_1_715617824.dbf'
    ERROR at line 1:
    ORA-01289: cannot add duplicate logfile
    SYS@BEST AS SYSDBA> alter database register logfile '/u01/app/home/archTEST_230_1_715617824.dbf';
    alter database register logfile '/u01/app/home/archTEST_230_1_715617824.dbf'
    ERROR at line 1:
    ORA-01289: cannot add duplicate logfile
    any other way ????

  • Logical standby real time apply problem

    Hi all,
    The real time apply for logical standby on my Oracle 10.2 DB is not working
    SELECT SEQUENCE#, FIRST_TIME, APPLIED
    FROM DBA_LOGSTDBY_LOG
    ORDER BY SEQUENCE#;
    SEQUENCE# FIRST_TI APPLIED
    2113 07/10/09 NO
    2115 07/10/09 NO
    2116 07/10/09 NO
    There is no error inside alert log.
    Any help
    Thanks

    Using Real-Time Apply to Apply Redo Data Immediately
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/log_apply.htm#i1022881
    1.What is compatible parameter, it should be 11.1
    2.Try to check parameters mentioned in below link:
    http://easyoradba.com/2011/01/10/real-time-apply-in-oracle-data-guard-10g/
    Regards
    Girish Sharma
    Edited by: Girish Sharma on Nov 15, 2012 12:37 PM

  • Logical Standby working issues Oracle 9i, Windows

    Hi,
    Set up Oracle 9i Logical Standby on Windows. (instructions as per Oracle Documentation)
    Did not have any issues setting up.
    While setting up the Logical Standby, Recovered the Primary Database until Oct 10/09 8:16 pm
    Registered the archive log in the logical standby generated hence and the FAL took care of copying/registering the rest of the archivelogs.
    Created and inserted some records in Primary database and could see them in Standby.
    So far so good.
    On Oct11 data was entered into Primary database. Archivelogs were shipped to Standby, I could see them registered in DBA_LOGSTDBY_LOG.
    The APPLIED_SCN,NEWEST_SCN were in sync as per DBA_LOGSTDBY_PROGRESS.
    Today, we had some issues with data and when we queried the user tables: (no skip settings)
    Couldn't see any data in standby past the recovery...
    No errors reported in DBA_LOGSTDBY_EVENTS. No errors in Alert log also.
    What could be happening?
    Thanks,
    Madhuri

    I figured it out...
    Today, we had some issues with data and when we queried the user tables: (no skip settings)
    Couldn't see any data in standby past the recovery...I was using two tables as random spot check and both did not get updated. So, I was under the impression SQL APPLY did not do anything.
    But, it did apply the redo on the rest of the tables.
    These 2 tables in question were skipped because both of them had Function Based indexes.
    They are very huge individual tables .
    So, exporting them from Primary database and Importing them into Standby Database. Skipping DML in DataGuard.
    That solved the problem.
    --Madhuri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for