Monitoring physical standby progress

Hi,
On standby database:
SQL> select max(sequence#) from v$log_history;
max(sequence#)
643
SQL> select max(sequence#) from v$archived_log;
max(sequence#)
647 ---> This is the same as from primary database.
SQL> select max(sequence#) from v$archived_log where applied='YES';
max(sequence#)
----> Blank
What is the meaning of blank result in the third query? What is the right method to check whether Standby database is in sync with primary or not?
Database version: 9.2.0.1.0

Are you sure, managed standby is turned on (alter database recover managed standby disconnect from session)? Obviously you receive archive logs from the primary,but they are not applied.
SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS
FROM V$MANAGED_STANDBY;
This query shows, are apply processes running.
SELECT ARCHIVED_THREAD#, ARCHIVED_SEQ#, APPLIED_THREAD#, APPLIED_SEQ#
FROM V$ARCHIVE_DEST_STATUS;
This query shows the relationship between received and applied (if any) archivelogs.
Werner

Similar Messages

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

    we 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.

  • How To Check Whether Physical Standby is in Sync with the Primary

    hi All,
    I'm new in data guard. In our current production, my boss is asking me to write a shell scripts monitoring physical standby and primary archive is sync (archive gap)
    I'm referring metalink [ID 861595.1], but when i ran the first query in Primary node, the screen hang.
    On primary
    ========
    SQL> SELECT THREAD# "Thread",SEQUENCE# "Last Sequence Generated"
    FROM V$ARCHIVED_LOG
    WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)
    ORDER BY 1;
    I tried to turn on 10046 SQL trace, the SQL consume a lot of CPU, and it full table scan in X$KCCAL table.
    TKPROF result look like below:
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1     88.29     115.59          0          0          0           0
    total        3     88.30     115.60          0          0          0           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1 Optimizer mode: ALL_ROWS Parsing user id: 80 
    Rows     Row Source Operation
          0  SORT ORDER BY (cr=0 pr=0 pw=0 time=21 us)
          0   FILTER  (cr=0 pr=0 pw=0 time=19 us)
       1124    FIXED TABLE FULL X$KCCAL (cr=0 pr=0 pw=0 time=40537 us)
          0    FILTER  (cr=0 pr=0 pw=0 time=115538625 us)
       1122     HASH GROUP BY (cr=0 pr=0 pw=0 time=115530193 us)
    7465972      FIXED TABLE FULL X$KCCAL (cr=0 pr=0 pw=0 time=94648975 us)
    Elapsed times include waiting on following events:
      Event waited on                        Times   Max. Wait  Total Waited
      -----------------------------------   Waited  ----------  ------------
      SQL*Net message to client               1        0.00          0.00
      control file sequential read        16841        0.05         30.88
      SQL*Net break/reset to client           1        0.00          0.00Due to this is production environment, thus i had terminated the session, can anyone teach me or share with me any scripts to monitor physical standby is sync with primary or not? Or do you encounter the above issue when running the SQL?
    My db version is Oracle 11.2.0.1.0
    Thanks in advance.
    Regards,
    Klnghau

    Hello;
    Note 861595.1 has not been subject to an independent technical review. Not sure if that make it bad or not.
    This is what I'm using: ( I spool this to a file and have it e-mailed to me daily)
    PROMPT
    PROMPT Checking last sequence in v$archived_log
    PROMPT
    clear screen
    set linesize 100
    column STANDBY format a20
    column applied format a10
    SELECT name as STANDBY, SEQUENCE#, applied, completion_time from v$archived_log WHERE DEST_ID = 2 AND NEXT_TIME > SYSDATE -1;
    prompt
    prompt----------------Last log on Primary--------------------------------------|
    prompt
    select max(sequence#) from v$archived_log where NEXT_TIME > sysdate -1;
    Best Regards
    mseberg

  • 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

  • DB link for physical standby database

    Hi All ,
    I'm facing the below error on primary while trying to create a db link pointing to the 10g standby database which is in mount stage.
    SQL> create database link synct connect to system identified by 123 using 'stdby';
    Database link created.
    SQL> select max(sequence#) from v$archived_log@synct where applied='YES';
    select max(sequence#) from v$archived_log@synct where applied='YES'
    ERROR at line 1:
    ORA-02068: following severe error from SYNCT
    ORA-01033: ORACLE initialization or shutdown in progress
    Database version is 10.2 standard edition
    My requirement is i need to get max(sequence#) of standby database from primary database using db link.
    what i was trying to do is
    on primary get max(sequence#) & get max(sequence#) of standby using db link and compare both if the gap differene is more than 10 send a mail.
    Any suggestions will be really helpful

    976422 wrote:
    Hi All ,
    I'm facing the below error on primary while trying to create a db link pointing to the 10g standby database which is in mount stage.
    SQL> create database link synct connect to system identified by 123 using 'stdby';
    Database link created.
    SQL> select max(sequence#) from v$archived_log@synct where applied='YES';
    select max(sequence#) from v$archived_log@synct where applied='YES'
    ERROR at line 1:
    ORA-02068: following severe error from SYNCT
    ORA-01033: ORACLE initialization or shutdown in progress
    Post Standby/DataGuard/ADG all questions further in Oracle Discussion Forums » High Availability » Data Guard
    If you try to connect any users other than SYS in standby the error is very much expected. Of course you can connect with other users if you open database in OPEN READ ONLY mode, from 11gRx you can connect with other users even MRP is running if you are using ADG(active Data Guard licensed) .
    I like to know, what you want to achieve by creating DB Link on physical standby database? Which is not allowed.
    Database version is 10.2 standard edition
    My requirement is i need to get max(sequence#) of standby database from primary database using db link.
    what i was trying to do is
    on primary get max(sequence#) & get max(sequence#) of standby using db link and compare both if the gap differene is more than 10 send a mail.
    Any suggestions will be really helpfulNote:- Standard edition, Data Guard not enabled.
    To use this you should use Oracle Net Service, you no need of DB Links.
    Ex:- sqlplus sys/****@standby as sysdba
    Here standby refers to Oracle net service, Where you will have entries in $ORACLE_HOME/network/admin/tnsnames.ora file.
    Edited by: CKPT on Dec 12, 2012 2:01 PM

  • Problem discovering 9.2.0 physical standby database in 10GR1 OEM

    We have a Dataguard test setup in our company which was done using 9.2.0 OEM consisting of two 9.2.0 databases(one primary and another physical standby).
    I could get the 10GR1 agent discover the primary database properly, but couldnot discover the physical standby database? The 10GR1 agent on the remote host is running fine, but just not discovers the database that is in physical standby mode and running fine.
    Any suggestions???

    Have you tried manually adding the standby?
    Note that in grid, in the monitoring configuation screen, use the sys as sysdba account, dbsnmp doesn't have enough privileges.
    Bazza

  • Cannot Clear Critical Alert for Physical Standby Databases

    10.2.0.4.0 Grid Control monitoring 10.2.0.4.0 databases and standby databases with 10.2.0.4.0 agents.
    The standby databases are running on Xen guests. The O/S is Red Hat 4 Advanced Server.
    I had a failure of Xen guest on Saturday that caused me to have to rebuild the standby servers. EM Grid Control successfully verifies the configurations and the status is normal for both physical standby databases. (A rebuilt logical standby database shows no alerts.)
    Grid Control database targets page shows a single critical alert for each physical standby database. The alert is for "number of missing media files is 4". The metric graph shows the count as 0 since before the rebuilds. I cannot clear the alerts from the Critical Alerts page. Grid Control reports "The selected alert(s) cannot be manually cleared. They will clear automatically once the metric is no longer in a critical or warning state.".
    Any suggestions?
    Thanks,
    Ray Westphal

    Thanks for the reply Anthony.
    The result of the query on both standby databases is '0'. The metric graph also shows the value at '0' since before rebuilds.
    And the OMS db and agents have been reset several times since I posted this.
    Ray Westphal.

  • Upgrading with a physical standby database in place

    Hi all
    I am planning to upgrade my database which is 11.2.0.1 (Windows 32 platform) to 11.2.0.3. It has a primary standby database. I only have 1 server for testing the primary database, so I am looking for some help.
    I was reading http://docs.oracle.com/cd/B28359_01/server.111/b28294/upgrades.htm#CHDBJAGG and I confuse about step 4 and 5
    +4. Install the new release of the Oracle software into a new Oracle home on the physical standby database system, as described in the Oracle Database Upgrade Guide.+
    +5. Mount the physical standby database.+
    My question is in step 5, when I mount the physical standby database, does it mounted using new Oracle binary or still using the old version? From my understanding what is step 4 doing is to copying files to new home only. Changing the service to use the new oracle binary is done by dbua. I know this when I test upgrading the primary database.
    Regards
    Stanley.

    Hello;
    new Oracle binary or the new Oracle home if you will.
    So you install the new software on the standby only, all the upgrade SQL gets done on the Primary and then you ENABLE and startup mount on the new oracle home and the standby gets upgraded from the Primary redo.
    Its pretty simple ( My exact plan )
    1. Disable log shipping from the Primary
    2. Shutdown Standby
    3. Install 11.2.0.3 on Standby - Just the software
    4. Startup Standby in recovery mode - do NOT run r any SQL at the standby
    5. Shutdown Primary
    6. Install 11.2.0.3 on Primary
    7. Run Upgrade SQL or DBUA at Primary
    8. Re-enable log shipping
    9. Monitor the redo apply from Primary to Standby - this will also upgrade the Standby data dictionary
    Make sure your tnsnames and listener files move to the new Oracle home and edit as needed.
    Another oracle note is 278641.1
    Best Regards
    mseberg
    Edited by: mseberg on Jan 29, 2013 8:21 PM

  • How to check data in physical standby database?

    Hi!
    I'm maintaining physical standby database system. everyday, i must check tranfer and apply progress. I known, it operate very good. No archive gap is found.
    But i want to check data in physical standby database that there is consistant with primary database, there isn't? What method do I use? How to do?
    thankS

    I hope the following will help
    Verifying the Physical Standby Database
    ==========================================
    Once you create the physical standby database and set up log transport services, you may want verify that database modifications are being successfully shipped from the primary database to the standby database.
    To see the new archived redo logs that were received on the standby database, you should first identify the existing archived redo logs on the standby database, archive a few logs on the primary database, and then check the standby database again. The following steps show how to perform these tasks.
    Step 1 Identify the existing archived redo logs.
    On the standby database, query the V$ARCHIVED_LOG view to identify existing archived redo logs. For example:
    SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME
    2 FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
    SEQUENCE# FIRST_TIME NEXT_TIME
    8 11-JUL-02 17:50:45 11-JUL-02 17:50:53
    9 11-JUL-02 17:50:53 11-JUL-02 17:50:58
    10 11-JUL-02 17:50:58 11-JUL-02 17:51:03
    3 rows selected.
    Step 2 Archiving the current log.
    On the primary database, archive the current log using the following SQL statement:
    SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
    Step 3 Verify that the new archived redo log was received.
    On the standby database, query the V$ARCHIVED_LOG view to verify the redo log was received:
    SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME
    2> FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
    SEQUENCE# FIRST_TIME NEXT_TIME
    8 11-JUL-02 17:50:45 11-JUL-02 17:50:53
    9 11-JUL-02 17:50:53 11-JUL-02 17:50:58
    10 11-JUL-02 17:50:58 11-JUL-02 17:51:03
    11 11-JUL-02 17:51:03 11-JUL-02 18:34:11
    4 rows selected.
    The logs are now available for log apply services to apply redo data to the standby database.
    Step 4 Verify that the new archived redo log was applied.
    On the standby database, query the V$ARCHIVED_LOG view to verify the archived redo log was applied.
    SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG
    2 ORDER BY SEQUENCE#;
    SEQUENCE# APP
    8 YES
    9 YES
    10 YES
    11 YES
    4 rows selected.

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

  • OEM for physical standby database

    Hello All,
    I am using Oracle 11.2.0.3. My enterprise manager is db console 11.2
    I have Oracle Enterprise manager dbcnsole for my RAC primary database  and I have created through sqlplus command line a physical standby database.
    My questions
    Can I use the RAC primary dbconsole to monitor my physical standby database? if yes what the steps?
    Is it mandatory to use grid control in that case? if yes, what steps are needed to implement grid control ?
    Regards,

    Hi,
    It is not possible to monitor/administer a Logical or Physical Standby database, i.e Data Guard, using Enterprise Manager Database Control.  This is primarily due to the fact that Database Control is designed to monitor 1 database and a Data Guard environment, by definition, includes more than 1 database.
    If you attempt to run emca against a standby Database, you will get an error like (i.e. ORA-01219: database not open).
    Database Control, can, of course, be used to monitor the current Primary database (with no ability to administer or monitor Data Guard related functionality).  In such a case, when failover occurs Database Control must be reconfigured to run on the new Primary database using the commands detailed in Note 278100.1 How To Drop, Create And Recreate DB Control In A 10g Database, section C. Recreate/ReConfig DB Control, Option 2. Recreate the DB Control Configuration Files and Repository.
    Enterprise Manager Grid Control or Cloud Control provides the functionality for viewing, monitoring, and administering primary and standby databases in a Data Guard configuration.
    Reference: Is it Possible to Configure Database Control for a Logical or Physical Standby Database? (Doc ID 315116.1)
    Using EM cloud control 12c is best available option to monitor your standby databases
    For install docs refer to
    http://docs.oracle.com/cd/E24628_01/install.121/e22624/toc.htm
    For Software download link
    http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html
    Regards,
    Rahul

  • DB Link to Physical Standby

    How can we execute explain plan for queries connecting to Physical standby database over DB link.
    explain plan for select * from test.test_table@stby;
    Getting ORA-16000 when trying to that.
    Tried to set transaction to read only.
    Then tried to run explain plan, that gives error for ora-02047 cannot join the distributed
    Any insight will be appreciated.
    MM

    You cannot use "explain plan" as it means inserting into "plan_table" table. So your standby is in read only mode, isnt it :)
    Activate the sql trace and execute the query
    Best would be convert your standby to snapshot standby :), Use it for any kind of testing like explain plan or even run that query and monitor, when you are satisfied come back to physical standby.
    Perform the following steps to convert a physical standby database into a snapshot standby database:
    Stop Redo Apply, if it is active.
    On an Oracle Real Applications Cluster (RAC) database, shut down all but one instance.
    Ensure that the database is mounted, but not open.
    Issue the following SQL statement to perform the conversion:
    SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
    The database is dismounted after conversion and must be restarted.
    Edited by: Karan on Feb 8, 2013 12:00 AM

  • Datafile autoextend off possible in Physical standby?

    Hi,
    I am making datafiles auto extend off in primary database. is there anything i should do in standy database as well?
    i have 10.2.0.4 version in IBM AIX machines with physical standby database configured...
    I have standby_file_management is AUTO...
    Any suggestions?
    Thanks,
    Raman.
    standby_file_management string AUTO
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    NLSRTL Version 10.2.0.4.0 - Production

    Means standy database will automatically propgate change of auto extend off? as DBA we dont do anything?Well, i have not tested it recently, but in back of my memories which i am trying to recall i have done it.For datafile/tablespace related standby_file_management parameter has to be set to auto, which is already set so you must must not face any problem.You can monitor the alert log file of the standby database.
    Anand

  • 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

  • 12c Physical Standby Creation

    EM 12c on Windows 2008
    Primary server - OE Linux 5.8 64bit
    Standby server - OE Linux 5.8 64 bit
    Database - 11.2.0.3
    Basically I am trying to setup a physical standby but when i select the standby server I get the following error
    The Grid Control database plug-in must be deployed on the Agent monitoring the selected host.
    The agent is correctly installed on the standby server as a managed host so not sure what the issue is. Is there something else I need to install?

    user464376 wrote:
    EM 12c on Windows 2008
    Primary server - OE Linux 5.8 64bit
    Standby server - OE Linux 5.8 64 bit
    Database - 11.2.0.3
    Basically I am trying to setup a physical standby but when i select the standby server I get the following error
    The Grid Control database plug-in must be deployed on the Agent monitoring the selected host.
    The agent is correctly installed on the standby server as a managed host so not sure what the issue is. Is there something else I need to install?Something new with 12c, Then google mus help you. and he is your first and best friend. :)
    Check http://www.youtube.com/watch?v=0Yxbsr9IJZE
    http://blogs.griddba.com/2012/03/oracle-enterprise-manager-12c-cloud.html

Maybe you are looking for

  • Is there a way to view all albums in the way you can view all events?

    I am finally giving serious consideration to moving over to using albums more. However, I am addicted to being able to see all of my events laid out with key photos. I'm not sure why you can't view albums in this manner - having them show up in a gri

  • Upgrading 8 pro to 8.1

    Hi I am trying to upgrade windows 8 pro to 8.1 . First of all it is taking long time to download from Microsoft store and giving an error " "Something happened and the windows 8.1 couldn't be installed. Please try again Error. code : 0x80071a91"  The

  • What is exactly stored in the Backup ITunes files for the IPhone?

    I am thinking about allowing iphone connectivity via Active-sync in our Exchange 2007 environment. I am familar with the intergration and management of Active-sync with the Iphone however, I do have concerns with the backup feature on the ITunes soft

  • Faster perfomance on 802.11n

    I just purchased the new dual-band version of the Aiport Extreme, and while I am happy over the performance upgrade from my Belkin router, I still think I can get even more out of this router. Right now I have two machines running N (one Vista, one X

  • Time Machine Full and I Can't Navigate Time Machine

    This gets presented all the time. So moderator if you can find me a solution please do so. Here's the problem I'm having. 1) My Time Machine says the disk is full but my partition on my external is 360 GB and my internal hard drive is only 150 GB. I