How to check if physical Standby is in phase with the primary

Hi all

I'm new in Data Guard. In our current production, my boss asked me to write a shell scripts for monitoring physical standby and archive primary's sync (gap of archive)

I refer metalink [861595.1 ID], but when I ran the first query to the primary node, the screen lock.

On primary
========

SQL > SELECT THREAD # "Thread", SEQUENCE # 'last generated sequence.
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 trace SQL, SQL consume a lot of CPU and it full table scan in X table KCCAL $.

Eye of TKPROF result as 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.00
Because of this is the production environment, so I had put an end to the session, anyone can teach me or share with me the physical monitor in standby mode scripts is sync with primary or not? Or you encounter the above problem when you run the SQL code?

My version of db is Oracle 11.2.0.1.0


Thanks in advance.

Kind regards
Klnghau

Just be aware that these queries are queries controlfile and if they run too long can get in the road of the database as they hold controlfile locks. You'd better watch the view v$ dataguard_stats the day before and look at the GAL apply and transport.

We are also a few scripts in our book - http://www.amazon.com/Oracle-Guard-Handbook-Osborne-ORACLE/dp/0071621113

Larry

Tags: Database

Similar Questions

  • How to check only my laptop computer use integrated or the AMD graphics card?

    How to check only my laptop computer use integrated or the AMD graphics card? Some games show me that they use the built-in map: http://img849.imageshack.us/img849/4125/98ab1c28dc9f4b51b537435.png ?

    I have no other option. I have disable Intel card in Device Manager, and it shows me that the AMD driver is not installed correctly. Thank you.

  • Check that this class has been marked with the annotation @Entity

    Hello


    We have a level of the shared lib App that makes all the APP associated with request for an application. And each application can use the lib goes to get the related JPA query to do.
    To define the scope of the Joint Parliamentary Assembly between App. We have created the EMF for each application.

    When an application to run and any associated APP action that it works fine, but when trying to run a second application we are seeing the following error message when you try to do a specific action JPA.


    the @Entity annotation.
    [2012 05-23 T 04: 08:16.839 - 07:00] [WC_Spaces] [ERROR] [] [oracle.webcenter.spaces] [tid: [ASSETS].] [ExecuteThread: '3' for the queue: "(self-adjusting) weblogic.kernel.Default"] [ecid: 5825b814-2931-4ad5-8dc3-3e18f66992b7-00000004,0] [APP: webcenterCustom] []
    java.lang.IllegalArgumentException: unknown entity bean class: oracle.webcenter.spaces.internal.repository.WcSpaceHeader class, please check that this class has been marked with the @Entity annotation.
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:648)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:532)
    at oracle.webcenter.spaces.internal.repository.SpaceRepositoryUtils.refreshSpaceRows(SpaceRepositoryUtils.java:1791)


    Where WcSpaceHeader is an entity.

    To create emf by App, this is the code


    private static EntityManagerFactory getEntityManagerFactory()
    {
    String appName = Utility.getApplicationName ();
    EntityManagerFactory emf = sEntityMgrFactory.get (appName);

    if(EMF==null)
    {
    EMF = Persistence.createEntityManagerFactory ("SpacesReposPUnit");
    sEntityMgrFactory.put (appName, emf);
    SpacesConstants.LOGGER.info ("Caching" +)
    ("EMF for" + appName);
    }

    return of the emf;
    }



    My persistence.xml

    <? XML version = "1.0" encoding = "US-ASCII"? >
    < persistence xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xsi: schemaLocation = "http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd".
    version = "1.0" xmlns = "http://java.sun.com/xml/ns/persistence" >
    < name of persistence - unit = "SpacesReposPUnit" transaction-type = "RESOURCE_LOCAL" >
    <>provider
    org.eclipse.persistence.jpa.PersistenceProvider
    < / provider >
    oracle.webcenter.spaces.internal.repository.WcSpaceHeader < class > < / class >
    oracle.webcenter.spaces.internal.repository.WcSpaceUsrDetail < class > < / class >
    oracle.webcenter.framework.service.jpa.WcCommonXlationEntity < class > < / class >
    oracle.webcenter.spaces.internal.repository.WCNavigationActivity < class > < / class >
    Properties of <>
    < name = "eclipselink.session.customizer property"
    value="Oracle.WebCenter.spaces.internal.repository.SpacesEclipselinkSessionCustomizer"/ >
    < / properties >
    < / persistence - unit >
    < / persistence >



    Another problem I see in this is that. When I create an EMF EM, (which is different for different app) and do a query, I get a class cast Exception.


    [(self-adjusting)'] [ecid: 5825b814-2931-4ad5-8dc3-3e18f66992b7-00000004,0] [APP: webcenterCustom] []
    java.lang.IllegalArgumentException: unknown entity bean class: oracle.webcenter.spaces.internal.repository.WcSpaceHeader class, please check that this class has been marked with the @Entity annotation.
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:648)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:532)

    It is a problem of class loader, somehow you have deployed the same classes in two places, have two versions of the classes.

    How, exactly made things, where are your domain classes?

    The questions is more likely that,
    Persistence.createEntityManagerFactory ("SpacesReposPUnit");
    always returns the same plant once it has been deployed.

    If you pass a map properties for createEntityManagerFactory and set the property "name eclipselink.session" a single value, then you should get a new plant.

  • Does anyone know how to open an old MS Word document file with the .ltr file extension?

    original title: file extension

    Does anyone know how to open an old MS Word document file with the .ltr file extension?  I would appreciate your help.  Thank you.

    If it's a Word document, why not just use Word to open it?

  • How can I search all subjects in my guide? and if this is not possible, how do I get books have not not subjects with the same name?

    How can I search all subjects in my guide? and if this is not possible, how do I get books have not not subjects with the same name?

    "People need be able to find these without having to look inside each book TOC.

    Sorry, but I'm not a big fan or user of this sensitive arrangement "New kid on the block. Therefore, it may be that I am simply misunderstanding because I do not regularly use it. Of what you say, it seems to me that if you (or more precisely your users) are not able to click on the right side, where he says 'Getting Started' or 'List of Email Campaign' and see these topics open and view the content with search terms highlighted?

    Regarding the "bookmarks", those that are normally visible by the user and will be not viewable unless the name of the bookmark appears also as text within the topic. Although, if the two are different, you could probably get there by adding the name of the bookmark as a keyword search in the properties of the section.

    In any case, I feel that at this point, I can just be frustrating you and you may need someone else to try to help that probably better understand the issue.

    Sorry, I was not able to help.

    See you soon... Rick

  • How can I use a vector image to stretch with the background in Muse master pages?

    How can I use a vector image to stretch with the background in Muse master pages?

    Click on the 'Fill' text not the drop-down arrow.

  • I have a Macbook Pro which is not a hard drive.  How to install Adobe Photoshop elements 11 that came with the Epson scanner, I bought.  I registered S/N, and I can't find the free download anywhere alone trials.

    I have a Macbook Pro which is not a hard drive.  How to install Adobe Photoshop elements 11 that came with the Epson scanner, I bought.  I registered S/N, and I can't find the free download anywhere alone trials.

    Downloads available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • How to open a physical standby database "Manual" in read/write mode

    Hello

    I am running Oracle Database 10g Release 10.2.0.3.0 - 64 bit Standard Edition Production on Linux version 2.6.9 - 42.0.8.ELsmp ([email protected]) (version gcc 3.4.6 20060404 (Red Hat 3.4.6 - 3))

    I created a physical standby database, but since I am running Standard Edition, I don't use the features in DataGuard. I use the utility rsync to copy on the data pending archivelogs, and I periodically applied to the standby database.

    The standby database is started in this way:

    startup nomount pfile='/u01/oradata/orcl/initorcl.stdby';
    ALTER database base_de_donnees eve of Mount;

    Everything works perfectly, I can "open database in read-only alter" and then I can make selects in the tables to confirm that everything is up-to-date.

    The thing is, if I stop the database and then perform the boot simply:

    stop immediately;
    start-up;

    The database opens with an error message, but it is always in read-only mode...

    I read that the default behavior for a database ensure must open read-only, as I am experiencing, but I would like to know what is the right way to open it in read-write mode correctly (I understand that after this, my watch will not standby more and I need to recreate my database pending).

    Thank you

    Carpet

    Try: -.

    ALTER database activate standby database;

    This should open read-write (you will not be able to recover thereafter)

  • Establishment of a physical standby on a server with a different structure

    I'm having some trouble putting in place a database of physical intelligence.

    The main database has a different naming structure the day before and they are on different sites.
    Physical is/var/hpsrp/ctrorp03/oradata/u0x / < DB_NAME > / < DB_UNIQUE_NAME > and Eve is/var/hpsrp/drforp03/oradata/u0x / < DB_NAME > / < DB_UNIQUE_NAME >.

    I put db_file_name_convert '< MAIN path >', '< PATH of EVE >' multiplied by the number of paths in the form of pairs.
    I created an empty database for the day before and after taking a full backup of the primary with the control file and the control file ensures.

    Now, I touched the issues:
    The incarnation of DB numbers are different.
    When I try and do a normal restore for example set dbid, restore controlfile; Mount; It fails as it tries to find files in the primary structure and the structure not to sleep.
    When I try to rename via set newname or auxname it can't find files to restore I guess because of the id of the incarnation
    If I put the id of the incarnation and try to restore backup it fails as an identifier of the incarnation do not match.

    I have tried looking through various forums and documentation, but impossible to find a solution, probably can't see the forest for the trees well because there are so many things.

    Someone there done that type of configuration before and can give me some advice?

    Ok

    What I consider 'sleep data by is an active database with RMAN'

    http://www.Visi.com/~mseberg/standby_creation_from_active_database_using_rman.html

    The thing with your is the location of your LOG files and DATA.

    Where are they now?

    Where they need to be on standby mode?

    Note that this method use a SPFILE so that the settings are made to change the location of the files.

    If you do it right the order is as simple as

    $ORACLE_HOME/bin/rman target=sys/@primary auxiliary=sys/@standby
    
    RMAN>duplicate target database for standby from active database NOFILENAMECHECK;
    

    Also I and others trying to help you do it for the points. Marking of some of these useful tells us that we are really helping and not only to waste time.

    use

     followed a few lines later with 
    

    change the CODE to the code and to everywhere in between.

    Best regards

    mseberg

  • How to check if there is data in form of the signatory

    I use the v2 API and have a problem with the last update.

    We have an an optional field on one of our documents. When we built our integration, we ask the form data, and if the field was not filled, we would get an error. Now, we get form data downloaded even if the user has not filled what whatsoever. I know that now is the expected behavior and see the value. However, it leaves us with a problem.

    How can I have a query, using the api v2, there is data from form provided by the user or not? Web echosign as GUI seems to have access to this information because it will put a flag on the agreement, but I can't find how to do it in the api.

    Thank you

    Darren

    I worked with the support of Echosign on it and there seems to be no direct api solution. My concern in creating my own solution was successfully manage all our current and future agreements with all the fields they have and being as safe as possible future changes in the behavior of EchoSign. That's what I came with:

    Every day, I call getFormData for an old agreement without data form called. I save the headers in the first row of the csv file. When we have a new agreement in the next 24 hours, I call getFormData for him and then compare the new csv headers to the known empty headers. If they match, I guess that's empty, if they do not match I guess that the signer filled in some fields. It will be immune to future changes EchoSign to the fields returned by getFormData (with a window of 1 day of possible error). This solution is based on the current behavior of getFormData only the fields with the data returned.

  • How to check generating a lot of archivelogs/session of the user?

    Hello

    On a 10g database, how can I get to the session/user who generates a lot of archivelogs?

    Thanks in advance,

    For the currently connected sessions, you can query V$ SESSTAT (join to V$ STATNAME). Therefore,.

    select s.sid, s.value
    from v$sesstat s, v$statname n
    where s.statistic#=n.statistic#
    and n.name = 'redo size'
    order by 2
    /
    

    However, there are few complications:
    1. persistent Sessions will appear with very high statistics, simply because they have not disconnected. Many applications maintain permanent Sessions for one of
    a. follow-up and ongoing execution user submitted or jobs at the request (for example, in Oracle e-Business Suite and Peoplesoft)
    b. connection pooling
    2. the Sessions that have already disconnected will not appear in your report.

    Therefore, you have to frequent meetings of "sample" and find that the differentials redo size. Then, another complication hits you:
    c. oracle reuses the Session ID. Once a session disconnects, another session of connection can get the same SID. He could get the same serial number immediately, so you might want to use a combination of SID + SERIAL # from V$ SESSION as your key (you will need to add V$ SESSION in your query of surveillance) even in this case, I would not ensure that the couple would not repeat after some time, especially with the restart of the instance.
    You would be better to use AUDSID from V$ SESSION, that this value is incremented (and not reused) auditing session.

  • ORA-27037 standby after you have moved the primary files

    I'm under Oracle 11.2 with a physical Data Guard configuration primary and standby on Solaris 10.  Asked me to move all the files belonging to the primary to a new mount point.  This includes the datafiles, tempfiles, ORLs, litigants and the controlfile.  On the main file system files were located on /u07 and are now on /u03.  Pending files are on /u07.

    Here's what I did:

    Cancel managed recovery and stop in standby mode.

    Judgment of the primary.

    A file system has copied on the primary /u07 to /u03.

    Control_files primary init.ora file parameter to point to the new location on /u03 and change log_archive_dest_state_2 = DEFER

    Renamed the primary spfile with a ".bak" then primary would begin by init.ora file.

    Elementary school:

    startup mount;

    Run A SQL script to rename the data files, tempfiles, ORLs and SRls to the new location on /u03.

    ALTER database open;

    Create spfile from pfile;

    stop immediately;

    start-up;  (so primary is now started with a spfile)

    Standby:

    Change these two lines in the init.ora file:

    *.db_file_name_convert='/U03/oradata/mydb/','/U07/oradata/mydb /'

    *.log_file_name_convert='/u03/oradata/MYDB/log','/u07/oradata/MYDB/log_ '

    Note: When Eve was created first, someone created the ORLs with a different name of the primary.  For example, major newspapers are named log1a, log2a and log3a.  The day before, they are named log_1a, log_2a and log_3a.

    Renamed the spfile Eve with a ".bak" then Eve would begin by init.ora file.

    bootable media;

    At this point, I have seen these errors in the standby alert log:

    Errors in the /oracle/diag/rdbms/mydb_stby/MYDB/trace/MYDB_lgwr_27569.trc file:

    ORA-00313: open failed for the members of Group 3, Journal of thread 1

    ORA-00312: wire 3 1 online journal: ' / u07/oradata/MYDB/log3a.dbf'

    ORA-27037: unable to get file status

    SVR4 error: 2: no such file or directory

    Additional information: 3

    ARC3: Started archiving

    ARC0: FROM PROCESS ARCH COMPLETE

    Here are my questions: why is the database ensures looking for online newspapers as they are named in the primary?  (Without the underline in the name)

    Should I have set STANDBY_FILE_MANAGEMENT = MANUAL on the primary and standby and renamed implementing the ORLs in the standby?

    What I ended up doing was closing the day before and rename the ORLs on the filesystem depending on how they are named on the primary.  Then, the day before, I did:

    startup mount;

    change retrieve in database managed automatic standby database using the current log file disconnect from the session;

    Then, on the primary, I did: alter system set log_archive_dest_state_2 = ENABLE;

    Everything looks OK, which means, newspapers are shipped from the primary to the standby and applied on the day before.

    I wonder, what would I have done differently to avoid first encountered this error?  Also, is my valid Eve at this point?  I see no problem in the primary alert log or journal alerts in mode standby.

    Mimi Miami wrote:

    Thank you, CKPT.  Now, I understand my misunderstanding with the log_file_name_convert parameter.  The parameter is used to convert file locations of the ORLs on standby, not the name of the file of the BDL himself, correct?  Knowing this, would it not imperative that the file is named game?  In other words, I can't have an ENT named log1a on the primary with his match on the eve log_1a appointed, right?

    Yes, setting gives way where to redirect the log files, but what happens if the mentioned directory does not exist on the database pending?

    As on previous day $ls ltr - / u07/oradata/MYDB/log_

    When there is no available pending directory as you have not mentioned in LOG_FIILE_NAME_CONVERT then it cannot translate the strings either.

    File names, you can have anything but basically LOG_FIILE_NAME_CONVERT is here to rename the log files if there are in different places.

  • How to config a cache shared for several environments with the C API

    How to config a cache shared for several environments with C API?  Like Java edition. Chapter 2. Database environments

    I want to open the large number of databases, at least 10,000. But as the counties of open databases increase, the db-> open become very slow operation. It took almost 2 hours for 10 000 databases.

    So I try to distribute these databases on multiple environments (for example, 5 envs). And to improve the efficiency of memory use, I want to share cache between ENVS.

    Hello

    We do not support the cache sharing between different environments as you mentioned.

    We have tested the case of the opening of 100 000 databases, see the number that you have encountered, we will check what is happening.

    Kind regards

    Winter, Oracle Berkeley DB

  • How can contuit I remove it from my mac with the terminal app

    I have a medium mac 13 "13 and 8 GB of ram and 256 ssd with macosx 10.11.5

    I saw installed without my knowledge (idon't know where) "contuit" and in google chrome, homepage changed looking for cobecube or something like this may how how I remove it from my mac with the terminal app

    http://www.thesafemac.com/arg-conduit/

  • Firefox wants to update (again!) now at version 6. How will I know that my extensions are compatible with the new version?

    I checked with the developer of the extension sites, but they do not yet report if the extension has been tested with Firefox 6.0. 3.6-4.0 switch left me with a gap in functionality of my extensions, although the switch of 4.0 to 5.0 went smoothly. I remember that the installer for 4.0 tested my extensions for compatibility before asking me to confirm if I wanted to install. 6.0, however, says he is already downloaded and just waiting for me to restart Firefox. Mozilla seems to be getting less polite and more aggressive on updates.

    When Firefox starts to install the updated version, it shows you the Add-ons that won't be Compatible with the new Firefox version that is being installed. You can cancel the Installation at this stage.

    I'm not sure about this, but you can also use - Add-on Compatibility Reporter 0.8.7

    Check and tell if its working.

Maybe you are looking for

  • build path

    In the indicators is both (' added path 1' & 'added path 2') will have the same value. Now my query: The method windows 'Alternative' is specific?

  • installation of service pack

    Can I install Service Pack 1 or 2, if I already have Service Pack 3?  I need to uninstall Internet Explorer 8 and back to Explorer 7.  They said the Explorer 8 could not be removed if it added before Service pack 3 and I can't remove it programs.  Th

  • Files do not automatically load on USB bootable windows 7.

    Original title: Windows 7 usb problem. I prepare the USB bootable windows 7 when I pluged in the usb (press any key to continue) do not come and the files load automatically?

  • Images of Smartphones Facebook blackBerry imported in the telephone directory

    My wife had just lost his Blackberry Curve 8330.  We replaced with the same model.  I ran my laptop system restore, and it added all of his contacts, etc.  Now his photos to his contacts are the images that the person has posted on Facebook! There ev

  • activation of printing caused wireless printer HP Multifunction Pro L8770 to freeze all the time.

    Product: Range of HP Pro L8770 multifunctional printers Operating system: Windows Vista No error message; the printer display screen froze after that I enabled printing on a printer wireless by entering the password for my Internet. Now, the wireless