Query regarding database patching

Hi ,
I am on Oracle 11G and Solaris SPARC 64-bit server.
The server admin have applied the oracle CPU that was released on April 18,2011.
I have the path to the new oracle home now.
Currently my oracle home is 11.1.0.7.P1 and the new oracle home is
11.1.0.7.P2.
Now the practice that i have been following to change my oracle home(Patching) is :
1. Shutdown db
2. Change oratab with new home:Y
3. Change my .profile for $ORACLE_HOME
4. Startup the database with init.ora
5. Run catbundle.sql cpu apply
6. Run recompile_precheck_jan2008cpu.apply
7. View_recompile_jan2008cpu.sql
8. Shutdown immediate and startup
9. Change oracle home in listener.ora
10.Create softlink of init.ora to /dbs/ of new oracle home.
Now I have 2 queries :
1.Since the database runs fine post it , I am not able to conclude
if any other sql also needs to be run ?
2. What is the location of the readme.txt and readme.html which i need to check for invalid objects.
I have searched but couldn find it. :(
Also , How do i test the performance pre and post patching..
Will doing it by just checking the time taken for Data loads pre and post
patching sufficient.
What other checks can i do in dev to test for patch.
Thanks and Regards
Kk

Hi ,
In this particular database , ive run the catbundle.sql and its been almost 30 mins that its at this location :
SQL> @?/rdbms/admin/initcdc.sql
SQL> Rem
SQL> Rem $Header: initcdc.sql 15-mar-2006.08:20:07 mbrey Exp $
SQL> Rem
SQL> Rem initcdc.sql
SQL> Rem
SQL> Rem Copyright (c) 2000, 2006, Oracle. All rights reserved.
SQL> Rem
SQL> Rem    NAME
SQL> Rem      initcdc.sql - script used to load CDC jar files into the database
SQL> Rem
SQL> Rem    DESCRIPTION
SQL> Rem      <short description of component this file declares/defines>
SQL> Rem
SQL> Rem    NOTES
SQL> Rem      script must be run as SYS
SQL> Rem
SQL> Rem    MODIFIED   (MM/DD/YY)
SQL> Rem    mbrey       03/15/06 - bug 5092790 add datapump registration
SQL> Rem    pabingha    02/25/03 - fix undoc interfaces
SQL> Rem    wnorcott    03/14/02 - bug-2239726 disable triggers.
SQL> Rem    wnorcott    01/31/02 - function 'active' return 0 or 1.
SQL> Rem    wnorcott    01/30/02 - disable CDC triggers, CREATE_CHANGE_TABLE re-enables.
SQL> Rem    wnorcott    06/26/01 - rid trailing slash.  As per Mark Jungermann
SQL> Rem    gviswana    05/25/01 - CREATE OR REPLACE SYNONYM
SQL> Rem    jgalanes    11/17/00 - for Import/Export grant execute on util to
SQL> REM                           SELECT_CATLOG_ROLE
SQL> Rem    wnorcott    09/07/00 - new loadjava syntax for performance.
SQL> Rem    wnorcott    07/18/00 - rid LOGMNR_UID$.clientid
SQL> Rem    wnorcott    06/28/00 - move logmnr_dict view here
SQL> Rem    wnorcott    03/28/00 - fix trigger install
SQL> Rem    wnorcott    03/27/00 - Install change table triggers
SQL> Rem    mbrey       01/26/00 - script to load CDC jars
SQL> Rem    mbrey       01/26/00 - Created
SQL> Rem
SQL> call sys.dbms_java.loadjava('-v -f -r -s -g public rdbms/jlib/CDC.jar');How do i check if its still running or failed ?
*PS : Ive read this note :Script Fails At Loadjava With ORA-03113 and ORA-03114 [ID 358232.1] But its when it errors out , for me its not erroring out also..*
Thanks
Kk
Edited by: Kk on May 25, 2011 2:40 AM

Similar Messages

  • Query regarding database access segregation using os authentication in windows environment

    Hi ,
    I have a query regarding database access segragation using os authentication (like sqlplus "/ as sysdba") in windows environment.Let me briefly explain my requirement:-
    Suppose you have two DBA`s viz DBA1 and DBA2 and 4 databases resideds in a windows server say A,B,C & D.Now I want to set up such a way if DBA1 logs into the server then he can login to database A and B only using OS authentication and DBA2 can login to database C and D only using OS authentication.
    Please let me know how to do setup for this requirement.
    Database version is 11.2.0.3

    1494629, I am not a Windows person but if there is any way to do this I suspect some additional information is necessary:
    Are the DBA users members of the Administrators Group ?
    Do all 4 database share the same $ORACLE_HOME ?
    I suspect if either answer above is yes then this is not possible, but like I said I am not a Windows person.  I would just ask for two servers and the associated licensing to be acquired.  The requirement to spend money to do something management wants usually elimanates the request in my world.
    HTH -- Mark D Powell --

  • Query regarding database reorganization

    Hi All,
    I have been asked to reorganize the database( size 220GB Dev, size 460GB Qua, size 500GB Production)
    Database is Oracle 10G, SAP version is ECC 6.0.
    I tried this via BRtools on a test system(size 130GB,Oracle 10G) and nothing happens.Assuming this,I doubt any change.
    However my management is insisting size must decrease by 10 -12 percent.
    My query is if I reorganize the database via BRTOOLS what will be the effect on the database size.
    No client is deleted on any of the system and no data has been erased by the functional team.
    Any suggestion on the same will be a great help to me.
    Regards,
    PG

    Hi,
        How much space is liberated after a re-org task is purely subjective ( system load, when the last re-org was run etc). A test system with no user activity cannot form an ideal test-bed for re-org outcome. Rather than looking out for benefit in terms of percentage of space shrunk, you could look at all avenues that can bring down the database size. The following notes might be used as a starting point.
    SAP Note 541538 - FAQ: Reorganization
    SAP Note 771929 - FAQ: Index fragmentation (Easier than a table re-org task.Can be done online ( before attempting this online, please go through the SAP Hot News announced in SAP Note 1413928 - Index corruption/wrong results after rebuild index ONLINE )
    SAP Note 706478 - Preventing Basis tables from increasing considerably (Exectue the SQL query in the note to identify the tables that occupy highest space and look for corresponding solutions in this note for those tables)
    Above messages' SAP Data Volume Management guide also has suggestions for triggering archiving/deleting/compressing/avoid growth where necessary
    cheers !
    PRADi

  • Query regarding CPU patches

    Hi,
    As per my understanding CPU patches are released every quarter for each version & realease of oracle database.
    I am using Oracle 10.2.0.3 on IBM-AIX 5.3 (64 bit).
    I checked on below link of metalink.
    Patches & Updates -> Oracle Server/Tools -> Latest Patchsets -> Latest Oracle Server/Tools Patchsets -> Then selected oracle database and OS version -> Patch Type selected as Any -> Classification selected as High/Security -> Go
    But the above gives me no CPU patch list!!!!
    So is it no mandatory that each & every quarted we will get a new CPU patch from oracle? Or am I doing any mistake in selection above?
    Thanks in advance.
    Best Regards,
    oratest

    Hi Srini,
    Thanks for your reply.
    As per the link doc, the primary support for 10.2 has been ended on July-2010, and the extended support will end on July-2013.
    And as you mentioned that CPU patches are released in extended support as well, so as of now I must see CPU patch in metalink for my database release (10.2.0.3). But I can not see any CPU patch for my version, release??
    One more thing: As per my understanding CPU patches comes under High/Security patch classification, am I right?
    Best Regards,
    oratest

  • Query Regarding Database Split

    hi all,
    My client have 4 Units in which nearly 80%items are same in all 4 units,Bp are 40% approx same please suggest me how to manage 4 unit in 1 database or in 4 diffrent database.What problem i face if i choose 1 database for all four unit.
    Note:All 4 unit working seperatly
    Thanks and regards
    Rahul

    Hi
    First of all u cant generate Balance sheet for all four units seperately.....(TB and P&L can be generated sep. if u have maintained Profit centres...) BY using some of tools this also we can achieve but not in std. sbo.
    For connecting all Four units u should have Brooad band connection to access the server. In India most of the time the Broadband will be slow r down only....
    All customers Balances  can be seen by other branch peoples also.......
    Unwanted Masters which is not belongs to other branch also will be availlable to everyone.anyway that can be filltered...
    Giri

  • Query regarding database size

    hi,
    ( sap 4.7c + sql server 2000 (Module:sd/mm/fi )
    ( data : 1 & half year - no BI )
    our database size is around 50 GB
    and log size is around 30 GB
    I doubt that something is wrong.
    can anyone explain to me what is right and
    what action one should take on this type of scenario.
    thanks in advance
    raj

    Hi Raj,
    My database size is about 30GB (3 years of usage) and log file is about 12GB.
    My database settings (recomendent by SAP and Early watch) are:
    I shrinked database to minimum size and set following settings:
    Database (mdf and ndf):
    - growth activated: checked
    - growth not restricted: checked
    - next step possible: checked
    - next step size: 60MB
    tempdb and log file:
    - growth activated: checked
    - growth not restricted: checked
    - next step possible: checked
    - next step size: 10%
    Regards,
    Marcin Gajewski

  • Query regarding Database Level changes

    Hi
    I am working with a datawarehouse which extracts and populates data overnight across several tables in the reporting layer and across 5 different schemas.
    The source tables of these remain same (which will get data updated each and every day) but the reporting layer tables are built in the trash-and-build mode (because of business reasons) which brings in data say from the year 2000 (from the source) which might NOT be getting changed in the source tables at all.
    These tables population especially causes the jobs to slow down and cause performance issues.
    Is there any way in Oracle to find out if say :-
    Reporting Layer Table :- RPT_TAB
    Source Tables :- S1, S2, S3
    Can we find out if there are any changes to the data of S1,S2,S3 for a period of time say from year 2000 - year 2004 when they are being picked up by the proc which populates RPT_TAB?
    If there is any way, through which we can generally establish which are the tables for which for the above period there are no changes in data then we can archive such data and exclude them from loading into the reporting layer tables every day?
    We are using Oracle 9i and PLSQL to populate all the data in the tables.
    Please help me ASAP.
    Thanks
    Arnab

    Most of the source tables do not have last updated date. But the queries which combine and bring in data to Reporting Layer tables are complex and use lot many tables, sequences, views, etc to load the data. So, that is the reason I was looking for something at the generic Oracle level if it maintains anything for a certain period of time against any given table in the database.
    Thanks
    Arnab

  • Query Regarding Applying One-Off Patches

    Hi,
    We have plans of doing the following:
    Upgrade the databases to 10.2.0.5.0
    Apply the 10.2.0.5 PSU 3
    Apply a list of one-off patches identified for our environment (which are not included in 10.2.0.5.3)
    Query:
    If the one-off patches identified to be applied in our environment are available only top of 10.2.0.5.0 and not for 10.2.0.5.3, then which of the following mentioned solutions should be proceed with considering :
    Upgrade the database to 10.2.0.5.0, apply the one-off patches available on top of 10.2.0.5.0 and then apply the 10.2.0.5.0 PSU3
    or
    Upgrade the database to 10.2.0.5.0, apply the 10.2.0.5.0 PSU3, request for one-off patches on top of 10.2.0.5.3 and appy the same
    Thanks and Regards,
    Santosh

    Pl follow the steps is MOS Doc 865255.1 (Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch)
    HTH
    Srini

  • Query regarding updation thru a Procedure

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru my Java application.
    The submit procedure saves the XML data in the database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by adding new elements to the same row.This row now contains additional XML elements.
    I would like to display the new row with the new elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru
    my Java application.
    The submit procedure saves the XML data in the
    database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by
    adding new elements to the same row.This row now
    contains additional XML elements.
    I would like to display the new row with the new
    elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with
    the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,If you delete (it seems to me yours this process is regular and frequent) and re insert the new updated one record then High water mark will cause to scan yours table which may cause to degrade the performance.AFAIK you should go with update.But hold down dont implement it as i suggested lets see what are others solution here which may be more precious then mine.
    Khurram

  • Dynamically Pass sql query in Database adapter

    hi',
    How can we dynamically pass sql query in Database adapter, is there any way, I am using SOA 11G.
    Thanks
    Yatan

    Hi,
    Tried that too. No luck. Gives me this.
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'selectUsingIn' failed due to: Pure SQL Exception.
    Pure SQL Execute of select interface_id, property_name, property_value from ( (?) ) failed.
    Caused by java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Regards,
    Neeraj Sehgal

  • Can a web service query a database at set intervals?

    Can someone verify if this is feasible?
    I need to display live data via browsers .  I would like to have the query to the database executed server side and have the web service provide the data to the browsers.
    Here is what I propose :
    I would like to have a web service run on a web server for an intranet.
    Have the web service  query a database every 20 seconds and update the data into a table or an array variable. 
    On the browser side I want the browser to refresh every 20 seconds with the updated data from the web service.
    Any other recommendations would be greatly appreciated.
    Thank you.
    Chris W.

    Hi ChrisTW1,
    Thank you for posting in MSDN forum.
    Based on your issue, I suggest you can try to use the JS to call the web service to set the intervals. For more information about how to use the JS to call the web service to set the intervals, please see:
    http://www.codeproject.com/Tips/647322/Calling-ASP-NET-Webservice-using-JavaScript-on-Reg
    In addition, since
    this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. If you have any issues about the set the
    intervals for the web service, I suggest you can post this issue directly to the WCF forum:https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf, maybe
    you will get more help.
    Hope it help you!
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Query regarding screen capture in webdynpro

    Hi
    i needed to use the java.awt.Robot class to perform a screen capture. This is basically used to capture signature which is done on a applet. But hwile i am using it gives me java.awt.headless exception which basically means that i cannot use display devices or certain other features. is there any way get past this.
    Is there any way i can do a screen capture using webdynpro.
    I have few more doubts regarding a application that i need to make. If i am not able to get a solution for this problem i would explain the scenario and probably someone could help me with solution for the same
    thanks
    regards
    Srikumar V

    The problem is that the iframe control is not really supported and should not be used anymore i think.
    But anyways: Since there is actually no out of the box solution, the steps you would hav to go are as follows:
    1. Get Access to the image data (client side)
    I suppose the paint method of one of the AWT/Swing components is overwritten to draw the signature with a pointig device (eg mouse/touch screen)
    in the method public void paint(Graphics g) you have access to the component's Graphics object.
    When the user presses a button in that applet you need to get the latest graphics object of the component and get the bitmap data out of it.
    This is basically the same as using the java robot screenshot, just more elegant.
    But it is important of course, that the navigation to the new view is somehow triggered by the applet so that it can send the request to the servlet before the applet is destroyed.
    2. Send the data to the Server
    I think the best would be to write a servlet to accept the bitmap data from the applet and store it to a database. When the File is uploaded you have to navigate to the next view (using portal navigation or javascript to reload the parent frame)
    Then you need to query that database from Webdynpro to get the file.
    3. Now you would have to use a library like iText to create a PDF file with your image in it.
    This is all not really easy and I can only describe some rough ideas. I cannot think of an easier way to do it right now since client side coding is not supported by webdynpro.

  • Explain plans differ:  same query, cloned databases.

    oracle 10.2.0.2.0
    solaris 10
    same query, different databases (cloned from same source), different explain plans.
    db parameters are identical.
    Any ideas?
    DB1 (production)
    SQL> explain plan for
      2  SELECT  V__101.*,   SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,
      3    SHAPE.rowid
      4  FROM
      5   (SELECT b.OBJECTID,b.CRT_DTE,b.CRT_SRC_CDE,b.CRT_AQUI_MTHD_CDE,b.CRT_USR_ID,
      6    b.ADT_ACTN_CDE,b.ADT_ACTN_DTE,b.ADT_ACTN_SRC_CDE,b.ADT_ACTN_USR_ID,
      7    b.TP_SITE_POINT_ID,b.SHAPE,b.SRC_ID,b.SRC_CRT_DTE,b.SRC_TYPE_CDE,
      8    b.LCTN_STAT_CDE,b.FRZN_LCTN_IND,b.TP_NOTES   FROM AMSOWNER.TP_SITE_POINT b
      9    WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM
    10    AMSOWNER.D101 WHERE DELETED_AT IN (SELECT l.lineage_id FROM
      SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND
    11   12    l.lineage_id <= :source_state_id) AND SDE_STATE_ID = :"SYS_B_0") UNION ALL
      SELECT a.OBJECTID,a.CRT_DTE,a.CRT_SRC_CDE,a.CRT_AQUI_MTHD_CDE,a.CRT_USR_ID,
    13   14    a.ADT_ACTN_CDE,a.ADT_ACTN_DTE,a.ADT_ACTN_SRC_CDE,a.ADT_ACTN_USR_ID,
    15    a.TP_SITE_POINT_ID,a.SHAPE,a.SRC_ID,a.SRC_CRT_DTE,a.SRC_TYPE_CDE,
    16    a.LCTN_STAT_CDE,a.FRZN_LCTN_IND,a.TP_NOTES   FROM AMSOWNER.A101 a,
    17    SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+
    18    HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM AMSOWNER.D101 WHERE
    19    DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
    20    l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id)
    21    AND SDE_STATE_ID > :"SYS_B_1") AND a.SDE_STATE_ID = SL.lineage_id AND
    22    SL.lineage_name = :source_lineage_name AND SL.lineage_id <=
    23    :source_state_id ) V__101 , AMSOWNER.F15 SHAPE where SHAPE.FID(+) =
    24    V__101.SHAPE;
    Explained.
    SQL>  @?/rdbms/admin/utlxplp.sql;
    PLAN_TABLE_OUTPUT
    Plan hash value: 254376361
    | Id  | Operation                         | Name             | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   113K|    49M|       |  2926   (1)| 00:00:41 |
    |*  1 |  HASH JOIN RIGHT OUTER            |                  |   113K|    49M|    17M|  2926   (1)| 00:00:41 |
    |   2 |   TABLE ACCESS FULL               | F15              |   113K|    15M|       |   344   (2)| 00:00:05 |
    |   3 |   VIEW                            |                  |   113K|    34M|       |   331   (2)| 00:00:05 |
    |   4 |    UNION-ALL                      |                  |       |       |       |            |          |
    |*  5 |     HASH JOIN RIGHT ANTI          |                  |   113K|  8948K|       |   332   (2)| 00:00:05 |
    |   6 |      VIEW                         | VW_NSO_1         |     1 |    13 |       |     2   (0)| 00:00:01 |
    |   7 |       NESTED LOOPS                |                  |     1 |    50 |       |     2   (0)| 00:00:01 |
    |   8 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |       |     1   (0)| 00:00:01 |
    |*  9 |         INDEX SKIP SCAN           | D101_IDX1        |     1 |       |       |     1   (0)| 00:00:01 |
    |* 10 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    |  11 |      TABLE ACCESS FULL            | TP_SITE_POINT    |   113K|  7512K|       |   329   (2)| 00:00:05 |
    |* 12 |     HASH JOIN ANTI                |                  |     1 |   375 |       |     5  (20)| 00:00:01 |
    |  13 |      NESTED LOOPS                 |                  |     1 |   349 |       |     2   (0)| 00:00:01 |
    |  14 |       TABLE ACCESS BY INDEX ROWID | A101             |     1 |   338 |       |     1   (0)| 00:00:01 |
    |* 15 |        INDEX RANGE SCAN           | A101_STATEID_IX1 |     1 |       |       |     1   (0)| 00:00:01 |
    |* 16 |       INDEX UNIQUE SCAN           | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    |* 17 |      VIEW                         | VW_NSO_2         |     1 |    26 |       |     2   (0)| 00:00:01 |
    |  18 |       NESTED LOOPS                |                  |     1 |    50 |       |     2   (0)| 00:00:01 |
    |* 19 |        INDEX FULL SCAN            | D101_PK          |     1 |    39 |       |     1   (0)| 00:00:01 |
    |* 20 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("SHAPE"."FID"(+)="V__101"."SHAPE")
       5 - access("B"."OBJECTID"="$nso_col_1")
       9 - access("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
           filter("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
      10 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      12 - access("A"."OBJECTID"="$nso_col_1" AND "A"."SDE_STATE_ID"="$nso_col_2")
      15 - access("A"."SDE_STATE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      16 - access("SL"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("SL"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      17 - filter("$nso_col_2"<=TO_NUMBER(:SOURCE_STATE_ID))
      19 - access("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
           filter("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
      20 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
    47 rows selected.DB2 (staging)
    SQL> explain plan for
      2  SELECT  V__101.*,   SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,
      SHAPE.rowid
    FROM
      3    4    5   (SELECT b.OBJECTID,b.CRT_DTE,b.CRT_SRC_CDE,b.CRT_AQUI_MTHD_CDE,b.CRT_USR_ID,
      b.ADT_ACTN_CDE,b.ADT_ACTN_DTE,b.ADT_ACTN_SRC_CDE,b.ADT_ACTN_USR_ID,
      6    7    b.TP_SITE_POINT_ID,b.SHAPE,b.SRC_ID,b.SRC_CRT_DTE,b.SRC_TYPE_CDE,
      8    b.LCTN_STAT_CDE,b.FRZN_LCTN_IND,b.TP_NOTES   FROM AMSOWNER.TP_SITE_POINT b
      9    WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM
    10    AMSOWNER.D101 WHERE DELETED_AT IN (SELECT l.lineage_id FROM
    11    SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND
    12    l.lineage_id <= :source_state_id) AND SDE_STATE_ID = :"SYS_B_0") UNION ALL
    13    SELECT a.OBJECTID,a.CRT_DTE,a.CRT_SRC_CDE,a.CRT_AQUI_MTHD_CDE,a.CRT_USR_ID,
    14    a.ADT_ACTN_CDE,a.ADT_ACTN_DTE,a.ADT_ACTN_SRC_CDE,a.ADT_ACTN_USR_ID,
    15    a.TP_SITE_POINT_ID,a.SHAPE,a.SRC_ID,a.SRC_CRT_DTE,a.SRC_TYPE_CDE,
    16    a.LCTN_STAT_CDE,a.FRZN_LCTN_IND,a.TP_NOTES   FROM AMSOWNER.A101 a,
    17    SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+
      HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM AMSOWNER.D101 WHERE
    18   19    DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
    20    l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id)
    21    AND SDE_STATE_ID > :"SYS_B_1") AND a.SDE_STATE_ID = SL.lineage_id AND
    22    SL.lineage_name = :source_lineage_name AND SL.lineage_id <=
    23    :source_state_id ) V__101 , AMSOWNER.F15 SHAPE where SHAPE.FID(+) =
    24    V__101.SHAPE;
    Explained.
    SQL>  @?/rdbms/admin/utlxplp.sql;
    PLAN_TABLE_OUTPUT
    Plan hash value: 4287458713
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    |   1 |  NESTED LOOPS OUTER               |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    |   2 |   VIEW                            |                  |   145 | 47125 |   328   (1)| 00:00:05 |
    |   3 |    UNION-ALL                      |                  |       |       |            |          |
    |*  4 |     HASH JOIN ANTI                |                  |   144 | 10224 |   324   (1)| 00:00:05 |
    |   5 |      TABLE ACCESS FULL            | TP_SITE_POINT    |   145 |  8410 |   322   (1)| 00:00:05 |
    |   6 |      VIEW                         | VW_NSO_1         |     1 |    13 |     2   (0)| 00:00:01 |
    |   7 |       NESTED LOOPS                |                  |     1 |    50 |     2   (0)| 00:00:01 |
    |*  8 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |     1   (0)| 00:00:01 |
    |*  9 |         INDEX SKIP SCAN           | D101_IDX1        |     1 |       |     1   (0)| 00:00:01 |
    |* 10 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |* 11 |     FILTER                        |                  |       |       |            |          |
    |  12 |      NESTED LOOPS                 |                  |     1 |   349 |     2   (0)| 00:00:01 |
    |  13 |       TABLE ACCESS BY INDEX ROWID | A101             |     1 |   338 |     1   (0)| 00:00:01 |
    |* 14 |        INDEX RANGE SCAN           | A101_STATEID_IX1 |     1 |       |     1   (0)| 00:00:01 |
    |* 15 |       INDEX UNIQUE SCAN           | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |* 16 |      FILTER                       |                  |       |       |            |          |
    |  17 |       NESTED LOOPS                |                  |     1 |    50 |     2   (0)| 00:00:01 |
    |* 18 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |     1   (0)| 00:00:01 |
    |* 19 |         INDEX RANGE SCAN          | D101_IDX1        |     1 |       |     1   (0)| 00:00:01 |
    |* 20 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |  21 |   TABLE ACCESS BY INDEX ROWID     | F15              |     1 |   145 |     1   (0)| 00:00:01 |
    |* 22 |    INDEX UNIQUE SCAN              | F15_UK1          |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("B"."OBJECTID"="$nso_col_1")
       8 - filter("DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID))
       9 - access("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
           filter("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
      10 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      11 - filter( NOT EXISTS (SELECT /*+ HASH_AJ */ 0 FROM "AMSOWNER"."D101"
                  "D101","SDE"."STATE_LINEAGES" "L" WHERE :B1>TO_NUMBER(:SYS_B_1) AND
                  "DELETED_AT"="L"."LINEAGE_ID" AND "L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID) AND "SDE_STATE_ID"=:B2 AND
                  "SDE_DELETES_ROW_ID"=:B3 AND "DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID) AND
                  "SDE_STATE_ID">TO_NUMBER(:SYS_B_1)))
      14 - access("A"."SDE_STATE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      15 - access("SL"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("SL"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      16 - filter(:B1>TO_NUMBER(:SYS_B_1))
      18 - filter("DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID))
      19 - access("SDE_DELETES_ROW_ID"=:B1 AND "SDE_STATE_ID"=:B2)
           filter("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
      20 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      22 - access("SHAPE"."FID"(+)="V__101"."SHAPE")
    58 rows selected.

    rocr wrote:
    oracle 10.2.0.2.0
    solaris 10
    same query, different databases (cloned from same source), different explain plans.
    db parameters are identical.
    DB1 (production)
    | Id  | Operation                         | Name             | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   113K|    49M|       |  2926   (1)| 00:00:41 |DB2 (staging)
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    If you check the execution plans it's quite obvious that the two environments can not be identical. If you have the same (amount of) data, then one of the two estimates is way off. Which one is in the right ballpark, how many rows are returned by the query? The same applies to the remaining operation ids of the plan, which estimate is correct?
    It's very likely that the underlying table/index statistics are not the same, and therefore you get different plans.
    By the way, you're using bind variables, therefore the output of the EXPLAIN PLAN is only of limited use, since the actual plan at run time might be completely different due to bind variable peeking and potentially histograms created on some of the columns (which is the default in 10g due to the "FOR ALL COLUMNS SIZE AUTO" method_opt default parameter value).
    If you haven't disabled the pre-configured statistics collection job that runs every night in 10g, you might get different statistics due to this job already.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Cannot query v$database in a function ?

    Hi, probably a simple explaination for this...
    I'm trying to implement a solution using the flashback feature to roll back a table if a process flow hits errors.
    I have defined a function that tries to return the CURRENT_SCN from V$DATABASE but it says "ORA-00942: table or view does not exist" when I try to deploy from the code editor.
    I can get the same code to work fine against a test table I have.
    Anything special I need to do before I can query V$DATABASE ?
    I can issue the same select statement from Oracle SQL Plus and it works ok.
    Thanks
    Paul

    Hi,
    I think you have no select permission on this view. In a function you have the same permissions as the user who created this function and you have no permissions granted by role - only direct granted to the user.
    This is the same for functions and procedures.
    Regards
    Detlef

  • I want to query oracle database from sql server can anyone tell steps 2 fo

    i want to query oracle database from sql server can anyone tell steps 2 followed
    i tried with linked servers but it is throwing errors can anyone hepl in this regard
    The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
    OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

    First of all - you are in the wrong forum.
    Look either for the Database general or search for Transparant / Heterogenous Gateways.
    cu
    Andreas

Maybe you are looking for

  • HT1766 how can i transfer something from a old ipod to a new one. when the old ipod is no longer in devices

    i need to transfer tracks on a old ipod 4 gig to a 80 gig ipod classic the orignal itunes was on a old machine that i no longer have access too and this is my first i tunes account

  • Compare Docuements Option - not finding the Junk characters

    While comparing the PDFs (older and new document), "technique" vs "tecÚique" word, did not shows errors in Compare Docuement Option: • The fonts are properly embedded • While printing the pdf tecÚique word print tecÚique. • While searching tecÚique w

  • Legend View Not Working in Compound view OBIEE 10.1.3.4.1

    Hi All, One of our project reports( OBIEE 10.1.3.4.1) need to render result set in the compound view format. Compound view should comprise of Title view,Table View and Legend View respectively. All of the above views have been combined in the compoun

  • 802.1x wired problems

    Hello. I'm trying to install arch, but I've been stuck on configuring network for a day already. The point is: I need to connect to the local university network (wired) to be able to connect to the Internet via PPPoE. The university network has PEAP

  • XML Config File

    Firslty, I am a visual studio developer now working on a project in j2ee / weblogic. I have a project that currently uses an IP address that is hard coded. Ideally I would like this changed to some sort of XML config file. Can someone please provide