Data Guard Gap Monitoring script

Hello,
Can anyone please provide me data guard gap monitoring script for databases(primary,standby) on RAC.
Oracle RDBMS 11.2.0.2(4-node RAC) on RHEL 5.6.
Thanks
Edited by: 951368 on Dec 26, 2012 9:21 AM

951368 wrote:
Hello,
Can anyone please provide me data guard gap monitoring script for databases(primary,standby) on RAC.
Oracle RDBMS 11.2.0.2(4-node RAC) on RHEL 5.6.
Thanks
Edited by: 951368 on Dec 26, 2012 9:21 AMUse the script of MSeberg, Modify v$instance as gv$instance for RAC

Similar Messages

  • Shell scripts to monitor data guard

    Hi All,
    Please help me to have the shell scripts for monitoring the data guard.
    Thanks,
    Mahi

    here is the shell script we use to monitor dataguard, it sends mail if there is a gap for more than 20 archive logs..
    #set Oracle environment for Sql*Plus
    #ORACLE_BASE=/oracle/app/oracle ; export ORACLE_BASE
    ORACLE_HOME=/oracle/app/oracle/product/10.2.0 ; export ORACLE_HOME
    ORACLE_SID=usagedb ; export ORACLE_SID
    PATH=$PATH:/oracle/app/oracle/product/10.2.0/bin
    #set working directory. script is located here..
    cd /oracle/scripts
    #Problem statemnt is constructed in message variable
    MESSAGE=""
    #hostname of the primary DB.. used in messages..
    HOST_NAME=`/usr/bin/hostname`
    #who will receive problem messages.. DBAs e-mail addresses seperated with space
    DBA_GROUP='[email protected] '
    #SQL statements to extract Data Guard info from DB
    LOCAL_ARC_SQL='select archived_seq# from V$ARCHIVE_DEST_STATUS where dest_id=1; \n exit \n'
    STBY_ARC_SQL='select archived_seq# from V$ARCHIVE_DEST_STATUS where dest_id=2; \n exit \n'
    STBY_APPLY_SQL='select applied_seq# from V$ARCHIVE_DEST_STATUS where dest_id=2; \n exit \n'
    #Get Data guard information to Unix shell variables...
    LOCAL_ARC=`echo $LOCAL_ARC_SQL | sqlplus -S / as sysdba | tail -2|head -1`
    STBY_ARC=`echo $STBY_ARC_SQL | sqlplus -S / as sysdba | tail -2|head -1`
    STBY_APPLY=`echo $STBY_APPLY_SQL | sqlplus -S / as sysdba | tail -2|head -1`
    #Allow 20 archive logs for transport and Apply latencies...
    let "STBY_ARC_MARK=${STBY_ARC}+20"
    let "STBY_APPLY_MARK= ${STBY_APPLY}+20"
    if [ $LOCAL_ARC -gt $STBY_ARC_MARK ] ; then
    MESSAGE=${MESSAGE}"$HOST_NAME Standby -log TRANSPORT- error! \n local_Arc_No=$LOCAL_ARC but stby_Arc_No=$STBY_ARC \n"
    fi
    if [ $STBY_ARC -gt $STBY_APPLY_MARK ] ; then
    MESSAGE=${MESSAGE}"$HOST_NAME Standby -log APPLY- error! \n stby_Arc_No=$STBY_ARC but stby_Apply_no=$STBY_APPLY \n"
    fi
    if [ -n "$MESSAGE" ] ; then
    MESSAGE=${MESSAGE}"\nWarning: dataguard error!!! \n .\n "
    echo $MESSAGE | mailx -s "$HOST_NAME DataGuard error" $DBA_GROUP
    fi

  • Data guard monitoring shell script

    uname -a
    Linux DG1 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Hi Guys,
    I am looking for a shell script that i can cron ,which monitors dataguard env (10g and 11g )and sent email alerts if DR go out of sync say by 10 or 15 logs
    i found couple on the net but not working for some reason
    http://emrebaransel.blogspot.com/2009/07/shell-script-to-check-dataguard-status.html
    if you guys have some please share

    You are using an advanced version of Oracle and want to plug an obsolete script into it??
    Why not just monitor the Data Guard with EM or Grid Control and setup emails in there? It is 100% more reliable than anything else.

  • Data Guard monitoring Scripts.

    I am looking for scripts to monitor Data Guard?
    Can someone help me with this please?
    Thanks in advance.

    These scripts are Unix specific:
    ## THIS ONE IS CALLED BY THE NEXT
    #!/bin/ksh
    # last_log_applied.ksh <oracle_sid> [connect string]
    if [ $# -lt 1 ]
    then
         echo "$0: <oracle_sid> [connect string]"
         exit -1
    fi
    oracle_sid=$1
    connect_string=$2
    ORACLE_HOME=`grep $oracle_sid /var/opt/oracle/oratab | awk -F":" {'print $2'}`
    export ORACLE_HOME
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    PATH=$PATH:$ORACLE_HOME/bin
    export PATH
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    export ORA_NLS33
    ORACLE_SID=$oracle_sid
    export ORACLE_SID
    ofile="/tmp/${oracle_sid}_last_log_seq.log"
    #### STANDBY SERVER NEEDS TO CONNECT VIA SYSDBA
    if [ ${connect_string:="NULL"} = "NULL" ]
    then
         $ORACLE_HOME/bin/sqlplus -s /nolog << EOF >tmpfile 2>&1
         set pagesize 0;
         set echo off;
         set feedback off;
         set head off;
         spool $ofile;
         connect / as sysdba;
         select max(sequence#) from v\$log_history;
    EOF
    #### PASS CONNECT STRING IN FOR PRIMARY SERVER
    else
         $ORACLE_HOME/bin/sqlplus -s $connect_string << EOF >tmpfile 2>&1
         set pagesize 0;
         set echo off;
         set feedback off;
         set head off;
         spool $ofile;
    select max(sequence#) from v\$log_history;
    EOF
    fi
    tmp=`grep -v [^0-9,' '] $ofile | tr -d ' '`
    rm $ofile tmpfile
    echo "$tmp"
    # standby_check.ksh
    #!/bin/ksh
    export STANDBY_DIR="/opt/oracle/admin/standby"
    if [ $# -ne 1 ]
    then
         echo "Usage: $0: <ORACLE_SID>"
         exit -1
    fi
    oracle_sid=$1
    # Max allowable logs to be out of sync on standby
    machine_name=`uname -a | awk {'print $2'}`
    . $STANDBY_DIR/CONFIG/params.$oracle_sid.$machine_name
    user_pass=`cat /opt/oracle/admin/.opass`
    echo "Running standby check on $oracle_sid..."
    standby_log_num=`$STANDBY_DIR/last_log_applied.ksh $oracle_sid`
    primary_log_num=`$STANDBY_DIR/last_log_applied.ksh $oracle_sid ${user_pass}@${oracle_sid}`
    echo "standby_log_num = $standby_log_num"
    echo "primary_log_num = $primary_log_num"
    log_difference=`expr $primary_log_num - $standby_log_num`
    if [ $log_difference -ge $ALARM_DIFF ]
    then
         /bin/mailx -s "$oracle_sid: Standby is $log_difference behind primary." -r $FROM_EMAIL $EMAIL_LIST < $STANDBY_DIR/standby_warning_mail
         # Page the DBA's if we're falling way behind
         if [ $log_difference -ge $PAGE_DIFF ]
         then
              /bin/mailx -s "$oracle_sid: Standby is $log_difference behind primary." -r $FROM_EMAIL $PAGE_LIST < $STANDBY_DIR/standby_warning_mail
         fi
    else
         echo "Standby is keeping up ok ($log_difference logs behind)"
    fi

  • Shell script to monitor the data guard

    Hi,
    Can any body please provide the shell scripts to monitor the data guard in all scenarios and to get the mail when problem occurs in dataguard.
    Thanks,
    Mahipal

    Sorry Mahi. Looks like all of the scripts i've got are for logical standbys and not physical. Have a look at the link ualual posted - easy enough to knock up a script from one or more of those data dictionary views. Just had a look on metalink and there's what looks to be a good script in note 241438.1. Its a good starting point definately.
    regards,
    Mark

  • Data guard monitoring

    Hi All,
    I wanted to know whether difference between output of below queries would give me log gap between primary and standby database on which the dataguard is configured.
    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';
    I am trying to write a linux script to monitor the data guard.. Please suggest..
    Thanks

    What I would do is create an SQL file and call it from a Linux script. Here's a start :
    SPOOL /tmp/quickcheck.lst
    PROMPT
    PROMPT Checking Size and usage in GB of Flash Recovery Area
    PROMPT
    SELECT
      ROUND((A.SPACE_LIMIT / 1024 / 1024 / 1024), 2) AS FLASH_IN_GB,
      ROUND((A.SPACE_USED / 1024 / 1024 / 1024), 2) AS FLASH_USED_IN_GB,
      ROUND((A.SPACE_RECLAIMABLE / 1024 / 1024 / 1024), 2) AS FLASH_RECLAIMABLE_GB,
      SUM(B.PERCENT_SPACE_USED)  AS PERCENT_OF_SPACE_USED
    FROM
      V$RECOVERY_FILE_DEST A,
      V$FLASH_RECOVERY_AREA_USAGE B
    GROUP BY
      SPACE_LIMIT,
      SPACE_USED ,
      SPACE_RECLAIMABLE ;
    PROMPT
    PROMPT Checking free space In Flash Recovery Area
    PROMPT
    column FILE_TYPE format a20
    select * from v$flash_recovery_area_usage;
    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 Checking Last log on Primary
    prompt
    select max(sequence#) from v$archived_log where NEXT_TIME > sysdate -1;
    SPOOL OFFRun on your primary
    If you find this helpful please mark it so.
    Best Regards
    mseberg

  • Monitoring Data Guard with SNMP?

    I have configured Data Guard within two Oracle environments and have written a small Perl script which monitors the applied log service and sends an email if something fails to be applied.
    I am assuming this is not the most efficient way of monitoring the systems and would like to use SNMP.
    Can anyone tell me if it is possible to monitor Data Guard using SNMP (traps)? If so would you know what documents are available?
    Cheers!

    Some of the parameters that you need to have with Physical standby database are :
    *.background_dump_dest='/ford/app/oracle/admin/xchbot1/bdump'
    *.compatible='9.2.0.7'
    *.control_files='/home30/oradata/xchange/xchbot1/control01.ctl','/home30/oradata/xchange/xchbot1/control02.ctl','/home30/orad
    ata/xchange/xchbot1/control03.ctl'
    *.core_dump_dest='/ford/app/oracle/admin/xchbot1/cdump'
    *.db_block_buffers=1024
    *.db_block_size=8192
    *.db_file_multiblock_read_count=8# SMALL
    *.db_files=1000# SMALL
    *.db_name='xchbot1'
    *.global_names=TRUE
    *.log_archive_dest_1='LOCATION=/home30/oradata/xchange/xchbot1/archivelog'
    *.log_archive_dest_2='SERVICE=standby'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_format='arch_%t_%s.arc'
    *.log_archive_start=true
    *.log_buffer=16384000# SMALL
    *.log_checkpoint_interval=10000
    *.max_dump_file_size='10240'# limit trace file size to 5 Meg each
    *.parallel_max_servers=5
    *.parallel_min_servers=1
    *.processes=50# SMALL
    *.rollback_segments='rbs01','rbs02','rbs03','rbs04','rbs05','rbs06','rbs07','rbs08','rbs09','rbs10'
    *.shared_pool_size=67108864
    *.sort_area_retained_size=2048
    *.sort_area_size=10240
    *.user_dump_dest='/ford/app/oracle/admin/xchbot1/udump'

  • Best Practice for monitoring database targets configured for Data Guard

    We are in the process of migrating our DB targets to 12c Cloud Control. 
    In our current 10g environment the Primary Targets are monitored and administered by OEM GC A, and the Standby Targets are monitored by OEM GC B.  Originally, I believe this was because of proximity and network speed, and over time it evolved to a Primary/Standby separation.  One of the greatest challenges in this configuration is keeping OEM jobs in sync on both sides (in case of switchover/failover).
    For our new OEM CC environment we are setting up CC A and CC B.  However, I would like to determine if it would be smarter to monitor all DB targets (Primary and Standby) from the same CC console.  In other words, monitor and administer DB Primary and Standby from the same OEM CC Console.   I am trying to determine the best practice.  I am not sure if administering a swichover from Cloud Control from Primary to Standby requires that both targets are monitored in the same environment or not.
    I am interested in feedback.   I am also interested in finding good reference materials (I have been looking at Oracle documentation and other documents online).   Thanks for your input and thoughts.  I am deliberately trying to keep this as concise as possible.

    OMS is a tool it is not need to monitor your primary and standby what is what I meant by the comment.
    The reason you need the same OMS to monitor both the primary and the standby is in the Data Guard administration screen it will show both targets. You also will have the option of doing switch-overs and fail-overs as well as convert the primary or standby. One of the options is also to move all the jobs that are scheduled with primary over to the standby during a switch-over or fail-over.
    There is no document that states that you need to have all targets on one OMS but that is the best method for the reason of having OMS. OMS is a tool to have all targets in a central repository. If you start have different OMS server and OMS repository you will need to log into separate OMS to administrator the targets.

  • Monitoring failover - Data Guard Broker

    Hi,
    I work on a Oracle 10.2.0.4 database on Solaris 10. It is a 2 node RAC database with a physical standby configured.
    I want to monitor (send a mail) to myself when failover occurs (which will be triggered by data guard broker ) , I think so I can monitor the failover using alert log (which normally does log the command when we initiate a failover) but I am not sure whether data guard broker also does the same( writes appropriate commands when a failover is triggered)
    Is there any other way we can come to know when a failover occurs (we can query database_role from v$dataguard status) but I am looking for some trigger that will be fired instantaneously when a failover is initiated ?
    Also is it possible to monitor the observer, whether it is up or not ?

    Hi,
    you have several possiblities to do that. Easiest is to use predefined Grid Control Events for it. Or you may put a trigger on the event "after DB_ROLE_CHANGE on database".
    Monitoring the observer can be done with dgmgrl like
    connect sys/<pw>@<cd>;
    show configuration verbose;That show you the presence and location of the observer.
    I give you an example for the usage of the trigger that starts a service depending on the role of the database. You may customize it to send you an email.
    begin
      dbms_service.create_service('safe','safe');
    end;
    create trigger rollenwechsel after DB_ROLE_CHANGE on database
    declare
      vrole varchar(30);
    begin
      select database_role into vrole from v$database;
      if vrole = 'PRIMARY' then
        DBMS_SERVICE.START_SERVICE('safe');
      else
        DBMS_SERVICE.STOP_SERVICE('safe');
      end if;
    end;
    /

  • Using OEM to monitor Data Guard database

    Can someone please send me the link or docs of how to use OEM monitoring data guard? In specific, I would like to use OEM to monitor and be sure logs are applying to stand by site.
    Any ideas?

    Hello ,
    I will extend the document on the Fast Failover feature one of these days.
    What you need to do is:
    For using Fast Failover, you need to configure the Data Guard observer process.
    The configuration of this process can be done by selecting the Fast-Start Failover Disabled link on the Data Guard page of the database (Primary or Standby).
    You will be automatically redirected to the Fast-Start Failover: Configure Page.
    From this page you can do the configuration of the DG observer process, that then will enable you to activate the Fast Failover feature.
    Regards
    Rob
    http://oemgc.wordpress.com

  • Difference between the Data Guard and Stand By

    Hi,
    Can any one specify the difference between the Standy and Data Guarding.
    Since are the Advantages of Data Guarding over the
    User Created Stand By Database.
    Thanks
    Pavan Kumar N

    DataGuard is used to allow you to create and manage standby databases, so I'm not totally clear on your question. If you're using DataGuard, you're creating standby databases.
    Are you talking about the difference between using DataGuard to manage your standby databases rather than writing your own scripts to manage your standby databases? If so, you've got cost issues-- DataGuard requires the enterprise edition, while you could write your own standby scripts using the standard edition. You've got support and testing issues-- if something goes wrong, you're on your own to debug your scripts. If you're using DataGuard, there is a variety of documentation available and a variety of options for support. Oracle has also invested quite a bit of time testing DataGuard with various failure scenarios-- it's likely that you wouldn't have that much time to test your own scripts. On a day-to-day basis, DataGuard provides integration with various monitoring utilities (i.e. Enterprise Manager) and provides a rather nice set of tables to view information about what's going on. DataGuard also provides functionality like the ability to automatically detect and resolve gaps in the archived log files that your scripts would not likely be written to handle.
    And, of course, your scripts could only manage a physical standby database. DataGuard can manage both physical and logical standbys.
    Justin

  • Data Guard Agent, Authentication Failure

    I'm working with two Windows 2003 servers, attempting to use one as a standby and one as a primary database use Data Guard. However, I'm having a bit of trouble when trying to get one server to communicate through the Management Agent and Management Service. I've done Management Agent installs on about 20 XP workstations and they've also worked wonderfully with the Oracle Grid Control.
    When the agent on my would-be standby database instance starts up I'm receiving the following errors in emagent.trc:
    2005-11-01 15:16:54 Thread-3836 WARN main: clear collection state due to OMS_version difference
    2005-11-01 15:16:54 Thread-3836 WARN command: Job Subsystem Timeout set at 600 seconds
    2005-11-01 15:16:54 Thread-3836 WARN upload: Upload manager has no Failure script: disabled
    2005-11-01 15:16:54 Thread-3836 WARN upload: Recovering left over xml files in upload directory
    2005-11-01 15:16:54 Thread-3836 WARN upload: Recovered 0 left over xml files in upload directory
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Metric RuntimeLog does not have any data columns
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Metric collectSnapshot does not have any data columns
    2005-11-01 15:16:54 Thread-3836 ERROR engine: [oracle_bc4j] CategoryProp NAME [VersionCategory] is not one of the valid choices
    2005-11-01 15:16:54 Thread-3836 ERROR engine: ParseError: File=D:\oracle\product\10.1.0\dg\sysman\admin\metadata\oracle_bc4j.xml, Line=486, Msg=attribute NAME in <CategoryProp> cannot be NULL
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name EFFICIENCY__BYTES_SAVED_WITH_COMPRESSION__AVG_PER_SEC_SINCE_START too long, truncating to EFFICIENCY__BYTES_SAVED_WITH_COMPRESSION__AVG_PER_SEC_SINCE_STAR
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name ESI__ERRORS__ESI_DEFAULT_FRAGMENT_SERVED__AVG_PER_SEC_SINCE_START too long, truncating to ESI__ERRORS__ESI_DEFAULT_FRAGMENT_SERVED__AVG_PER_SEC_SINCE_STAR
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name SERVERS__APP_SRVR_STATS__SERVER__REQUESTS__AVG_PER_SEC_SINCE_START too long, truncating to SERVERS__APP_SRVR_STATS__SERVER__REQUESTS__AVG_PER_SEC_SINCE_STA
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name SERVERS__APP_SRVR_STATS__SERVER__LATENCY__MAX_PER_SEC_SINCE_START too long, truncating to SERVERS__APP_SRVR_STATS__SERVER__LATENCY__MAX_PER_SEC_SINCE_STAR
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name SERVERS__APP_SRVR_STATS__SERVER__LATENCY__AVG_PER_SEC_SINCE_START too long, truncating to SERVERS__APP_SRVR_STATS__SERVER__LATENCY__AVG_PER_SEC_SINCE_STAR
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name SERVERS__APP_SRVR_STATS__SERVER__OPEN_CONNECTIONS__MAX_SINCE_START too long, truncating to SERVERS__APP_SRVR_STATS__SERVER__OPEN_CONNECTIONS__MAX_SINCE_STA
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name SERVER__APP_SRVR_STATS__SERVER__REQUESTS__MAX_PER_SEC_SINCE_START too long, truncating to SERVER__APP_SRVR_STATS__SERVER__REQUESTS__MAX_PER_SEC_SINCE_STAR
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name SERVER__APP_SRVR_STATS__SERVER__REQUESTS__AVG_PER_SEC_SINCE_START too long, truncating to SERVER__APP_SRVR_STATS__SERVER__REQUESTS__AVG_PER_SEC_SINCE_STAR
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Column name SERVER__APP_SRVR_STATS__SERVER__OPEN_CONNECTIONS__MAX_SINCE_START too long, truncating to SERVER__APP_SRVR_STATS__SERVER__OPEN_CONNECTIONS__MAX_SINCE_STAR
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Metric Wireless_PID does not have any data columns
    2005-11-01 15:16:54 Thread-3836 WARN metadata: Metric numberOfAppDownloadsOverInterval_instance does not have any data columns
    2005-11-01 15:17:00 Thread-4172 WARN vpxoci: OCI Error -- ErrorCode(1017): ORA-01017: invalid username/password; logon denied
    SQL = " OCISessionBegin"...
    LOGIN = dbsnmp/<PW>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MY_DATABASE)(PORT=1521))(CONNECT_DATA=(SID=CPD2DB)))
    2005-11-01 15:17:00 Thread-4172 ERROR vpxoci: ORA-01017: invalid username/password; logon denied
    2005-11-01 15:17:00 Thread-4172 WARN vpxoci: Login 0xe8c220 failed, error=ORA-01017: invalid username/password; logon denied
    2005-11-01 15:17:00 Thread-4172 WARN TargetManager: Exception in computing dynamic properties of {MY_DATABASE, oracle_database },MonitorConfigStatus::ORA-01017: invalid username/password; logon denied
    2005-11-01 15:17:01 Thread-4172 WARN vpxoci: OCI Error -- ErrorCode(1017): ORA-01017: invalid username/password; logon denied
    I've already toggled the Local Security Policy (Log On As Batch Job) setting in Windows, unlocked the Monitoring Profile account, etc. I've also tried to set the Preferred Host Credentials for the database, but it doesn't seem to want to authenticate the Windows 2003 Administrator user.
    Anyone have any other suggestions?

    Check the following:
    Does the user have administrative privilege on the system?
    Is the user running this part of ORA_DBA group?
    Does the user have the local security policy "Logon as Batch Job"?
    Have you set the OS Preferred Credential? If you are a domain user, this will be looking for domain\user name instead of just the user name.
    On another note:
    Have you doen any upgrades to the OMS repository?
    If yes, is the new Repository compatible with the EM Console?

  • Data Guard -- v$archive_log applied column shows wrong info

    I'm playing with 10g Data Guard. Both Primary and Physical Standby are in Maximum Availability mode. When I query v$archived_log column applied for dest_id=2 (which is physical standby) for some files it shows NO value but alert log on both primary and standby shows file transferred info. Even on physical standby v$archived_log shows log is applied YES value. My question is : So why is Primary database's v$archived_log shows value NO ?
    I am trying to setup crontab so that once I see value YES in primary's v$archived_log for dest_id = 2 then I can backup archived log file and delete it from primary database machine. But my perl script won't work because primary v$archived_log shows value NO for applied column for dest_id = 2.
    Thanks.

    Hi OrionNet,
    I think I am looking at the wrong column and also on the wrong database for what I need to do. Let me explain what I am trying to achieve.
    I have a shell script to check if archived logs are shipped from Primary to Standby AND if Standby successfully applied it or not. My shell script was looking at Primary databases using following query
    select sequence#, archived, applied
    from v$archived_log
    where dest_id = 2 -- running on Primary BUT looking at standby archived log destination
    order by sequence# ;
    SEQUENCE# ARCHIEVED APPLIED
    =====================
    58 YES YES
    59 YES YES
    *60* YES NO
    61 YES YES
    After reading [v$archived_log reference entry in manual|http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_1016.htm#REFRN30011]
    APPLIED Indicates whether the archivelog has been applied to its corresponding standby database (YES) or not (NO). The value is always NO for local destinations.
    This column is meaningful at the physical standby site for the ARCHIVED_LOG entries with REGISTRAR='RFS' (which means this log is shipped from the primary to the standby database). If REGISTRAR='RFS' and APPLIED is NO, then the log has arrived at the standby but has not yet been applied. If REGISTRAR='RFS' and APPLIED is YES, the log has arrived and been applied at the standby database.
    You can use this field to identify archivelogs that can be backed up and removed from disk.
    I think I should use following query on Standby database and not on primary database
    select sequence#, registrar, applied
    from v$archived_log
    where dest_id = 1 -- query running on standby so dest_id = 1 which is standby archive log destination
    and registrar = 'RFS'
    order by sequence# ;
    SEQUENCE# REGISTRAR APPLIED
    =====================
    58 RFS YES
    59 RFS YES
    *60* RFS YES
    61 RFS YES
    So, my shell script should connect to standby database from primary database and evaluate which archive logs to delete after backup from primary machine.
    Now I'll generate some gaps on Standby and check query again to make sure what I understand and expect is correct.
    Hope I am clear now. Thanks for your help. My bad, I didn't read the manual correctly the first time.

  • Oracle Data Guard in WAN

    Hello,
    I'm planning to setup DG in WAN  with 1GB or less  network pipe. What is the best mode to setup like Maximum availability or Maximum performanance or Max protection?
    Please share the ML also .
    thanks

    Hello,
    You'll find here a description of the 3 modes:
    Data Guard Protection Modes
    If you are not sure about the Network it's better to choose Maximum Performance (the default). By that way the Primary don't suffer from any delay in writing the redo to the Standby.
    With Maximum Protection the Primary is unavailable if the redo cannot be sent to the Standby.
    Maximum Availability is a go-between these 2 modes.
    Anyway, think about monitoring the redo application on the Standby so as to avoid any GAP. Also, you can set the parameter "archive_lag_target" to force a switch of the redo at regular interval.
    Hope this help,
    Best regards,
    Jean-Valentin Lubiez

  • Data Guard Observer with out Data Guard configured

    Hi, we are using manual log shipping and applying (scripts) to maintain the DR (physical standby). can I use Data Guard observer to monitor my dr and live and take actions when the primary database is unavailable?
    Thanks and Regards

    No.
    Observer needs a Broker configuration. A Broker configuration is designed for Data Guard. If you are using the EE version of Oracle you could switch to Data Guard and make these pieces work together.
    Observer is a Data Guard Broker Component. You use DGMGRL to manage the observer.
    Source : Data Guard Broker 11g Release 2 (11.2) E17023-06
    Best Regards
    mseberg

Maybe you are looking for

  • Export and re-import in to project keeping background transparent.

    Hi guys... I have had some joy and some no so joy... maybe I am doing something wrong.. I have been using a smoke emmitter and "flattened" this and re-imported back into project to save ram or to duplicate the layer (for more smoke) and also again sa

  • Set_server_cookie: problem with table size above 124 lines

    Hi SDN, we are on WAS700, SRM 5.5 system. We use Internet Explorer 6.0 I have built a BSP which works fine so far. It consists of 2 pages. i am using: CALL METHOD cl_bsp_server_side_cookie=>set_server_cookie       EXPORTING         name              

  • Bridge -Foto downloader zeigt keine Raw ( .cr2) an - Canon 40D

    Hallo, Ich habe die Adobe CS 4 Creative Suite. Dabei war auch Adobe Bridge. Leider zeigt der Fotodownloader aus Adobe Bridge keine .cr2 Dateien an ( USB Verbindung ). Da ich nur in Raw aufnehme, kann ich folglich den Fotodownloader ( gar ) nicht nutz

  • Right Clicking in Captivate 7

    I'm using Captivate 7 and have some right click boxes in a simulation.  When I preview in web browser, they work fine.  When I publish with Enable Accessability turned Off, and preview in IE, they become inactive.  Am I missing something? Thanks.

  • Make to Order Delivery pulling total qty.

    Hello, We are experiencing some strange behavior when pulling the delivery for Sales Order Stock The scenario is this: SO = 12 5 issued to Sales Order Stock In transaction code VL10G the total quantity of 12 is pulling on the delivery and not the qua