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.

Similar Messages

  • 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

  • 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.*]';

  • SQL memory manager latch at top of the list

    select * from V$LATCH order by wait_time desc shows wait time = 451524661079 on SQL memory manager latch. What is making this so high?

    user498912 wrote:
    Thank you .. the pointer to the bug is helpful. We are having performance issues and complaints of slowness only during about a 2 or 3 hour window each weekday from about 7AM to 10AM EDT. This is definitely peak load. AWR is showing mostly disk i/o issues. Plan is to add about 20 GB more memory on the server. SGA currently at around 61GB with Automatic Shared Memory Management enabled. PGA advice showing nothing with a Cache Hit Percentage (%) 95.93
    I would look at v$sga_resize_ops (or v$memory_resize_ops) to see if there is pressure to move memory around in that time period. Your symptoms could simply be showing load on the buffer cache causing the library cache to shrink leading to agressive demands for library cache locks etc. If so, then fixing a minum shared_pool_size (or generally going to manual memory management) may be the best bet. Also worth checking if there is some inefficient SQL running at that time that results in lots of random I/O - eliminating the cause of disk reads may be the best solution to reducing demand for memory.
    Regards
    Jonathan Lewis

  • SQL Server Management Studio and Native Client different behaviour on delete

    I have a problem with transaction containing insert and delete to same table and some select/insert/update to some other tables. Problematic table has primary key defined as combination of column1 and column2.
    When two different instances using Native Client execute simultaneously this code and make inserts to table then delete part of code causes deadlock. However this doesn't happen when trying this situation in MS SQL Server Management Studio query.
    Is there some option that is missing from Native Client connection string which can cause this different behaviour?

    Hello,
    I don't think there is a difference in the behavior. SSMS uses ADO.NET and that Provider base on the Native Client.
    The difference will be more that way, when the transaction is commited and so the locks released. I guess your application keeps the transaction (much) longer open; you should commit a transaction as soon as possible to avoid long time locks and so
    deadlocks.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Permissions needed for Applying SQL Tuning Sets/SQL Plans 11g?

    What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
    The user has:
    ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
    The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
    Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
    If more information is needed in order to respond please advise.
    Thank you

    What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
    The user has:
    ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
    The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
    Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
    If more information is needed in order to respond please advise.
    Thank you

  • SQL Exception: A lock could not be obtained within the time requested

    Hi Friends,
    In one of my processes there is an automatic activity which reads some records from an excel sheet and loads them in a separated array of objects and then for each object in the array it creates a copy using Split-N. There are about 2000 records read which takes about 3 minutes to process in Fuego Studio. But, when it comes to process Split-N activity, it takes pretty long time... keeps processing the for loop for about 15 mins and then I get SQL Exception: SQL Exception: A lock could not be obtained within the time requested (Details below). In the meantime it processes close to 950 records.
    In order to resolve it I tried increasing timeout interval in Server Preferences to 2400 secs changig default 1200 secs but no results.
    To my utter surprise none of the logMessages get logged until Split-N activity completes.
    Can somebody please put more light on this and suggest if I'm doing something wrong?
    FYI, I'm posting my Split-N code and the SQL exception details.
    EXCEPTION
    =========
    Problems updating the BAM database. Reason:Unable to connect to the database.
    Caused by: A lock could not be obtained within the time requested
    fuego.analyzer.UpdaterRuntimeException: Unable to connect to the database.
         at fuego.analyzer.UpdaterRuntimeException.cannotConnecToDatabase(UpdaterRuntimeException.java:80)
         at fuego.analyzer.UpdaterRunner.synchronizeMetadata(UpdaterRunner.java:494)
         at fuego.analyzer.UpdaterRunner.run(UpdaterRunner.java:273)
         at fuego.analyzer.UpdaterRunner.runUpdater(UpdaterRunner.java:176)
         at fuego.server.service.BAMRunnerService.runUpdater(BAMRunnerService.java:62)
         at fuego.server.execution.BAMUpdater.execute(BAMUpdater.java:33)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:290)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:465)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:543)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:216)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:116)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:56)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:265)
         at fuego.server.execution.ToDoItem.run(ToDoItem.java:536)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:752)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:732)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:138)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:130)
         at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:429)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:816)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:395)
    Caused by: SQL Exception: A lock could not be obtained within the time requested
         at com.ibm.db2cs.m.j.generateCsSQLException(Unknown Source)
         at com.ibm.db2cs.m.b.wrapInSQLException(Unknown Source)
         at com.ibm.db2cs.m.b.handleException(Unknown Source)
         at com.ibm.db2cs.m.d.handleException(Unknown Source)
         at com.ibm.db2cs.m.t.handleException(Unknown Source)
         at com.ibm.db2cs.m.s.closeOnTransactionError(Unknown Source)
         at com.ibm.db2cs.m.s.movePosition(Unknown Source)
         at com.ibm.db2cs.m.s.next(Unknown Source)
         at fuego.jdbc.FaultTolerantResultSet.next(FaultTolerantResultSet.java:553)
         at fuego.analyzer.Updater.loadInstanceInfoValues(Updater.java:1039)
         at fuego.analyzer.Updater.loadInstanceInfoValues(Updater.java:988)
         at fuego.analyzer.Updater.loadInstanceInfo(Updater.java:982)
         at fuego.analyzer.Updater.synchronize(Updater.java:252)
         at fuego.analyzer.UpdaterRunner.synchronizeMetadata(UpdaterRunner.java:480)
         ... 20 moreSplit-N Code
    ==========
    for (int i = 0; i <= (eventList.events.count() - 1); i++) {
        copy = clone(this);
        logMessage("INSTANCE(" + (i + 1) + ") CLONED: " + copy.currEvent.text_data, severity : DEBUG);
        copy.currEvent = eventList.events.event;
    logMessage("Event(" + (i + 1) + ") Assigned.", severity : DEBUG);
    copy.eventList = null;
    logMessage("EventList(" + (i + 1) + ") set to null.", severity : DEBUG);
    copy.description = (copy.currEvent.text_data + "(" + copy.currEvent.login_name + ")").strip(len : 200);
    logMessage("EVENT(" + (i + 1) + ") COPIED: " + copy.currEvent.text_data, severity : DEBUG);
    Any help in this regard would be highly appreciated.
    Regards,
    Manoj
    =============================================
    [url http://www.economicalwebsites.com]Cheap Web Hosting by EconomicalWebsites.com
    =============================================
    Edited by goelmk at 12/05/2007 8:14 AM

    Hi Friends,
    In one of my processes there is an automatic activity which reads some records from an excel sheet and loads them in a separated array of objects and then for each object in the array it creates a copy using Split-N. There are about 2000 records read which takes about 3 minutes to process in Fuego Studio. But, when it comes to process Split-N activity, it takes pretty long time... keeps processing the for loop for about 15 mins and then I get SQL Exception: SQL Exception: A lock could not be obtained within the time requested (Details below). In the meantime it processes close to 950 records.
    In order to resolve it I tried increasing timeout interval in Server Preferences to 2400 secs changig default 1200 secs but no results.
    To my utter surprise none of the logMessages get logged until Split-N activity completes.
    Can somebody please put more light on this and suggest if I'm doing something wrong?
    FYI, I'm posting my Split-N code and the SQL exception details.
    EXCEPTION
    =========
    Problems updating the BAM database. Reason:Unable to connect to the database.
    Caused by: A lock could not be obtained within the time requested
    fuego.analyzer.UpdaterRuntimeException: Unable to connect to the database.
         at fuego.analyzer.UpdaterRuntimeException.cannotConnecToDatabase(UpdaterRuntimeException.java:80)
         at fuego.analyzer.UpdaterRunner.synchronizeMetadata(UpdaterRunner.java:494)
         at fuego.analyzer.UpdaterRunner.run(UpdaterRunner.java:273)
         at fuego.analyzer.UpdaterRunner.runUpdater(UpdaterRunner.java:176)
         at fuego.server.service.BAMRunnerService.runUpdater(BAMRunnerService.java:62)
         at fuego.server.execution.BAMUpdater.execute(BAMUpdater.java:33)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:290)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:465)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:543)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:216)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:116)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:56)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:265)
         at fuego.server.execution.ToDoItem.run(ToDoItem.java:536)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:752)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:732)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:138)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:130)
         at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:429)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:816)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:395)
    Caused by: SQL Exception: A lock could not be obtained within the time requested
         at com.ibm.db2cs.m.j.generateCsSQLException(Unknown Source)
         at com.ibm.db2cs.m.b.wrapInSQLException(Unknown Source)
         at com.ibm.db2cs.m.b.handleException(Unknown Source)
         at com.ibm.db2cs.m.d.handleException(Unknown Source)
         at com.ibm.db2cs.m.t.handleException(Unknown Source)
         at com.ibm.db2cs.m.s.closeOnTransactionError(Unknown Source)
         at com.ibm.db2cs.m.s.movePosition(Unknown Source)
         at com.ibm.db2cs.m.s.next(Unknown Source)
         at fuego.jdbc.FaultTolerantResultSet.next(FaultTolerantResultSet.java:553)
         at fuego.analyzer.Updater.loadInstanceInfoValues(Updater.java:1039)
         at fuego.analyzer.Updater.loadInstanceInfoValues(Updater.java:988)
         at fuego.analyzer.Updater.loadInstanceInfo(Updater.java:982)
         at fuego.analyzer.Updater.synchronize(Updater.java:252)
         at fuego.analyzer.UpdaterRunner.synchronizeMetadata(UpdaterRunner.java:480)
         ... 20 moreSplit-N Code
    ==========
    for (int i = 0; i <= (eventList.events.count() - 1); i++) {
        copy = clone(this);
        logMessage("INSTANCE(" + (i + 1) + ") CLONED: " + copy.currEvent.text_data, severity : DEBUG);
        copy.currEvent = eventList.events.event;
    logMessage("Event(" + (i + 1) + ") Assigned.", severity : DEBUG);
    copy.eventList = null;
    logMessage("EventList(" + (i + 1) + ") set to null.", severity : DEBUG);
    copy.description = (copy.currEvent.text_data + "(" + copy.currEvent.login_name + ")").strip(len : 200);
    logMessage("EVENT(" + (i + 1) + ") COPIED: " + copy.currEvent.text_data, severity : DEBUG);
    Any help in this regard would be highly appreciated.
    Regards,
    Manoj
    =============================================
    [url http://www.economicalwebsites.com]Cheap Web Hosting by EconomicalWebsites.com
    =============================================
    Edited by goelmk at 12/05/2007 8:14 AM

  • Impossible to open .dtproje file after re-installing SQL Server Management Studio

    Hi all,
    today, after re-installing SQL Server Management Studio from a package downloaded from MS web site (SQLManagementStudio_x64_FRA.exe), I tried to open a SSIS package file via Visual Studio and I get a message stating that  this type of project (.dtproj)
    is not supported.
    Here are the events that lead to this problem:
    We have SQL Server 2005 installed on a server and are planning to migrate to SQL Server 2012.
    1 - Earlier this year, to solve a problem that we had with the SSMS client, we installed SSMS 2012 client on my station.
    At this point, it worked fine for SSMS and when I tried to access SSIS it converted the packages  to SSIS 2012 and it worked fine too.
    2 - Yesterday, I tried to access SSMS and I had the message that the test period had expired; at this point I could open a SSIS file.
    3 - To solve the problem with SSMS we decided to re-install it. It worked fine for SSMS but now I am not able to open a SSIS file.
    Do you have any idea of what the problem is and what should I do to solve it?
    It seems that there are some SSIS component missing, how could I get them back?

    You are welcome Sylviep,
    Based on what I see you want to create BI projects (e.g. a SSIS project), thus it will be enough to install SSDT
    which is part of the SQL Server installation media. I do not see why you would re-install SQL Server itself.
    Arthur My Blog

  • SQL 2012 Management Studio Remote Servers Service Status Slow/Stops Working

    This is a huge annoyance.  I manage about 50 SQL instances of SQL Server versions 2005-2012 and I noticed that it takes 1-2 seconds to load the service status (green arrow) on each individual server.  If you then connect to a server, you have to
    wait for all the statuses to be loaded first in the Registered Servers list before it loads the statuses for servers in the Object Explorer.  This happens whether the servers are registered in Local Server Groups or Central Management Servers, and whether
    I have access to all servers (as windows local administrator and sa), or not.  It also happens regardless of whether I run as Administrator or normally on my instance of SSMS (which is SQL 2012 Development on Windows Server 2008 R2).
    These servers are also registered in alphabetical order by group and server name, which means that if I have "DEV" groups, they will be registered before "PROD", unless I rename accordingly.  It sometimes takes a few minutes, if
    I'm lucky, to get a server I connect to to load, which means I can't use SSMS to really manage any remote servers and start/stop/pause/resume/restart services.
    Worse, sometimes due to a server becoming unavailable (due to updates/patches/failovers), SSMS is unable to load the service statuses anymore for any new server connections made to object explorer, resulting in the loss of ability to view/change service statuses. 
    In this case, there is no way to recover (Refresh of Central Management Servers does nothing), except to close SSMS and open it again, and then wait again for all the statuses to load.
    I have lived with this since first installing SQL, and regardless of the Windows Updates and SQL patches applied, the problem has never gone away.  This also happens if I load SSMS in Windows Server 2012.  Its starting to become a huge issue now
    that I have to patch several servers each month.
    I have already checked WMI permissions, GPO, firewall, etc. as per all the suggestion on the internet, including this post
    http://www.sqlservercentral.com/Forums/Topic825246-146-1.aspx.  None of these suggestions have made a difference, as my real problem is one of connectivity and performance, and
    not security, which most of these suggestions apply to.  Of note, all servers are in the same domain, firewall is disabled across the board, correct permissions for local administrators exist for remote registry settings, WMI, GPO, etc, and all service
    accounts and windows accounts that are used are local admins and sysadmins.
    My work-around has been to delete the Central Management Server and any local server group registered servers, close and re-launch SSMS, and then connect to a server I'm interested in via Object Explorer.  Otherwise, close and re-launch will take forever. 
    My other alternative is to RDP into the remote server and manage services via SQL Configuration Manager locally.
    If anyone has any ideas on how to fix this, or make it go faster, I'd really appreciate it.
    Diane

    Hi Satish,
    Thanks for taking the time to reply.  Yes, I actually am already using work-arounds (i.e. methods other than SSMS) to accomplish my tasks.  My issue is that this is supposed to be working and provide a nice GUI so that you can easily visualize
    any issues, and address them directly, without having to hodge-podge access via scripts or 3rd-Party tools.
    Since no one else has any comments, I guess there are no plans to make remote server administration work with SSMS properly then, and that kludge methods are the only ones being advocated.
    Diane

  • Album more expensive than sum of tracks

    I've found that with some albums, the album is more expensive than all the individual tracks together.
    For example, take Staind's new album:
    http://music.ovi.com/za/en/pc/Product/Staind/Staind/19390411
    Note: I can only see the South African pricing - don't know how the pricing works in other countries.
    It contains 10 tracks, costing R8 each, giving a total of R80.
    However, the album costs R100. Why is the album more expensive? Does it contain anything more than the tracks? This is one example, but I've seen a few others as well.

    No reason to buy a more expensive album, if you can get the individual tracks separately for less.
    I have no insight to record lable pricing. This one sounds a bit like an accident/mistake.
    Compare also the pricing in, e.g., Apple's iTunes store and other music services that are offered in your country; if they sell the tracks or the album as MP3's or AAC's, or even WMA, you can use them on your Nokia phone. Make sure you buy them without any DRM (Digital Rights Management) protection ("plain" audio files).

  • Query used by SQL Server Management Pack for monitoring database backups

    I use SCOM 2012 R2 and the SQL Server Management Pack to monitor SQL Server database backups. I believe I am getting false positives. SCOM reports database are not backuped, while in fact they are. So I need to troubleshoot this. I suspect SCOM is querying
    the backup history in the msdb database. I want to know which query SCOM uses.
    I have tried looking in the monitor's definition but I suspect the query is embedded in the management pack files which are binary. I have also tried running a trace using the SQL Server Profiler on my test environment and overriding the interval to 60 seconds,
    but I don't see a relevant query being executed. I also don't see the alert reappear so I suspect SCOM does not honor the interval in a way I would expect.
    What query, or other method, does SCOM use to check database backups?
    Thanks in advance.

    Thank you both Ivan and Michael,
    I only saw your messages by email and didn't see your screen shot before I extracted the query myself. In my own queries I calculate the backup age in hours instead of days because of daily full backups. Perhaps It will be a good idea to create my own monitors
    from scratch like I used to do with Nagios.
    I will study the vbscripts and might create my own version which allows the query to be entered as an parameter and move all code to a .Net class which can be called from vbscript as an COM object. This way I hope to reduce the vbscript code to an minimum
    while keeping the flexibility of the SCOM Operations Console and the robustness of .Net. I suspect I want to make more non standard monitors in the future.
    Regards,
    Arjen

  • Entity Framework doesn't create the database in SQL Server Management 2012, instead it just creates in (localdb)\v11.0 How to fix it?

    Hi, I'm Begginer in Entity Framework. Then I'm having some problems.
    I created my entities and I give Save Changes. (Ok)
    Then, I Tried to Connect with the database through Server Explorer, if I use the instance of the SQL Server Management Studio 2012(PC-PAULO\INSTANCIAPJ) as Server Name, the database doesn't appears but, if I use the the instance (localdb)\v11.0 the dabase
    appears.
    How to change the save to the SQL Server Management Studio 2012, I don't know where this (localDB)\v11.0 saves.
    Help-me Thank you :D

    Hello PauloJos,
    The code should be ok and it is really strange that the database is only created into the local database in your machine. I am wondering if it is related with the machine environment, could you please have a try with below demo on your machine which works
    on my side and if it is possible, please have a try to run your application on other machines to see if it works:
    class Program
    static void Main(string[] args)
    #region https://social.msdn.microsoft.com/Forums/en-US/00eff3c4-2336-4807-9212-e6f2a6c8812e/entity-framework-doesnt-create-the-database-in-sql-server-management-2012-instead-it-just-creates?forum=adodotnetentityframework
    using (CFDbContext db = new CFDbContext())
    db.Database.CreateIfNotExists();
    #endregion
    public class CFDbContext : DbContext
    public CFDbContext() : base("UltraFoda3") { }
    public DbSet<TestOne> TestOnes { get; set; }
    public class TestOne
    public int ID { get; set; }
    public string Name { get; set; }
    Config file is similar:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </configSections>
    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
    <parameters>
    <parameter value="v11.0" />
    </parameters>
    </defaultConnectionFactory>
    <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
    </entityFramework>
    <connectionStrings>
    <add name="UltraFoda3" connectionString="Data Source=YourServer;Initial Catalog=UltraFoda3;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    </connectionStrings>
    </configuration>
    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.

  • What version of SQL Server Management Studio do I need?

    I need to install SQL Server Management Studio on my windows 8.1 PRO 64-bit pc to manage SQL server 2008 R2. do I download the 2014 or 2012  or 2008 version?

    Hello,
    Install the SQL Server Management Studio (SSMS) of the same version of SQL Server you have installed.
    If you modify maintenance plans using a newer version of SSMS, you then cannot use a lower version of SSMS to modify/change it again.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • I am trying connect to a SQL instance for our CRM program and I am receiving To Connect to this Server you must use SQL Management Studio or SQL Server Management

    I am trying connect to a SQL instance for our CRM program and I am receiving To Connect to this Server you must use SQL Management Studio or SQL Server Management 
    This is a Brand new Server 2012 that is running our CRM product and it is trying to connect to a Server 2008 R2 server with SQL Server 2008 R2 SP2 instance (10.50.4000)
    I have seen this in the past where it needed the 2005 backwards compatibility components installed but those are not supported on 2012 server and this is not a 2005 SQL instance.
    I am trying to install the Shared Management Objects for SQL Server 2008 but it tells me I need to install the CLR types, which I did install. But it continues to tell me to install the CLR types.
    Has anyone ran into any issues like this? (this happens trying to connect to multiple SQL Servers from this new 2012 Server)
    Thanks!
    -Max

    Hello,
    Which version and edition of the SQL Server instance did you installed on the new server machine?  If you install SQL Server 2012 Express edition, you can try to install SQL Server Management Studio 2012 from
    this link.
    You can connect to SQL Server 2008 R2 or earily verions with SSMS 2012.
    What's more, Microsoft SQL Server 2008 Management Objects Collection requires Microsoft Core XML Services (MSXML) 6.0, Microsoft SQL Server Native Client, and Microsoft SQL Server System CLR Types. You can try to download and install
    SQL Serve 2008 Feature Pack
    which contains packages above.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

Maybe you are looking for

  • Searsh help in dailog programming

    Hi, I have made a search help for a field in module pool.. i am getting the required result. My requirement is that i have to fill the other 5 fields on the screen based on my selection of the value in the search help. can someone help me out here?

  • Create file with subdirectories? (Unzip)

    Hi, when following the example to unzip the contents of a zip file (http://developer.java.sun.com/developer/technicalArticles/Programming/compression/ ), it fails when the files are situated in subdirectories. So there is no way to create a file in n

  • Internet Keyword Search not working

    I recently updated Firefox to 8.0.1, and since then I have been having problems with searching from the location bar. When I try to use firefox's 'Internet Keyword Search', it comes up with the message "File not found: Firefox can't find the file at

  • TS1347 after upgrading to iOS 7.0.4 i am unable to sync my contacts in Outlook

    After upgrading to iOS 7.0.4 i am unable to sync my contacts in Outlook.  Help! Thank you, Victor

  • Filters in Reporting

    Hi Experts, Can anyone gve the information regarding Filter in reporting ie., in which senario this will helps and where we r going to use these filter. Regards, Ramakrishna K