Prereq query for Logical Standby runs for days

Have had an SR open for a month that isn't getting anywhere, thought I'd check here and see if anybody has run into this.
We're looking at setting up a logical standby database, Oracle 11.2.0.3 on AIX running PeopleSoft.
There is a prereq query in the Oracle manual which is also run via the GC wizard to find tables without unique logical identifiers.
SELECT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_NOT_UNIQUE
WHERE (OWNER, TABLE_NAME) NOT IN
(SELECT DISTINCT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED)
AND BAD_COLUMN = 'Y';
My problem is that the darned thing runs for 5.5 days.
The view in that query runs the function  logstdby$tabf, which runs the following SQL over and over and over and over:
SELECT * FROM LOGSTDBY_UNSUPPORT_TAB_11_2B
Each time it runs the LOGSTDBY_UNSUPPORT_TAB_11_2B query is about 8 seconds. Run it 100,000 times and that adds up. Looks like the big problem in that query is full table scans of TAB$ and COL$.
Anybody seen it? Anybody fixed it?

Good suggestion - in 15 minutes you got farther than support did in 2 weeks.
Rather than remove the sub-query, I can change it into a minus, which is functionally equivalent to the original but changes the executions on DBA_LOGSTDBY_UNSUPPORTED from many times to just once.
select owner, table_name from dba_logstdby_not_unique
where bad_column = 'Y'
minus
select distinct owner, table_name from dba_logstdby_unsupported;
The top part of the query still takes 9.5 hours to run though, with the time now being spent the following SQL which is called from the function logstdby$tabf which is called from the view DBA_LOGSTDBY_NOT_UNIQUE :
SELECT * FROM LOGSTDBY_SUPPORT_TAB_11_2B
Sorry for not putting that in the original post, but I want the original query to run if possible so the GC wizard will work - and I didn't want to clutter up the question.

