Implementing SQL Plan Management on Oracle Database 11.2.0.2

Environment:
Oracle Linux 5 update 10 (UEK)
Oracle GI 11.2.0.2.0 (Oracle ASM 11.2.0.2)
Oracle Database 11.2.0.2.0 Enterprise Edition with RAC option (3 nodes)
No PSU applied/CPU July 2013 applied to RDBMS
Database servicing Siebel CRM 8.1.1.1 Application that uses bind peeking.
Siebel CRM soon to be version 8.1.1.11
There are a few bugs for SQL Plan Management (SPM) on 11.2.0.2 (see below).  The slowness and non-peeked binds issues seem very problematic.  I've seen a few bloggers recommend to not use SPM unless your at Oracle Database 12c.  Several of the bugs seemed to be fixed in 11.2.0.3 but we don't have any plans to move to 11.2.0.3 since we'll most likely be at 12.1.0.x in 7 months.  Any recommendation from the community on whether I should capture and use SQL Plan Management with 11.2.0.2?  Why, why not?  If there's other relevant information needed, let me know.
Bug 9910484 - SQL Plan Management Capture uses excessive space in SYSAUX (Doc ID 9910484.8)
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions >= 11.1 but BELOW 12.1
Versions confirmed as being affected
•11.2.0.2
•11.2.0.1
•11.1.0.7
Platforms affected Generic (all / most platforms affected)
Fixed:
•12.1.0.1 (Base Release)
•11.2.0.3 (Server Patch Set)
•11.2.0.2 Patch 4 on Windows Platforms
•11.1.0.7 Patch 41 on Windows Platforms
Bug 11719151 - SQL Plan Management capture causes slowness (Doc ID 11719151.8)
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions >= 11.2.0.2 but BELOW 12.1
Versions confirmed as being affected
•11.2.0.2
Platforms affected Generic (all / most platforms affected)
Fixed:
•12.1.0.1 (Base Release)
•11.2.0.3 (Server Patch Set)
•11.2.0.2 Patch 22 on Windows Platforms
Bug 9942454 - DBMS_SPM.LOAD_PLANS_FROM_SQLSET gets XML parsing error (Doc ID 9942454.8)
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions BELOW 12.1
Versions confirmed as being affected
•11.2.0.2
•11.2.0.1
•11.1.0.7
Platforms affected Generic (all / most platforms affected)
Fixed:
•12.1.0.1 (Base Release)
•11.2.0.3 (Server Patch Set)
Bug 12732879 - Execution Plan of Query with non-peeked binds is not reproducible (Doc ID 12732879.8)
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions >= 9.2 but BELOW 12.1
Versions confirmed as being affected
•11.2.0.3
•11.2.0.2
•11.1.0.7
Platforms affected Generic (all / most platforms affected)
Fixed:
•12.1.0.1 (Base Release)
•11.2.0.4 (Future Patch Set)
Bug 11687175 - High DFS lock handle waits in the database with SPM if FIXED_DATE is set (Doc ID 11687175.8)
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions >= 11 but BELOW 12.1
Versions confirmed as being affected
11.2.0.2
11.2.0.1
11.1.0.7
11.1.0.6
Platforms affected Generic (all / most platforms affected)
Fixed:
12.1.0.1 (Base Release)
11.2.0.3 (Server Patch Set)
Bug 13384234  ORA-29981 with select query with database Change notification
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions BELOW 12.1
Versions confirmed as being affected
11.2.0.2
Platforms affected Generic (all / most platforms affected)
Fixed:
11.2.0.4 (Future Patch Set)
Thanks so much.

See these MOS Docs
11.2.0.2 Patch Set - Availability and Known Issues (Doc ID 1179474.1)
Important Changes to Oracle Database Patch Sets Starting With 11.2.0.2 (Doc ID 1189783.1)
HTH
Srini