Similar Messages

  • Do I need ASM for logical standby server?

    I am using ASM in production, when I created physical standby for it, system asked me create ASM file system on it else it is not possible. My question is do I need ASM file system for logical standby too.?
    Thanks

    You can have the primary database on ASM and the standby on filesystem if you want.
    You just need to set db_file_name_convert and standby_file_management. I have tested this will physical, but not logical standby.

  • Query for logical standby

    Hi ,
    We have one logical standby database is running for our production database .
    Now business require one more logical standby for reporting purpose
    so during step for creating new logical standby we need to run
    EXECUTE DBMS_LOGSTDBY.BUILD;
    so is this will impact exsiting logical standby ? or we don't run this time this statemnet ?
    Thanks
    Gaurav

    user12219815 wrote:
    Hi ,
    We have one logical standby database is running for our production database .
    Now business require one more logical standby for reporting purpose
    so during step for creating new logical standby we need to run
    EXECUTE DBMS_LOGSTDBY.BUILD;
    so is this will impact exsiting logical standby ? or we don't run this time this statemnet ?
    Thanks
    Gauravno need to execute.

  • Metadata query to extract each session run duration for last 10 Runs (10 days if daily scheduled)

    Hi all, Please can anybody help me with metadata query to extract all the sessions run duration information (start time and end time, run duration)in each workflow for last 10days.I dont have access to metadata repository so need exact query so that i can raise a request to admin team(he needs exact query). I know that we can get information from REP_WFLOW_RUN , but i dont know the table structure so please provide full query. Thanks,Ravi kumar

    Hi all, Please help me with metadata query to extract each session RUN_DURTION, Start Time, end time for last 10 runs of each session at a workflow level. I know we can get information from REP_WFLOW_RUN table but i dont know table strucure and I dont have access to Repository database and we need an exact query to raise it to admin team. so please provide me an exact query.   Thanks

  • Logical Standby: WAITING FOR DICTIONARY LOGS status.

    Hi,
    I have just configured a Logical Standby from Physical Standby, I followed all steps explained in section 4.2.1 from the Oracle® Data Guard Concepts and Administration 10g Release 2 (10.2) documentation, but now my logical standby stay on WAITING FOR DICTIONARY LOGS more than 3 days, all archives from primary DB have been replicated and registered, I don't understand whats
    wrong.
    SQL> SELECT * FROM V$LOGSTDBY_STATE;
    PRIMARY_DBID SESSION_ID
    REALTIME_APPLY
    STATE
       144528764          1
    Y
    WAITING FOR DICTIONARY LOGS
    Fri Apr  8 18:05:47 2011
    RFS LogMiner: Registered logfile [/archive/dbp/581440892_1_0000157573.arc] to LogMiner session id [1]
    Fri Apr  8 18:10:55 2011
    RFS LogMiner: Client enabled and ready for notification
    Fri Apr  8 18:10:55 2011
    Primary database is in MAXIMUM PERFORMANCE mode
    RFS[3]: Successfully opened standby log 4: '/redo2a/dbp/redo4a_stb.log'
    Fri Apr  8 18:10:58 2011
    RFS LogMiner: Registered logfile [/archive/dbp/581440892_1_0000157574.arc] to LogMiner session id [1]
    Fri Apr  8 18:15:54 2011
    RFS LogMiner: Client enabled and ready for notification
    Fri Apr  8 18:15:54 2011
    Primary database is in MAXIMUM PERFORMANCE mode
    RFS[3]: Successfully opened standby log 3: '/redo1a/dbp/redo3a_stb.log'
    Fri Apr  8 18:15:57 2011
    RFS LogMiner: Registered logfile [/archive/dbp/581440892_1_0000157575.arc] to LogMiner session id [1]Thanks in advance.
    My Oracle version is: 10.2.0.4
    My Platform is: AIX 6.1
    Nataly.

    On standby alert no error messages found.
    RFS LogMiner: Client enabled and ready for notification
    Mon Apr 11 18:09:58 2011
    Primary database is in MAXIMUM PERFORMANCE mode
    RFS[3]: Successfully opened standby log 4: '/redo2a/mefsf/redo4a_stb.log'
    Mon Apr 11 18:10:01 2011
    RFS LogMiner: Registered logfile [/archive/mefsf/581440892_1_0000157782.arc] to LogMiner session id [1]
    Mon Apr 11 18:23:16 2011
    RFS LogMiner: Client enabled and ready for notification
    Mon Apr 11 18:23:16 2011
    Primary database is in MAXIMUM PERFORMANCE mode
    RFS[3]: Successfully opened standby log 3: '/redo1a/mefsf/redo3a_stb.log'
    Mon Apr 11 18:23:18 2011
    RFS LogMiner: Registered logfile [/archive/mefsf/581440892_1_0000157783.arc] to LogMiner session id [1]Continues
    On primary alertlog,
    There is a common message:
    ORACLE Instance bdprod - Archival Error. Archiver continuing.
    Mon Apr 11 18:22:57 2011
    Errors in file /oracle/app/oracle/admin/bdprod/bdump/bdprod_arc4_2818414.trc:
    ORA-00308: cannot open archived log '/archive/bdprod/581440892_1_0000157545.arc'
    ORA-27037: unable to obtain file status
    IBM AIX RISC System/6000 Error: 2: No such file or directory
    Additional information: 3
    Mon Apr 11 18:22:57 2011
    FAL[server, ARC4]: FAL archive failed, see trace file.
    Mon Apr 11 18:22:57 2011
    Errors in file /oracle/app/oracle/admin/bdprod/bdump/bdprod_arc4_2818414.trc:
    ORA-16055: FAL request rejected
    ARCH: FAL archive failed. Archiver continuing
    Mon Apr 11 18:22:57 2011
    ORACLE Instance bdprod - Archival Error. Archiver continuing.
    Mon Apr 11 18:22:57 2011
    Errors in file /oracle/app/oracle/admin/bdprod/bdump/bdprod_arc1_7078038.trc:
    ORA-00308: cannot open archived log '/archive/bdprod/581440892_1_0000157546.arc'
    ORA-27037: unable to obtain file status
    IBM AIX RISC System/6000 Error: 2: No such file or directory
    Additional information: 3
    Mon Apr 11 18:22:57 2011
    FAL[server, ARC1]: FAL archive failed, see trace file.
    Mon Apr 11 18:22:57 2011
    Errors in file /oracle/app/oracle/admin/bdprod/bdump/bdprod_arc1_7078038.trc:
    ORA-16055: FAL request rejected
    ARCH: FAL archive failed. Archiver continuing
    Mon Apr 11 18:22:57 2011
    ORACLE Instance bdprod - Archival Error. Archiver continuing.

  • Open Mode for Logical Standby

    HI,
    I have a logical standby. It's v$database.open_mode shows READ WRITE
    Q1. I am correct in assuming that the Database is only writable for tables that are not in the primary ?
    Q2. Are the tables that are also in the primary, in effect in read only mode on the logical standby ? Am I able to see the mode of these tables to prove they are read only ?
    thanks,
    Jim

    Hello;
    User modification to tables on the Logical Standby has three possible settings:
    ALL
    STANDBY
    NONE
    You can check the mode using this query:
    SELECT GUARD_STATUS FROM V$DATABASE;
    If you try to insert data into a table and the mode is 'ALL' and you are not the SYS user you should get an error
    ORA-16224
    If you want users to modify non-replicated standby tables then you need to change the mode from its default of 'ALL'.
    You can use DBA_LOGSTDBY_SKIP to find non-replicated tables ( the ones with skip rules ).
    If you create new objects consider a naming convention that allows you to easily see the write status.
    Best Regards
    mseberg

  • Default logic not running for a particular team

    Hello,
    I have a financial consolidation application in BPC 7.5 NW. We have a particular problem, whereby the default logic is not running for one team when they are uploading data. The error message is "Error running default logic. Error converting records. The root element is missing".
    Users in other teams are not affected by this and they are able to upload data successfully without any problems and are able to view converted records.
    Can someone please explain how this is possible in BPC?
    Also, our development consultant created 2 copies of the default logic in the Finance application. In the admin consol, one is called "Default.LGF" and the other one "DEF BU 9 Mar 2011.LGF". Can anyone kindly explain whether it is possible to have 2 copies of the default logic and if so, how does BPC decide which one to run.
    In both versions of the default logic, the following code is inserted for FX translation:
    // Query 6  - Perform currency translations - run currency translation stored procedure
    *XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%
    *XDIM_MEMBERSET TIME=%TIME_SET%
    *XDIM_MEMBERSET ENTITY=%ENTITY_SET%
    *XDIM_MEMBERSET MEASURES=YTD
    *RUN_PROGRAM CURR_CONVERSION
          CATEGORY = %CATEGORY_SET% 
          CURRENCY = GBP
          TID_RA = %TIME_SET%
          RATEENTITY = GLOBAL
          OTHER = [ENTITY = %ENTITY_SET%]
    *ENDRUN_PROGRAM
    *COMMIT
    Thank you very much.
    Edited by: kashifmehmood on Jun 17, 2011 4:12 PM

    Hi
    1.Users in other teams are not affected by this and they are able to upload data successfully without any problems and are able to view converted records.
    One of the reason may be there are some secured dimensions involved like Entity, which is not assigned to the team. Refer to the HTG document below:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/207995e8-deb8-2d10-3cb9-8ab146c95a09?quicklink=index&overridelayout=true
    2.Also, our development consultant created 2 copies of the default logic in the Finance application. In the admin consol, one is called "Default.LGF" and the other one "DEF BU 9 Mar 2011.LGF". Can anyone kindly explain whether it is possible to have 2 copies of the default logic and if so, how does BPC decide which one to run.
    In my opinion your consultant created "DEF BU 9 Mar 2011.LGF" and maintained the logic in that logic file. To run the logic by default, he has to call the earlier logic file in DEFAULT.LGF.
    *INCLUDE DEF BU 9 Mar 2011.LGF ( Nothing wrong in  keeping the entire logic, but it is not required)
    Logic file ""DEF BU 9 Mar 2011.LGF" can be called by DM packages.
    Thanks

  • 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

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

  • Discoverer query a logical standby rather than production via db link

    Hello,
    I have read in some oracle documentation that oracle does not support discoverer on a logical standby database because the EUL tables need write access. So oracle recommends having the EUL tables on a write enabled database (Production) and then link to data on a logical standby.
    Is anyone doing something like this currently? I am curious how this would be configured? And is it worth it?
    Thanks

    Hi Olivier
    You need to point your EUL folders at the other database using a database link. Then whenever Discoverer sees that folder it will call the database link and the data will come from the other database.
    Therefore, you need to have a schema on the other database that has SELECT permissions on all of the objects that you want to query. After satisfying yourself that you have such a schema, on the local database you create a database link to the other database using the schema that has the permissions. In order to create the database link your will of course need to be logged on locally using an account that has permission to create such a link and you will need to know the password of the schema in the other database.
    If you don't create a PUBLIC database link you will also need to make sure that your EUL owner and all of your users can access it. More often than not I will use a PUBLIC database link which saves all the trouble.
    Here is a script for a PUBLIC database link. The link is called LOCAL_TO_STANDBY and as you can see the user I am connecting as is called APPS with a password of STANDBY_APPS (entered in the IDENTIFIED BY section):
    CREATE PUBLIC DATABASE LINK LOCAL_TO_STANDBY
    CONNECT TO APPS
    IDENTIFIED BY STANDBY_APPS
    USING '(DESCRIPTION =  (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.20)(PORT = 1521)) ) (CONNECT_DATA =  (SERVICE_NAME = STANDBY)  )  )';
    You will of course have to change your database connection information by altering the IP address or the host or replacing this with a fully qualified domain name, you then have to provide the PORT and the SERVICE_NAME for the database you will be connecting to.
    To test the connection, try this:
    SELECT FROM DUAL@LOCAL_TO_STANDBY;
    Does this help?
    Best wishes
    Michael

  • What are advantage and disadvantage for Physical Standy and Logical Standby

    HI,
    What are advantage and disadvantage for Physical Standy and Logical Standby configuration?
    Thanks
    Ken

    Logical standby database
    The key advantage for logical standby databases is that they're opened read/write, even while they're in
    applied mode. That is, they can be used to generate reports and the like. It is indeed a fully functional
    database. Also, additional indexes, materialized views and so on can be created.
    However (this being a disadvantage) not all datatypes are supported.
    Oracle (or more exactly the log apply services) uses the primary database's redo log, transforms them into
    SQL statements and replays them on the logical standby database.
    Physical standby database
    A physical standby database is a byte for byte exact copy of the primary database. This also means that
    rowids stay the same in a physical standby database environment.
    Oracle (or more exactly the log apply services) uses the primary database's redo log to recover the
    physical database.
    A physical standby database might be opened read only; however, the received logs are in this case not
    applied. When the logs are applied, the database is not accessible (it is then in a managed recovery state).
    Regards,

  • Procedure for creating logical standyby database for oracle 11g?

    Hi all,
    can anybody provide me docs /procedure for creating logical standby databse for oracle 11g standard edition.
    Aravind

    Aravind,
    1. The Oracle Standard Edition does not have standby mechanism, you should do it manually or go for Enterprise Edition.
    2. It's rather a question for General Database Discussions instead of Peoplesoft.
    Any further question regarding that point, please post out there.
    Nicolas.

  • Logical goes down for some reason and it can't be recovered.(data guard)

    This is not an issue, just wanted to know how this can be done.
    Logical goes down and it can't be recovered. How can one recreate the logical standby?
    Is this a fresh restore of primary? what are the steps to follow?
    Thanks in advance.

    For Physical standby, since it's block to block identical with primary. You could use backup of primary to recover physical standby. There's usually no need to backup physical standby.
    For logical standby, since you could have other schema hosted on it in addition to the one that protected by data guard. It's good idea to have separate backup from primary.
    Otherwise, rebuild from primary is always an option.

  • Depreciation run For Period 2

    Dear All,
    Currently am configuring a simple scenario of asset configuration fop book depreciation
    i have done the depreciation run ( Both Test Run & Back ground Processing ) for the period 1 and the posting was done successfully
    when i went for the depreciation run for the 2nd period no documents are generated ( Tried Test Run ) and no error message is displayed
    Can any one help me solving this issue
    Regards
    Arun.R

    Run the report in test mode without Error Analysis and List assets on.
    When this not helps look to your asset if there is plaaned depreciation for period 2

  • Procedure for Standby Database for SAP ERP 6.0

    Hello All,
    We are using SAP ERP 6.0 with Oracle 10g with AIX 5.3.
    We are planning to setup a standby database for our SAP ERP 6.0 production system as part of remote DR site using Oracle Data Guard.
    I was under the assumption that i can first install an erp 6.0 (ABAP) system using homogeneous system copy from my erp 6.0 (ABAP) production system and then start configuring oracle dataguard.
    But the System Copy Guide "System Copy for SAP Systems Based on SAP NetWeaver 7.0 SR3 ABAP" has mentioned that "You cannot create standby systems with a system copy".
    Please suggest the best practise or the procedure for creating standby database for SAP ERP 6.0 system. Iam not looking at the steps for creating a pure oracle 10g standby database, but with SAP instances as well.
    Thanks in advance.
    CVS

    Hi,
    Please refer the below mentioned link for configuring data guard.
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10823/create_ps.htm
    Below mentioned are the sequence of stpes, which needs to be followed for setting up data guard.
    3.1 Configuring the Primary Database
    3.1.1 Enable archiving and define a local archiving destination
    3.1.2 Create a password file
    3.1.3 Configuring the Oracle networking files
    3.1.4 Set initialization parameters on the primary database
    3.1.5 Take Offline/Online backup of the primary database
    3.1.6 Create a control file for the standby database
    3.1.7 Prepare initialization parameter file for the standby database and start the primary database with the changed pfile.
    3.1.8 Copy all files from the primary host to the standby host
    3.2 Configuring the Standby Database
    3.2.1 Configuring the Oracle networking files
    3.2.2 Create a INIT parameter file for the standby database
    3.2.3 Copy the standby controlfile to the appropriate location
    3.2.4 Create Oracle Password File
    3.2.5 Start the physical standby database
    3.2.6 Initiate log apply services
    Regards,
    Ranjith

Maybe you are looking for

  • I now have 2 user accounts, but only want one.

    so i stupidly created an account on my new macbook pro when i first turned it on. the next day, i decided to use the Migration Assistant to drag over my files and software from my old laptop. the computer set up a new account based on how my old lapt

  • IPhone and Windows 7 Upgrade Help

    Hello im a PC user, currently have 2 computers running windows vista, and have two iphones linked to them, 1 iphone 3g and 1 iphone 3gs. The problem i have is i want to update them to windows 7, but if i do that, then it will clear my handset, as i c

  • How to identify the version of InDesign application used to produce an InDesign document

    Is there a way to identify the version of the InDesign application(CS/CS2/CS3) where the Document was originally created? Can we use InDesign CS3 server to open a CS2 document to do some relinking and save it again as a CS2 document without convertin

  • Anyone else think 15minutes for checking email is too long?

    Not sure why the shortest time period to check new email is every 15 minutes. Would be very helpful to have the option to check every 5minutes. This might just be a carry over from the iphone settings geared for the Edge network and ATT not wanting a

  • Reader Open View Zoom Problem

    I converted a Word 2007 document to pdf format using the Word pdf converter "Save As Pdf." I have Reader XI to read the pdf document, but the pdf document opens in 136% view and I cannot make it open in 100% view. Using the "View" control only change