Similar Messages

  • SQL Plan Management - Baseline- Can it be used in another Schema

    Hi,
    I have never implemented, SQL Plan Management -Creating SQL plan baselines.
    I am having a query which is using indexes in one Schema.
    On another Schema in the same DB, the query accesses the SAME TABLE THROUGH SYNONYM. And the plan is very different. And query goes into indefinite execution.
    I have tried hints and other ways but it's simply not using the indexes.
    Anyone having experience with Baselines, can you suggest if I create a Baseline for the plan in SchemaA.
    Then can I use the same plan through Baseline in SchemaB for the same query?
    Please suggest..Thanks..

    Hi Jeneesh,
    Thanks for the reply.
    Problem is that the query has Xquery code inside and it's using the XMLType indexes. That's why it does not seem to be using the XML Indexes even by Hints.
    I have posted the scenario in XMLDB Forum as well:
    Re: Table in Schema1 using XMLIndexes But not in View- Schema2
    But can you think of any harm if I try to create Baseline and tag the query with it.
    So even in other schema if the same query is fired it will use the right Explain Plan.
    I am not able to figure out any other way right now.
    Please suggest..Thanks..

  • SQL Plan Management (11.2.0.1)

    Hi Guys,
    I'm doing some testing as below.
    I tried to keep the SQL plan in baseline. (when the table has no index, as such performing full scan)
    However, after i create the index. It's not picking the original plan which i put it in baseline. It's using range scan.
    Can advise what have i done wrong?
    thanks!
    SQL> show parameter OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES;
    NAME TYPE VALUE
    optimizer_capture_sql_plan_baselines boolean FALSE
    SQL> CREATE TABLE spm_test_tab (
    2 id NUMBER,
    3 description VARCHAR2(50)
    4 );
    Table created.
    SQL>
    SQL> DECLARE
    2 TYPE t_tab IS TABLE OF spm_test_tab%ROWTYPE;
    3 l_tab t_tab := t_TAB();
    4 BEGIN
    5 FOR i IN 1 .. 10000 LOOP
    6 l_tab.extend;
    7 l_tab(l_tab.last).id := i;
    8 l_tab(l_tab.last).description := 'Description for ' || i;
    9 END LOOP;
    10
    11 FORALL i IN l_tab.first .. l_tab.last
    12 INSERT INTO spm_test_tab VALUES l_tab(i);
    13
    14 COMMIT;
    15 END;
    16 /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> EXEC DBMS_STATS.gather_table_stats(USER, 'SPM_TEST_TAB', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    SQL> set linesize 2000
    SQL> set pagesize 2000
    SQL> SET AUTOTRACE TRACE
    SQL>
    SQL> SELECT description
    2 FROM spm_test_tab
    3 WHERE id = 99;
    Execution Plan
    Plan hash value: 3128910679
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 25 | 13 (0)| 00:00:01 |
    |* 1 | TABLE ACCESS FULL| SPM_TEST_TAB | 1 | 25 | 13 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter("ID"=99)
    Statistics
    26 recursive calls
    5 db block gets
    49 consistent gets
    0 physical reads
    944 redo size
    228 bytes sent via SQL*Net to client
    239 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed
    SQL>
    SQL> set autotrace off;
    SQL>
    SQL> SELECT sql_id, sql_text
    2 FROM v$sql
    3 WHERE sql_text LIKE '%spm_test_tab%'
    4 AND sql_text NOT LIKE '%dba_sql_plan_baselines%'
    5 AND sql_text NOT LIKE '%EXPLAIN%';
    SQL_ID SQL_TEXT
    gat6z1bc6nc2d SELECT description FROM spm_test_tab WHERE id = 99
    44b32kmh8ub2g DECLARE TYPE t_tab IS TABLE OF spm_test_tab%ROWTYPE; l_tab t_tab := t_TAB(); BEGIN
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE
    2 l_plans_loaded PLS_INTEGER;
    3 BEGIN
    4 l_plans_loaded := DBMS_SPM.load_plans_from_cursor_cache(
    5 sql_id => 'gat6z1bc6nc2d');
    6
    7 DBMS_OUTPUT.put_line('Plans Loaded: ' || l_plans_loaded);
    8 END;
    9 /
    Plans Loaded: 1
    PL/SQL procedure successfully completed.
    SQL> SELECT sql_handle, plan_name, enabled, accepted
    2 FROM dba_sql_plan_baselines
    3 WHERE sql_text LIKE '%spm_test_tab%'
    4 AND sql_text NOT LIKE '%dba_sql_plan_baselines%';
    SQL_HANDLE PLAN_NAME ENA ACC
    SYS_SQL_7b76323ad90440b9 SQL_PLAN_7qxjk7bch8h5tb65c37c8 YES YES
    SQL>
    SQL> ALTER SYSTEM FLUSH SHARED_POOL;
    System altered.
    SQL>
    SQL> CREATE INDEX spm_test_tab_idx ON spm_test_tab(id);
    Index created.
    SQL> EXEC DBMS_STATS.gather_table_stats(USER, 'SPM_TEST_TAB', cascade=>TRUE);
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SET AUTOTRACE TRACE
    SQL>
    SQL> SELECT description
    2 FROM spm_test_tab
    3 WHERE id = 99;
    Execution Plan
    Plan hash value: 2792204123
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 25 | 2 (0)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| SPM_TEST_TAB | 1 | 25 | 2 (0)| 00:00:01 |
    |* 2 | INDEX RANGE SCAN | SPM_TEST_TAB_IDX | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - access("ID"=99)
    Statistics
    1072 recursive calls
    3 db block gets
    192 consistent gets
    0 physical reads
    888 redo size
    242 bytes sent via SQL*Net to client
    239 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    18 sorts (memory)
    0 sorts (disk)
    1 rows processed
    SQL> set autotrace off;
    SQL> SELECT sql_handle, plan_name, enabled, accepted
    2 FROM dba_sql_plan_baselines
    3 ;
    SQL_HANDLE PLAN_NAME ENA ACC
    SYS_SQL_7b76323ad90440b9 SQL_PLAN_7qxjk7bch8h5tb65c37c8 YES YES

    Check the value of OPTIMIZER_USE_SQL_PLAN_BASELINES.
    Double check the sql id and exact matching signature of both statements .
    Turn autotrace off, execute statement then use:
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));to get the actual execution plan of the last executed statement in that session
    If in doubt, enable a SQL Plan Management trace:
    alter session set events 'trace[RDBMS.SQL_Plan_Management.*]';

  • Run sql statements in PL/Sql Developer without installing Oracle database?

    Hi all,
    I wish to ask is there any possibility to run Run sql statements in PL/Sql Developer without installing Oracle database?
    Regards.

    Hello Jimmy,
    this is the forum for the tool SQL Developer and, as the title says, *(Not for general SQL/PLSQL questions)*.
    PL/Sql Developer is not an Oracle tool, but from allound allroundautomations.
    And you need access to a database to run SQL statements. This does not need to be one installed by yourself.
    Regards
    Marcus

  • Managing/monitoring Oracle Database using WBEM

    Typically an Oracle Database environment is best monitored and managed using the
    Oracle Enterprise Manager.
    But does Oracle allow/support monitoring and management of Oracle databases using open standards like WBEM?
    We are trying to standardize on an open standard like WBEM for monitoring and managing hardware and software and also model those entities using the CIM (Common Information model) and would
    like to monitor Oracle Databases under this model using WBEM.
    I have read about the ability of the Oracle Enterprise manager to manage other third party hardware and software including databases using WBEM Fetchlets.
    Would appreciate any information regarding this topic.

    Better post your question in Enterprise Manager
    also do a search on WBEM in the forum

  • How to generate .SQL format file from oracle database?

    How to generate .SQL format file from oracle database?
    I have a database of Oracle 8.1.6,now want to generate script file (including table structure,index,etc.) from it,What should I do?
    Thanks.

    Your question pertains to the Database Export/Import. This forum exclusively focusses on the export/import utilities that come along with "Oracle Portal" which is a web-based tool. Could you please post your question under the RDBMS export/import or migration forum.

  • MS SQL Procedure Call from Oracle Database

    I have Oracle Database 11g connected to MS Sql Server 2008 via dg4msql, and need to execute procedure on MS Sql with parameters from Oracle, and get dataset (table) as a result.
    I'm not sure is it possible to call procedure directly from Oracle; One solution would be make function on MS SQL, and put select on procedure from Oracle, but what with parameters?
    Is there some possibility to call this procedure from Oracle and get this dataset as a cursor?
    Thanks in advance!
    Edited by: mihaelradovan on 2012.04.26 14:35

    Yes, of course I have DB Link in Oracle and procedure in SQL Server.
    Btw, I can select data from SQL Server table.
    I made one function in SQL Server, and I can not make select on this function, but in SQL Server I made view as select * from function_name, and select on this view from Oracle works. But problem is I have to call this procedure or function with parameters, and with view I can not do this.
    So, I must call procedure or function with parameters directly. I made all by the book (Oracle® Database Gateway for SQL Server User’s Guide), but probably I miss something...

  • How to migrate an existing Microsoft SSIS deployment if it is decided to replace SQL Server with an Oracle database?

    Hi Oracle Gurus!
    Currently, I am designing an ETL solution that transforms and loads a lot of data from flat files and sends it to an SQL Server 2008 R2 database for storage. However, at a future point of time, it may be decided to add or even replace SQL Server with an Oracle 11g database.
    Currently, I am writing script transforms in C# to dynamically generate SSIS packages to tansform and load the data into SQL Server. But considering that in future, an Oracle 11g or 12c database might be added to, or replace the SQL Server database, how do I make my script transforms (or whatever else I am developing currently for SQL Server) reusable to the extent possible?
    Or more precisely, what steps do I take, from an Oracle point of view, to ensure that any future migration of data to an Oracle database would be smooth to the extent possible?
    Looking up to my Oracle Gurus for enlightenment in this matter!
    Novice Kid

    When you're writing your on C# code to load data into the SQL Server you have to modify the routines so that they will work with Oracle.
    One approach is to use the extproc agent which would allow you to directly call external programs with all the logic in it to perform the load of your files and to put the data into the Oracle database. Another option would be to use utl_file package (or equivalents) which will allow you to open external files from your Oracle database and to directly read its content and then to pass it to the related tables.

  • Native SQL to an external oracle database

    Hello experts,
         I like to read some data from an external oracle database with native sql statements.
    Which prerequisites are neccessary to do so?
    In detail: which customizing must be performed?
    Wich authorizations are necessary on the local SAP-system and on the oracle-site?
    Many thanks for your help!
             Best regards
                                Elmar

    first, you need the SAP database library for Oracle. on Windows, filename is dboraslib.dll
    then, you create a user ID on your external database
    then ,you configure table DBCON
    read:
    https://forums.sdn.sap.com/click.jspa?searchID=9272762&messageID=1193314
    https://forums.sdn.sap.com/click.jspa?searchID=9272762&messageID=2806510

  • How to Migrate Stored procedure on Sql server 2008 to Oracle Database

    Guys, I need help vey badly as I am new in this field.
    Problem is that, I have to migrate stored procedure on Sql server 2008 to oracle Oracle database:
    Whole scenario--
    1. Sql Server 2008 application on Windows server (source machine)
    2. I have to migrate 70 Stored Procedure
    3. To Oracle Database on Linux machine (Target machine)
    Any method (no problem)
    Please, help me or give me any reference as I don't know which keyword is differ in both database.
    Thanks in advance

    Hi,
      You could the free Oracle SQL*Developer to do this.
    There is information and a download link here -
    Oracle SQL Developer</title><meta name="Title" content="Oracle SQL Developer"><meta n…
    and information on using it for migrations here -
    http://www.oracle.com/technetwork/database/migration/index-084442.html
    You could use it in 2 ways -
    1. Go through a migration but just pull the stored procedure code from the file created after you generate the SQL from the SQL*Server database
    2. Use the scratch editor accessed from -
    - Tools - Migration - Scratch Editor
    and paste the SQL*Server stored procedure code into the window and it will convert it to Oracle code. The tool is very good but may have problems if you have very complicated procedures that use SQL*Server specific utilities.
    Regards,
    Mike

  • SQL PLAN MANAGEMENT - Locking in a more 'expensive', better plan.?

    Environment: 11.2.0.3 on HP-UX Itanium.
    We're preparing for an upgrade of our main production database from 10.2.0.3 to 11.2.0.3. We're using SQL Tuning Sets to capture execution plans from the 10G environment and load them into the upgraded (test) environment as SQL Plan Baselines. We've been using SQL Performance Analyzer to identify plans which have regressed from 10G to 11G. For these regressed plans we wish to use SPM to lock in the better 10G plan.
    We've been successful in locking in the 10G plans for those regressed queries where the 11g CBO "Cost" of the query is higher than it is in 10g, however we have some examples where SPA has shown a performance regression for queries (measured in terms of elapsed time, or buffer gets or CPU time), but the 11G explain plan has a lower "cost" as identified by the CBO. Ie: the 11G "cost" is lower, but the plan is worse.
    For these small number of queries, I have not been able to get the 11G optimiser to choose the 10G plans even though they are "fixed, enabled and accepted" within SPM. The optimiser consistently chooses what it considers its "lower cost" plan, even though it is a worst plan. Am I missing something here or should it be possible, with the use of SPM to have the optimiser chose the 10G plan, regardless of what its internal cost says?
    SQL> show parameter baseline
    NAME                                 TYPE        VALUE
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_use_sql_plan_baselines     boolean     TRUE

    I'm at a bit of a loss now as to where to proceed without posting the entire SPM Trace file, so excuse me for taking up so much bandwidth.
    But first some background. Our test databases should be identical in terms of schemas. That is we have a 10G prod database. From that we clone it to two test databases. One we leave at 10G, the other we upgrade to 11G. So there should be no schema differences between the 11G and 10G databases.
    h5.
    *** 2013-02-12 15:41:27.671
    SPM: statement found in SMB
    *** 2013-02-12 15:41:27.881
    SPM: fixed planId's of plan baseline are: 386463207
    SPM: using qksan to reproduce, cost and select accepted plan, sig = 17844158604836855983
    SPM: plan reproducibility round 1 (plan outline + session OFE)
    SPM: using qksan to reproduce accepted plan, planId = 386463207
    SPM: plan reproducibility - session OFE = 11020003, hinted OFE = 10020003
    SPM: planId in plan baseline = 386463207, planId of reproduced plan = 3080367404
    ------- START SPM Plan Dump -------
    SPM: failed to reproduce the plan using the following info:
      parse_schema name        : CARADM
      plan_baseline signature  : 17844158604836855983
      plan_baseline plan_id    : 386463207
      plan_baseline hintset    :
        hint num  1 len 27 text: IGNORE_OPTIM_EMBEDDED_HINTS
        hint num  2 len 37 text: OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
        hint num  3 len 36 text: OPT_PARAM('_always_anti_join' 'off')
        hint num  4 len 36 text: OPT_PARAM('_always_semi_join' 'off')
        hint num  5 len 40 text: OPT_PARAM('_index_join_enabled' 'false')
        hint num  6 len 43 text: OPT_PARAM('_optim_peek_user_binds' 'false')
        hint num  7 len 49 text: OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
        hint num  8 len 39 text: OPT_PARAM('optimizer_index_cost_adj' 1)
        hint num  9 len 40 text: OPT_PARAM('optimizer_index_caching' 100)
        hint num 10 len 10 text: FIRST_ROWS
        hint num 11 len 29 text: OUTLINE_LEAF(@"SEL$EE94F965")
        hint num 12 len 22 text: MERGE(@"SEL$9E43CB6E")
        hint num 13 len 17 text: OUTLINE(@"SEL$4")
        hint num 14 len 24 text: OUTLINE(@"SEL$9E43CB6E")
        hint num 15 len 22 text: MERGE(@"SEL$58A6D7F6")
        hint num 16 len 17 text: OUTLINE(@"SEL$3")
        hint num 17 len 24 text: OUTLINE(@"SEL$58A6D7F6")
        hint num 18 len 15 text: MERGE(@"SEL$1")
        hint num 19 len 17 text: OUTLINE(@"SEL$2")
        hint num 20 len 17 text: OUTLINE(@"SEL$1")
        hint num 21 len 36 text: FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
        hint num 22 len 153 text: INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PRO
    VIDER_GROUP_PERIOD"."START_DATE"))
        hint num 23 len 77 text: INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
        hint num 24 len 62 text: INDEX(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
        hint num 25 len 84 text: LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
        hint num 26 len 38 text: USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
        hint num 27 len 38 text: USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
        hint num 28 len 38 text: USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
    SPM: generated non-matching plan:
    ----- Explain Plan Dump -----
    ----- Plan Table -----
    ============
    Plan Table
    ============
    -------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                        | Name              | Rows  | Bytes | Cost  | Time      |
    -------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                 |                   |       |       |    22 |           |
    | 1   |  SORT UNIQUE                     |                   |    41 |  3116 |    21 |  00:00:01 |
    | 2   |   NESTED LOOPS                   |                   |       |       |       |           |
    | 3   |    NESTED LOOPS                  |                   |    41 |  3116 |    20 |  00:00:01 |
    | 4   |     NESTED LOOPS                 |                   |   826 |   50K |    11 |  00:00:01 |
    | 5   |      NESTED LOOPS                |                   |   826 |   26K |     3 |  00:00:01 |
    | 6   |       TABLE ACCESS FULL          | CL_PROVIDER_GROUP |   116 |  2668 |     2 |  00:00:01 |
    | 7   |       INDEX RANGE SCAN           | CPGP_UK           |     7 |    63 |     1 |  00:00:01 |
    | 8   |      TABLE ACCESS BY INDEX ROWID | CL_PROVIDER_DETAIL|     1 |    30 |     1 |  00:00:01 |
    | 9   |       INDEX UNIQUE SCAN          | CPDE_PK           |     1 |       |     1 |  00:00:01 |
    | 10  |     INDEX RANGE SCAN             | FACC_CPDE_FK_I    |     1 |       |     1 |  00:00:01 |
    | 11  |    TABLE ACCESS BY INDEX ROWID   | FN_ACCOUNT        |     1 |    14 |     1 |  00:00:01 |
    -------------------------------------------------------------+-----------------------------------+
    Predicate Information:
    7 - access("CPGR"."CPGR_ID"="CPGP"."CPGR_ID")
    9 - access("CPDE"."CPDE_ID"="CPGP"."CPDE_ID")
    10 - access("CPDE"."CPDE_ID"="CFCO"."CPDE_ID")
    10 - filter("CFCO"."CPDE_ID" IS NOT NULL)
    11 - filter((UPPER("CPGR"."NAME") LIKE UPPER('%'||:1||'%') OR UPPER("NAME") LIKE UPPER('%'||:2||'%') OR UPPER("ABN") LIKE UPPER(:3||'%') OR "CFCO"."A
    CCT_NO" LIKE UPPER(:4||'%')))
    Content of other_xml column
    ===========================
      db_version     : 11.2.0.3
      parse_schema   : CARADM
      plan_hash      : 524147661
      plan_hash_2    : 3080367404
      Outline Data:
      /*+
        BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('11.2.0.3')
          DB_VERSION('11.2.0.3')
          OPT_PARAM('_always_anti_join' 'off')
          OPT_PARAM('_always_semi_join' 'off')
          OPT_PARAM('_index_join_enabled' 'false')
          OPT_PARAM('_optim_peek_user_binds' 'false')
          OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
          OPT_PARAM('optimizer_index_cost_adj' 1)
          OPT_PARAM('optimizer_index_caching' 100)
          FIRST_ROWS
          OUTLINE_LEAF(@"SEL$EE94F965")
          MERGE(@"SEL$9E43CB6E")
          OUTLINE(@"SEL$4")
          OUTLINE(@"SEL$9E43CB6E")
          MERGE(@"SEL$58A6D7F6")
          OUTLINE(@"SEL$3")
          OUTLINE(@"SEL$58A6D7F6")
          MERGE(@"SEL$1")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$1")
          FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
          INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PROVIDER_GROUP_PERIOD"."STA
    RT_DATE"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
          INDEX(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
          LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
          USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
          USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
          USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
          NLJ_BATCHING(@"SEL$EE94F965" "CFCO"@"SEL$3")
        END_OUTLINE_DATA
    ------- END SPM Plan Dump -------
    SPM: plan reproducibility round 1 (plan outline only)
    SPM: using qksan to reproduce accepted plan, planId = 386463207
    SPM: planId in plan baseline = 386463207, planId of reproduced plan = 4009937738
    ------- START SPM Plan Dump -------
    SPM: failed to reproduce the plan using the following info:
      parse_schema name        : CARADM
      plan_baseline signature  : 17844158604836855983
      plan_baseline plan_id    : 386463207
      plan_baseline hintset    :
        hint num  1 len 27 text: IGNORE_OPTIM_EMBEDDED_HINTS
        hint num  2 len 37 text: OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
        hint num  3 len 36 text: OPT_PARAM('_always_anti_join' 'off')
        hint num  4 len 36 text: OPT_PARAM('_always_semi_join' 'off')
        hint num  5 len 40 text: OPT_PARAM('_index_join_enabled' 'false')
        hint num  6 len 43 text: OPT_PARAM('_optim_peek_user_binds' 'false')
        hint num  7 len 49 text: OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
        hint num  8 len 39 text: OPT_PARAM('optimizer_index_cost_adj' 1)
        hint num  9 len 40 text: OPT_PARAM('optimizer_index_caching' 100)
        hint num 10 len 10 text: FIRST_ROWS
        hint num 11 len 29 text: OUTLINE_LEAF(@"SEL$EE94F965")
        hint num 12 len 22 text: MERGE(@"SEL$9E43CB6E")
        hint num 13 len 17 text: OUTLINE(@"SEL$4")
        hint num 14 len 24 text: OUTLINE(@"SEL$9E43CB6E")
        hint num 15 len 22 text: MERGE(@"SEL$58A6D7F6")
        hint num 16 len 17 text: OUTLINE(@"SEL$3")
        hint num 17 len 24 text: OUTLINE(@"SEL$58A6D7F6")
        hint num 18 len 15 text: MERGE(@"SEL$1")
        hint num 19 len 17 text: OUTLINE(@"SEL$2")
        hint num 20 len 17 text: OUTLINE(@"SEL$1")
        hint num 21 len 36 text: FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
        hint num 22 len 153 text: INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PRO
    VIDER_GROUP_PERIOD"."START_DATE"))
        hint num 23 len 77 text: INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
        hint num 24 len 62 text: INDEX(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
        hint num 25 len 84 text: LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
        hint num 26 len 38 text: USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
        hint num 27 len 38 text: USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
        hint num 28 len 38 text: USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
    SPM: generated non-matching plan:
    ----- Explain Plan Dump -----
    ----- Plan Table -----
    ============
    Plan Table
    ============
    ------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                       | Name              | Rows  | Bytes | Cost  | Time      |
    ------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                |                   |       |       |   179 |           |
    | 1   |  SORT UNIQUE                    |                   |   153 |   11K |   178 |  00:00:01 |
    | 2   |   NESTED LOOPS                  |                   |   153 |   11K |   177 |  00:00:01 |
    | 3   |    NESTED LOOPS                 |                   |   826 |   50K |    11 |  00:00:01 |
    | 4   |     NESTED LOOPS                |                   |   826 |   26K |     3 |  00:00:01 |
    | 5   |      TABLE ACCESS FULL          | CL_PROVIDER_GROUP |   116 |  2668 |     2 |  00:00:01 |
    | 6   |      INDEX RANGE SCAN           | CPGP_UK           |     7 |    63 |     1 |  00:00:01 |
    | 7   |     TABLE ACCESS BY INDEX ROWID | CL_PROVIDER_DETAIL|     1 |    30 |     1 |  00:00:01 |
    | 8   |      INDEX UNIQUE SCAN          | CPDE_PK           |     1 |       |     1 |  00:00:01 |
    | 9   |    TABLE ACCESS BY INDEX ROWID  | FN_ACCOUNT        |     1 |    14 |     1 |  00:00:01 |
    | 10  |     INDEX RANGE SCAN            | FACC_CPDE_FK_I    |    27 |       |     1 |  00:00:01 |
    ------------------------------------------------------------+-----------------------------------+
    Predicate Information:
    6 - access("CPGR"."CPGR_ID"="CPGP"."CPGR_ID")
    8 - access("CPDE"."CPDE_ID"="CPGP"."CPDE_ID")
    9 - filter((UPPER("CPGR"."NAME") LIKE UPPER('%'||:1||'%') OR UPPER("CPDE"."NAME") LIKE UPPER('%'||:2||'%') OR UPPER("CPDE"."ABN") LIKE UPPER(:3||'%')
    OR "CFCO"."ACCT_NO" LIKE UPPER(:4||'%')))
    10 - access("CPDE"."CPDE_ID"="CFCO"."CPDE_ID")
    10 - filter("CFCO"."CPDE_ID" IS NOT NULL)
    Content of other_xml column
    ===========================
      db_version     : 11.2.0.3
      parse_schema   : CARADM
      plan_hash      : 3311216257
      plan_hash_2    : 4009937738
      Outline Data:
      /*+
        BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
          DB_VERSION('11.2.0.3')
          OPT_PARAM('_always_anti_join' 'off')
          OPT_PARAM('_always_semi_join' 'off')
          OPT_PARAM('_index_join_enabled' 'false')
          OPT_PARAM('_optim_peek_user_binds' 'false')
          OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
          OPT_PARAM('optimizer_index_cost_adj' 1)
          OPT_PARAM('optimizer_index_caching' 100)
          FIRST_ROWS
          OUTLINE_LEAF(@"SEL$EE94F965")
          MERGE(@"SEL$9E43CB6E")
          OUTLINE(@"SEL$4")
          OUTLINE(@"SEL$9E43CB6E")
          MERGE(@"SEL$58A6D7F6")
          OUTLINE(@"SEL$3")
          OUTLINE(@"SEL$58A6D7F6")
          MERGE(@"SEL$1")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$1")
          FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
          INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PROVIDER_GROUP_PERIOD"."STA
    RT_DATE"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
          LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
          USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
          USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
          USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
        END_OUTLINE_DATA
    ------- END SPM Plan Dump -------
    SPM: plan reproducibility round 2 (hinted OFE only)
    SPM: using qksan to reproduce accepted plan, planId = 386463207
    SPM: planId in plan baseline = 386463207, planId of reproduced plan = 4009937738
    ------- START SPM Plan Dump -------
    SPM: failed to reproduce the plan using the following info:
      parse_schema name        : CARADM
      plan_baseline signature  : 17844158604836855983
      plan_baseline plan_id    : 386463207
      plan_baseline hintset    :
        hint num  1 len 37 text: OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
    SPM: generated non-matching plan:
    ----- Explain Plan Dump -----
    ----- Plan Table -----
    ============
    Plan Table
    ============
    ------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                       | Name              | Rows  | Bytes | Cost  | Time      |
    ------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                |                   |       |       |   179 |           |
    | 1   |  SORT UNIQUE                    |                   |   153 |   11K |   178 |  00:00:01 |
    | 2   |   NESTED LOOPS                  |                   |   153 |   11K |   177 |  00:00:01 |
    | 3   |    NESTED LOOPS                 |                   |   826 |   50K |    11 |  00:00:01 |
    | 4   |     NESTED LOOPS                |                   |   826 |   26K |     3 |  00:00:01 |
    | 5   |      TABLE ACCESS FULL          | CL_PROVIDER_GROUP |   116 |  2668 |     2 |  00:00:01 |
    | 6   |      INDEX RANGE SCAN           | CPGP_UK           |     7 |    63 |     1 |  00:00:01 |
    | 7   |     TABLE ACCESS BY INDEX ROWID | CL_PROVIDER_DETAIL|     1 |    30 |     1 |  00:00:01 |
    | 8   |      INDEX UNIQUE SCAN          | CPDE_PK           |     1 |       |     1 |  00:00:01 |
    | 9   |    TABLE ACCESS BY INDEX ROWID  | FN_ACCOUNT        |     1 |    14 |     1 |  00:00:01 |
    | 10  |     INDEX RANGE SCAN            | FACC_CPDE_FK_I    |    27 |       |     1 |  00:00:01 |
    ------------------------------------------------------------+-----------------------------------+
    Predicate Information:
    6 - access("CPGR"."CPGR_ID"="CPGP"."CPGR_ID")
    8 - access("CPDE"."CPDE_ID"="CPGP"."CPDE_ID")
    9 - filter((UPPER("CPGR"."NAME") LIKE UPPER('%'||:1||'%') OR UPPER("CPDE"."NAME") LIKE UPPER('%'||:2||'%') OR UPPER("CPDE"."ABN") LIKE UPPER(:3||'%')
    OR "CFCO"."ACCT_NO" LIKE UPPER(:4||'%')))
    10 - access("CPDE"."CPDE_ID"="CFCO"."CPDE_ID")
    10 - filter("CFCO"."CPDE_ID" IS NOT NULL)
    Content of other_xml column
    ===========================
      db_version     : 11.2.0.3
      parse_schema   : CARADM
      plan_hash      : 3311216257
      plan_hash_2    : 4009937738
      Outline Data:
      /*+
        BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
          DB_VERSION('11.2.0.3')
          OPT_PARAM('optimizer_index_cost_adj' 1)
          OPT_PARAM('optimizer_index_caching' 100)
          FIRST_ROWS
          OUTLINE_LEAF(@"SEL$EE94F965")
          MERGE(@"SEL$9E43CB6E")
          OUTLINE(@"SEL$4")
          OUTLINE(@"SEL$9E43CB6E")
          MERGE(@"SEL$58A6D7F6")
          OUTLINE(@"SEL$3")
          OUTLINE(@"SEL$58A6D7F6")
          MERGE(@"SEL$1")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$1")
          FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
          INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PROVIDER_GROUP_PERIOD"."STA
    RT_DATE"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
          LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
          USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
          USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
          USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
        END_OUTLINE_DATA
    ------- END SPM Plan Dump -------
    SPM: couldn't reproduce any enabled+accepted plan so using the cost-based plan, planId = 3838063866
    SPM: kkopmCheckSmbUpdate (enter) xscP=0x9fffffff7f3c8cc8, pmExCtx=0xc000000c8bbade48, ciP=0xc000000c872f95c0, dtCtx=0x6000000000054c30apologies once again for the huge post.

  • Querying SQL server table from Oracle database 11g

    Hi all
    We are using oracle database 11g R2 on REL 5 and i have an SQL server database used by one of our application.
    In my Oracle database, i want to query one table in my SQL server database and to link it in a table in Oracle database to compare data.
    Is there a way like database link or something else to do this need>
    Please send a link or pots here step by step the way on how to accomplish my query.
    Thank you.

    Yes, you can set up your SQL Server as an external database link, using Oracle Heterogeneous Services with SQL Server as an ODBC connection (easier to do if your Oracle server is a Windows server, a little more tricky if your Oracle server is *nix based)
    Here's the documentation... for 11gR2
    http://www.oracle.com/pls/db112/search?remark=quick_search&word=heterogeneous+services

  • How to migrate Azure SQL Codefirst DB to Oracle database?

    Hi,
    we have been developing a Web application with Windows Azure Code first  SQL DB using Code first approach.
    In the future we want to migrate our Azure SQL Code first DB to Oracle. If we migrate it to Oracle, does the application works fine? or do we need to do any additional actions in migrating from Azure SQL Code first  db to Oracle DB?
    It would be great if  anyone provides me complete information on this.

    Hi,
    You should be able to move the Azure SQL Code First Database to Oracle Database. You will have to make minor changes, for e.g connection string.
    Please have a check on the below link which talks about using Entity Framework 6 Code First with Azure SQL database as a backend. It will give you an idea on how to approach your migration.
    http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in-an-asp-net-mvc-application
    Regards,
    Mekh.

  • Calling SQL Server Function from Oracle Database link

    Hi ,
    i have some data from a old SQL server i would i can access with a database link but i cant call function from my database link.
    i would like to do something like
    @SPAN_PROD = Database link
    _EnerttObtApReelBassSys is a Table function from my SQL server
    SELECT *
    FROM "_EnerttObtApReelBassSys('20120504',4,1)"@SPAN_PROD
    WHERE DateEffectiveDebut <= GetDate()
    AND DateEffectiveFin > GetDate()
    any help ?
    Thnx

    951879 wrote:
    I have a SP in SQL Server which will return a Result Set.
    My requirement is to call that procedure in ORACLE using DB Link and insert that resultset(Data) in the temp table.First you need to setup Oracle to SQL Server connectivity. To do that you can either use HS - heterogeneous connectivity which comes for free or use Oracle Transparent Gateway which is not free. HS uses ODBC, so if your Oracle database in not on windows, you'll have to get ODBC SQL Server driver for Unix/Linux (e.g. from EasySoft). Since SQL Server selecting from table function syntax is different from Oracle's you will have to, if you use HS, to use DBMS_HS_PASSTHROUGH package. I never worked with Oracle Transparent Gateway to SQL Server, so I don't know if and how it supports selecting from SQL Server table function.
    SY.

  • Sending SQL null back to Oracle database

    I am trying to find out how to send a SQL NULL back to a Oracle database using a PreparedStatement in a Java Server Page. What do I need to set my variable to be able to do this. Can anyone help.
    Thanks in Advance, Brian

    Thankyou but how do I use it. ie. How do I use the SQL Type constant in the setNull statement.
    I am currently doing the following:
    pstmt.setNull(13,VARCHAR);
    I do I use VARCHAR as a int constant. Can you give me an example.
    Thanks.

Maybe you are looking for

  • Help! Word quits unexpectedly whenever I try to open it

    Help! This morning I opened my computer and my microsoft Word will not open. It was working fine last night and I've never had this problem before. I have an IBook G4 (purchased April 2004) whenever I click on the Word icon, it brings up the pop up m

  • What is the best gzip ratio by using pipe to export

    Hello, I try to use data pump to export a core application schema. (10Gdb 10.2.0.4) I use 'estimate' parameter of expdp before real export, and get future dump file size will be 235GB. the only issue is that my largest file system size is 34GB, so se

  • Album sync not working correct

    Hello everybody, i use the Photos app since the first Beta and i think that there is potential to be a good App. (IOS really needs the possibility to delete only the local picture an not the one in the include ) Now i updated to the new Yosemite and

  • Mail signature

    Has anyone noticed that the signature feature is nit working in mail?

  • Checkbox in Smartform

    Moved to correct forum by moderator hi , i want checkbox in smartforms.But my requirment is , it should be shown in print-preview also. Please help me . Ruchi Edited by: Matt on Feb 2, 2009 7:45 AM