Query Fast In SQLPlus and Toad but Slow Otherwise

Environment is Oracle 10g on AIX with 10g drivers on Windows XP as the client. Several queries run in less than 9 seconds in Toad and SQLPlus but take hours or never return in Business Objects Deski, MS Access, and SQL Server SSIS. The exact same SQL produces completely different explain plans based on if it is run from Toad/SQLPlus vs the other products I mentioned. All the software is on the same XP machine and does not use middleware. 99 percent of our queries will run fast or slow in all products. What is it that Toad and/or SQLPlus does to run the queries fast? Why does Oracle change explain plans based on what application connects to it? The goal is to run Business Objects reports from Oracle. Any help or direction for further troubleshooting would be appreciated. Thank-you.

Charles, on the XP machine I selected the Admin option when installing the client. The software should be 10g R2. Below is the information requested. If you need more please let me know. Also, I am asking our DBA to check the bitmap issue.
I appreciate the help. Thank-you for taking your time...
BAD Settings
SQL_ID                CN NAME                                     VALUE                     DEF
64yzv2570s56x          0 _pga_max_size                            209700 KB                 NO
64yzv2570s56x          0 active_instance_count                    1                         YES
64yzv2570s56x          0 bitmap_merge_area_size                   1048576                   YES
64yzv2570s56x          0 cpu_count                                4                         YES
64yzv2570s56x          0 cursor_sharing                           similar                   NO
64yzv2570s56x          0 hash_area_size                           131072                    YES
64yzv2570s56x          0 optimizer_dynamic_samplin                2                         YES
64yzv2570s56x          0 optimizer_features_enable                10.2.0.4                  YES
64yzv2570s56x          0 optimizer_index_caching                  0                         YES
64yzv2570s56x          0 optimizer_index_cost_adj                 100                       YES
64yzv2570s56x          0 optimizer_mode                           choose                    NO
64yzv2570s56x          0 optimizer_secure_view_mer                true                      YES
64yzv2570s56x          0 parallel_ddl_mode                        enabled                   YES
64yzv2570s56x          0 parallel_dml_mode                        disabled                  YES
64yzv2570s56x          0 parallel_execution_enable                true                      YES
64yzv2570s56x          0 parallel_query_mode                      enabled                   YES
64yzv2570s56x          0 parallel_threads_per_cpu                 2                         YES
64yzv2570s56x          0 pga_aggregate_target                     1048576 KB                YES
64yzv2570s56x          0 query_rewrite_enabled                    true                      YES
64yzv2570s56x          0 query_rewrite_integrity                  trusted                   NO
64yzv2570s56x          0 skip_unusable_indexes                    true                      YES
64yzv2570s56x          0 sort_area_retained_size                  0                         YES
64yzv2570s56x          0 sort_area_size                           65536                     YES
64yzv2570s56x          0 star_transformation_enabl                temp_disable              NO
64yzv2570s56x          0 statistics_level                         typical                   YES
64yzv2570s56x          0 workarea_size_policy                     auto                      YES
GOOD Settings
SQL_ID                CN NAME                                     VALUE                     DEF
7y2m07bk7qwgx          0 _pga_max_size                            209700 KB                 NO
7y2m07bk7qwgx          0 active_instance_count                    1                         YES
7y2m07bk7qwgx          0 bitmap_merge_area_size                   1048576                   YES
7y2m07bk7qwgx          0 cpu_count                                4                         YES
7y2m07bk7qwgx          0 cursor_sharing                           similar                   NO
7y2m07bk7qwgx          0 hash_area_size                           131072                    YES
7y2m07bk7qwgx          0 optimizer_dynamic_samplin                2                         YES
7y2m07bk7qwgx          0 optimizer_features_enable                10.2.0.4                  YES
7y2m07bk7qwgx          0 optimizer_index_caching                  0                         YES
7y2m07bk7qwgx          0 optimizer_index_cost_adj                 100                       YES
7y2m07bk7qwgx          0 optimizer_mode                           choose                    NO
7y2m07bk7qwgx          0 optimizer_secure_view_mer                true                      YES
7y2m07bk7qwgx          0 parallel_ddl_mode                        enabled                   YES
7y2m07bk7qwgx          0 parallel_dml_mode                        disabled                  YES
7y2m07bk7qwgx          0 parallel_execution_enable                true                      YES
7y2m07bk7qwgx          0 parallel_query_mode                      enabled                   YES
7y2m07bk7qwgx          0 parallel_threads_per_cpu                 2                         YES
7y2m07bk7qwgx          0 pga_aggregate_target                     1048576 KB                YES
7y2m07bk7qwgx          0 query_rewrite_enabled                    true                      YES
7y2m07bk7qwgx          0 query_rewrite_integrity                  trusted                   NO
7y2m07bk7qwgx          0 skip_unusable_indexes                    true                      YES
7y2m07bk7qwgx          0 sort_area_retained_size                  0                         YES
7y2m07bk7qwgx          0 sort_area_size                           65536                     YES
7y2m07bk7qwgx          0 star_transformation_enabl                temp_disable              NO
7y2m07bk7qwgx          0 statistics_level                         typical                   YES
7y2m07bk7qwgx          0 workarea_size_policy                     auto                      YES
BAD Plan
PLAN_TABLE_OUTPUT                                                                                                                                    
SQL_ID  64yzv2570s56x, child number 0                                                                                                                
SELECT  --q2   DM_FAC.FAC_NM,     COUNT(DISTINCT DM_ACCT.ACCT_SK),     DM_DRG_SVC_LN.DRG_SVC_LN_DESC                                                 
FROM     DM_FAC,     DM_ACCT,     DM_DRG_SVC_LN,     DM_ORG_UNIT_GRP,     DM_ORG_UNIT_DIV,                                                           
DM_DT_QRY DM_DT__DSCH,     DM_BILL_LOC,     DM_DT_QRY DM_DT_VISITSVC,                                                                            
FACT_VISIT,     DM_RSP_PTY    WHERE     (                                                                                          
DM_ORG_UNIT_GRP.ORG_UNIT_GRP_SK=DM_ORG_UNIT_DIV.ORG_UNIT_GRP_SK )     AND ( DM_ORG_UNIT_GRP.ARCHIVE_IND                                              
= :"SYS_B_00" )     AND ( DM_DT_VISITSVC.DT2_SK=FACT_VISIT.SVC_DT2_SK )     AND (                                                  
DM_BILL_LOC.BILL_LOC_SK=FACT_VISIT.BILL_LOC_SK )     AND (                                                                         
DM_ORG_UNIT_DIV.ORG_UNIT_DIV_SK=FACT_VISIT.ORG_UNIT_DIV_SK )     AND (                                                             
FACT_VISIT.DEL_IND=:"SYS_B_01" )     AND ( DM_RSP_PTY.ACCT_SK=DM_ACCT.ACCT_SK )                                                    
AND ( DM_RSP_PTY.RSP_PTY_TYPE_CD=:"SYS_B_02" )     AND ( DM_ACCT.FAC_CD=DM_FAC.FAC_CD )     AND (                                                    
DM_ACCT.DSCH_DT=DM_DT__DSCH.DT )     AND ( DM_ACCT.DRG_SVC_LN_SK=DM_DRG_SVC_LN.DRG_SVC_LN                                                        
Plan hash value: 2053235935                                                                                                                          
| Id  | Operation                             | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |                                     
|   0 | SELECT STATEMENT                      |                        |       |       |  7559 (100)|          |                                     
|   1 |  SORT GROUP BY                        |                        |     1 |   174 |  7559   (2)| 00:00:20 |                                     
|*  2 |   FILTER                              |                        |       |       |            |          |                                     
|   3 |    NESTED LOOPS                       |                        |     1 |   174 |  7558   (2)| 00:00:20 |                                     
|   4 |     NESTED LOOPS                      |                        |     1 |   149 |  7557   (2)| 00:00:20 |                                     
|*  5 |      HASH JOIN                        |                        |     1 |   128 |  7556   (2)| 00:00:20 |                                     
|   6 |       NESTED LOOPS                    |                        |     6 |   678 |  7543   (2)| 00:00:20 |                                     
|   7 |        NESTED LOOPS                   |                        |   170 | 15300 |  7201   (2)| 00:00:19 |                                     
|*  8 |         HASH JOIN                     |                        |    41 |  3239 |  5141   (2)| 00:00:14 |                                     
|*  9 |          HASH JOIN                    |                        |    75 |  4725 |  5137   (2)| 00:00:14 |                                     
|* 10 |           TABLE ACCESS FULL           | DM_ORG_UNIT_DIV        |   170 |  2550 |     5   (0)| 00:00:01 |                                     
|* 11 |           HASH JOIN                   |                        |   204 |  9792 |  5131   (2)| 00:00:14 |                                     
|* 12 |            TABLE ACCESS FULL          | DM_DT_QRY              |     7 |    98 |    13  (16)| 00:00:01 |                                     
|* 13 |            TABLE ACCESS BY INDEX ROWID| FACT_VISIT    | 17647 |   448K|  3893   (2)| 00:00:11 |                                     
|  14 |             NESTED LOOPS              |                        | 35294 |  1171K|  5116   (2)| 00:00:14 |                                     
|* 15 |              TABLE ACCESS FULL        | DM_BILL_LOC            |     2 |    16 |     3   (0)| 00:00:01 |                                     
|* 16 |              INDEX RANGE SCAN         | FV_DMBILLLOC_FK | 35294 |       |   105   (4)| 00:00:01 |                                     
|* 17 |          TABLE ACCESS FULL            | DM_ORG_UNIT_GRP        |    57 |   912 |     3   (0)| 00:00:01 |                                     
|* 18 |         TABLE ACCESS BY INDEX ROWID   | DM_RSP_PTY             |     4 |    44 |    50   (0)| 00:00:01 |                                     
|* 19 |          INDEX RANGE SCAN             | XSI_DMRSPPY_CNRPERSID  |    48 |       |     2   (0)| 00:00:01 |                                     
|* 20 |        TABLE ACCESS BY INDEX ROWID    | DM_ACCT                |     1 |    23 |     2   (0)| 00:00:01 |                                     
|* 21 |         INDEX UNIQUE SCAN             | DM_ACCT_PK             |     1 |       |     1   (0)| 00:00:01 |                                     
|* 22 |       TABLE ACCESS FULL               | DM_DT_QRY              |    30 |   450 |    12   (9)| 00:00:01 |                                     
|  23 |      TABLE ACCESS BY INDEX ROWID      | DM_FAC                 |     1 |    21 |     1   (0)| 00:00:01 |                                     
|* 24 |       INDEX UNIQUE SCAN               | DM_FAC_UK              |     1 |       |     0   (0)|          |                                     
|  25 |     TABLE ACCESS BY INDEX ROWID       | DM_DRG_SVC_LN          |     1 |    25 |     1   (0)| 00:00:01 |                                     
|* 26 |      INDEX UNIQUE SCAN                | DM_DRG_SVC_LN_PK       |     1 |       |     0   (0)|          |                                     
Predicate Information (identified by operation id):                                                                                                  
   2 - filter((TO_DATE(:SYS_B_16,:SYS_B_17)<=TO_DATE(:SYS_B_18,:SYS_B_19) AND :SYS_B_00=:SYS_B_07))                                                  
   5 - access("DM_ACCT"."DSCH_DT"="DM_DT__DSCH"."DT")                                                                                            
   8 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_GRP_SK"="DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_SK")                                                               
   9 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_DIV_SK"="FACT_VISIT"."ORG_UNIT_DIV_SK")                                                           
  10 - filter(("DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_08 OR                                                                                       
              "DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_09))                                                                                         
  11 - access("DM_DT_VISITSVC"."DT2_SK"="FACT_VISIT"."SVC_DT2_SK")                                                                          
  12 - filter(("DM_DT_VISITSVC"."DT">=TO_DATE(:SYS_B_16,:SYS_B_17) AND                                                                               
              "DM_DT_VISITSVC"."DT"<=TO_DATE(:SYS_B_18,:SYS_B_19)))                                                                                  
  13 - filter("FACT_VISIT"."DEL_IND"=:SYS_B_01)                                                                                             
  15 - filter(("DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_14 OR "DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_15))                                                    
  16 - access("FACT_VISIT"."BILL_LOC_SK"="DM_BILL_LOC"."BILL_LOC_SK")                                                                       
  17 - filter(("DM_ORG_UNIT_GRP"."ARCHIVE_IND"=:SYS_B_00 AND                                                                                         
              INTERNAL_FUNCTION("DM_ORG_UNIT_GRP"."EIS_LVL_1") AND                                                                                   
              TO_NUMBER("DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_NBR")<>:SYS_B_13))                                                                           
  18 - filter("DM_RSP_PTY"."RSP_PTY_TYPE_CD"=:SYS_B_02)                                                                                              
  19 - access("DM_RSP_PTY"."CNR_PERS_ID_CURR"="FACT_VISIT"."CNR_PERS_ID_CURR")                                                              
       filter("DM_RSP_PTY"."CNR_PERS_ID_CURR" IS NOT NULL)                                                                                           
  20 - filter("DM_ACCT"."CURR_PAT_TYPE_CD"=:SYS_B_10)                                                                                                
  21 - access("DM_RSP_PTY"."ACCT_SK"="DM_ACCT"."ACCT_SK")                                                                                            
  22 - filter(("DM_DT__DSCH"."MTH_NBR"=:SYS_B_12 AND "DM_DT__DSCH"."YR_NBR"=:SYS_B_11))                                                      
  24 - access("DM_ACCT"."FAC_CD"="DM_FAC"."FAC_CD")                                                                                                  
  26 - access("DM_ACCT"."DRG_SVC_LN_SK"="DM_DRG_SVC_LN"."DRG_SVC_LN_SK")                                                                             
GOOD Plan
PLAN_TABLE_OUTPUT                                                                                                                                    
SQL_ID  7y2m07bk7qwgx, child number 0                                                                                                                
SELECT --q1   DM_FAC.FAC_NM,    COUNT(DISTINCT DM_ACCT.ACCT_SK),    DM_DRG_SVC_LN.DRG_SVC_LN_DESC  FROM                                              
DM_FAC,    DM_ACCT,    DM_DRG_SVC_LN,    DM_ORG_UNIT_GRP,    DM_ORG_UNIT_DIV,    DM_DT_QRY  DM_DT__DSCH,                                         
DM_BILL_LOC,    DM_DT_QRY  DM_DT_VISITSVC,    FACT_VISIT,    DM_RSP_PTY  WHERE    (                                                
DM_ORG_UNIT_GRP.ORG_UNIT_GRP_SK=DM_ORG_UNIT_DIV.ORG_UNIT_GRP_SK  )    AND  ( DM_ORG_UNIT_GRP.ARCHIVE_IND =                                           
:"SYS_B_00"  )    AND  ( DM_DT_VISITSVC.DT2_SK=FACT_VISIT.SVC_DT2_SK  )    AND  (                                                  
DM_BILL_LOC.BILL_LOC_SK=FACT_VISIT.BILL_LOC_SK  )    AND  (                                                                        
DM_ORG_UNIT_DIV.ORG_UNIT_DIV_SK=FACT_VISIT.ORG_UNIT_DIV_SK  )    AND  (                                                            
FACT_VISIT.DEL_IND=:"SYS_B_01"  )    AND  ( DM_RSP_PTY.ACCT_SK=DM_ACCT.ACCT_SK  )    AND  (                                        
DM_RSP_PTY.RSP_PTY_TYPE_CD=:"SYS_B_02"  )    AND  ( DM_ACCT.FAC_CD=DM_FAC.FAC_CD  )    AND  (                                                        
DM_ACCT.DSCH_DT=DM_DT__DSCH.DT  )    AND  ( DM_ACCT.DRG_SVC_LN_SK=DM_DRG_SVC_LN.DRG_SVC_LN_SK  )                                                 
Plan hash value: 1376284724                                                                                                                          
| Id  | Operation                                    | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |                           
|   0 | SELECT STATEMENT                             |                           |       |       | 22053 (100)|          |                           
|   1 |  SORT GROUP BY                               |                           |     2 |   348 | 22053   (3)| 00:00:57 |                           
|*  2 |   FILTER                                     |                           |       |       |            |          |                           
|   3 |    NESTED LOOPS                              |                           |     2 |   348 | 22052   (3)| 00:00:57 |                           
|   4 |     NESTED LOOPS                             |                           |     2 |   306 | 22050   (3)| 00:00:57 |                           
|   5 |      NESTED LOOPS                            |                           |     2 |   256 | 22048   (3)| 00:00:57 |                           
|*  6 |       HASH JOIN                              |                           |     4 |   456 | 22044   (3)| 00:00:57 |                           
|*  7 |        HASH JOIN                             |                           |     8 |   784 | 22041   (3)| 00:00:57 |                           
|*  8 |         HASH JOIN                            |                           |    21 |  1743 | 22035   (3)| 00:00:57 |                           
|*  9 |          TABLE ACCESS FULL                   | DM_BILL_LOC               |     2 |    16 |     3   (0)| 00:00:01 |                           
|* 10 |          TABLE ACCESS BY INDEX ROWID         | FACT_VISIT       |     5 |   130 |    12   (0)| 00:00:01 |                           
|  11 |           NESTED LOOPS                       |                           |  3453 |   252K| 22031   (3)| 00:00:57 |                           
|  12 |            NESTED LOOPS                      |                           |   661 | 32389 | 15399   (4)| 00:00:40 |                           
|  13 |             NESTED LOOPS                     |                           |   585 | 22230 | 13079   (5)| 00:00:34 |                           
|* 14 |              TABLE ACCESS FULL               | DM_DT_QRY                 |    30 |   450 |    12   (9)| 00:00:01 |                           
|  15 |              TABLE ACCESS BY INDEX ROWID     | DM_ACCT                   |    19 |   437 | 13079   (5)| 00:00:34 |                           
|  16 |               BITMAP CONVERSION TO ROWIDS    |                           |       |       |            |          |                           
|  17 |                BITMAP AND                    |                           |       |       |            |          |                           
|  18 |                 BITMAP CONVERSION FROM ROWIDS|                           |       |       |            |          |                           
|* 19 |                  INDEX RANGE SCAN            | DMACCT_DSCH_DT            |  2098 |       |     7   (0)| 00:00:01 |                           
|  20 |                 BITMAP CONVERSION FROM ROWIDS|                           |       |       |            |          |                           
|* 21 |                  INDEX RANGE SCAN            | XSI_DMACCT01_CURRPATTYPCD |  2098 |       |   421   (5)| 00:00:02 |                           
|* 22 |             TABLE ACCESS BY INDEX ROWID      | DM_RSP_PTY                |     1 |    11 |     4   (0)| 00:00:01 |                           
|* 23 |              INDEX RANGE SCAN                | XSI_DMRSPPTY_PERS         |     1 |       |     3   (0)| 00:00:01 |                           
|* 24 |            INDEX RANGE SCAN                  | FV_CNRPERSON_FK    |    13 |       |     2   (0)| 00:00:01 |                           
|* 25 |         TABLE ACCESS FULL                    | DM_ORG_UNIT_DIV           |   170 |  2550 |     5   (0)| 00:00:01 |                           
|* 26 |        TABLE ACCESS FULL                     | DM_ORG_UNIT_GRP           |    57 |   912 |     3   (0)| 00:00:01 |                           
|* 27 |       TABLE ACCESS BY INDEX ROWID            | DM_DT_QRY                 |     1 |    14 |     1   (0)| 00:00:01 |                           
|* 28 |        INDEX UNIQUE SCAN                     | DM_DT2_QRY_UK             |     1 |       |     0   (0)|          |                           
|  29 |      TABLE ACCESS BY INDEX ROWID             | DM_DRG_SVC_LN             |     1 |    25 |     1   (0)| 00:00:01 |                           
|* 30 |       INDEX UNIQUE SCAN                      | DM_DRG_SVC_LN_PK          |     1 |       |     0   (0)|          |                           
|  31 |     TABLE ACCESS BY INDEX ROWID              | DM_FAC                    |     1 |    21 |     1   (0)| 00:00:01 |                           
|* 32 |      INDEX UNIQUE SCAN                       | DM_FAC_UK                 |     1 |       |     0   (0)|          |                           
Predicate Information (identified by operation id):                                                                                                  
   2 - filter((TO_DATE(:SYS_B_16,:SYS_B_17)<=TO_DATE(:SYS_B_18,:SYS_B_19) AND :SYS_B_00=:SYS_B_07))                                                  
   6 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_GRP_SK"="DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_SK")                                                               
   7 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_DIV_SK"="FACT_VISIT"."ORG_UNIT_DIV_SK")                                                           
   8 - access("FACT_VISIT"."BILL_LOC_SK"="DM_BILL_LOC"."BILL_LOC_SK")                                                                       
   9 - filter(("DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_14 OR "DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_15))                                                    
  10 - filter("FACT_VISIT"."DEL_IND"=:SYS_B_01)                                                                                             
  14 - filter(("DM_DT__DSCH"."MTH_NBR"=:SYS_B_12 AND "DM_DT__DSCH"."YR_NBR"=:SYS_B_11))                                                      
  19 - access("DM_ACCT"."DSCH_DT"="DM_DT__DSCH"."DT")                                                                                            
  21 - access("DM_ACCT"."CURR_PAT_TYPE_CD"=:SYS_B_10)                                                                                                
  22 - filter("DM_RSP_PTY"."CNR_PERS_ID_CURR" IS NOT NULL)                                                                                           
  23 - access("DM_RSP_PTY"."ACCT_SK"="DM_ACCT"."ACCT_SK" AND "DM_RSP_PTY"."RSP_PTY_TYPE_CD"=:SYS_B_02)                                               
  24 - access("DM_RSP_PTY"."CNR_PERS_ID_CURR"="FACT_VISIT"."CNR_PERS_ID_CURR")                                                              
  25 - filter(("DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_08 OR "DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_09))                                        
  26 - filter(("DM_ORG_UNIT_GRP"."ARCHIVE_IND"=:SYS_B_00 AND INTERNAL_FUNCTION("DM_ORG_UNIT_GRP"."EIS_LVL_1") AND                                    
              TO_NUMBER("DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_NBR")<>:SYS_B_13))                                                                           
  27 - filter(("DM_DT_VISITSVC"."DT">=TO_DATE(:SYS_B_16,:SYS_B_17) AND                                                                               
              "DM_DT_VISITSVC"."DT"<=TO_DATE(:SYS_B_18,:SYS_B_19)))                                                                                  
  28 - access("DM_DT_VISITSVC"."DT2_SK"="FACT_VISIT"."SVC_DT2_SK")                                                                          
  30 - access("DM_ACCT"."DRG_SVC_LN_SK"="DM_DRG_SVC_LN"."DRG_SVC_LN_SK")                                                                             
  32 - access("DM_ACCT"."FAC_CD"="DM_FAC"."FAC_CD")                                                                                                  
   

Similar Messages

  • SQL query can be executed through TOAD but not through Discoverer

    Hallo, everybody:
    Got another problem. A SQL query can be executed through TOAD, but when I want to execute it by a worksheet of Discoverer Plus, it always shows there is no data.
    PS: I copied this query from Discoverer Plus to TOAD, which means, this query is generated through the Discoverer. Does anybody know about how could it be?
    Thank you.
    Geng

    Hi,
    If you are able to get data in TOAD with the same user credential as that of Discoverer Plus then it will implies an issue with Discoverer.
    Else it is privilege issue , your TOAD user has select privilege to the base objects (tables/views etc) where as your Disoverer used does not.
    Compare the privileges granted to these 2 users and you can narrow done to the issue .
    Thanks,
    Sutirtha

  • ITunes downloads fast on old Mac mini but slow on brand new Macbook Pro on the same WiFi network?

    Hi all,
    I have an old Mac mini that's from around 2008 and runs on Snow Leopard. I also have a brand new Macbook Pro with retina display that's running Mountain Lion. Both running iTunes 10.6.3.
    I never noticed anything wrong with my MBP's connection speed until last night when I downloaded a free TV episode from iTunes. The download speed varied between 20KB/s and 40KB/s and it took me 7 to 8 hours to download a single episode. I checked my internet connection but there was nothing wrong with it, SpeedTest.net told me I had a download speed of 94MB/s and upload speed of 80MB/s, it was only iTunes that was unbearably slow.
    Today I was browsing iTunes again and was planning to buy some movies, but again it took forever for the trailers to download. So I fired up my Mac mini just to see if it would be just as slow. Turned out my Mac mini could download the same trailers from iTunes at a much higher speed than my MBP (around 3MB/s on the ones I tested).
    So what gives? They are on the same Wifi network provided by an Airport Extreme, and although my iPhone and iPad are also connected to it, no one else is doing any heavy duty downloading.
    Thanks in advance!
    Keywords: iTunes download speed, slow iTunes downloads, different connection speeds on different Macs, slow iTunes connection, iTunes takes a long time to download

    It's possible the DNS setting your ISP is using are interfering. Although your PC works OK Macs can be sensitive to DNS settings. Here is a MacWorld DNS Troubleshooting article that explains the issue and below is how to fix it.
    1. System preferences
    2. Network
    3. Click Advanced
    4. Click DNS tab
    5. Click + sign
    6. Add 208.67.222.222
    7. Click + sign
    8. Add 208.67.220.220
    9. Click OK.
    10. Exit System Preferences
    11. Try out your MBP and report what happened.
    Roger

  • Query using Union All and CTEs is slow

    TypePatient
    [ednum] int NOT NULL,  PK
    [BackgroundID] int NOT NULL, FK
    [Patient_No] varchar(50) NULL, FK
    [Last_Name] varchar(30) NULL,
    [First_Name] varchar(30) NULL,
    [ADateTime] datetime NULL,
    Treat
    [ID] int NOT NULL, PK
    [Ednum] numeric(10, 0) NOT NULL, FK
    [Doctor] char(50) NULL,
    [Dr_ID] numeric(10, 0) NULL,
    background
    [ID] int NOT NULL, PK
    [Patient_No] varchar(50) NULL, FK
    [Last_Name] char(30) NULL,
    [First_Name] char(30) NULL,
    [DateofBirth] datetime NULL,
    pdiagnose
    [ID] int NOT NULL, PK
    [Ednum] int NOT NULL, FK
    [DSMNo] char(10) NULL,
    [DSMNoIndex] char(5) NULL,
    substance
    [ID] int NOT NULL, PK
    [Ednum] int NOT NULL, FK
    [Substance] varchar(120) NULL,
    DXCAT
    [id] int NULL, PK
    [dx_description] char(100) NULL,
    [dx_code] char(10) NULL,
    [dx_category_description] char(100) NULL,
    [diagnosis_category_code] char(10) NULL)
    Substance
    ID
    Ednum
    Substance
    1
    100
    Alcohol Dependence
    4
    200
    Caffeine Dependence
    5
    210
    Cigarettes
    dxcat
    id
    dx_description
    dx_code
    dx_category_description
    diagnosis_category_code
    10
    Tipsy
    zzz
    Alcohol
    SA
    20
    Mellow
    ppp
    Mary Jane
    SA
    30
    Spacey
    fff
    LSD
    SA
    50
    Smoker
    ggg
    Nicotine
    SA
    pdiagnose
    ID
    Ednum
    DSMNo
    Diagnosis
    1
    100
    zzz
    Alcohol
    2
    100
    ddd
    Caffeine
    3
    210
    ggg
    Smoker
    4
    130
    ppp
    Mary Jane
    TypePatient
    ednum
    Patient_No
    Last_Name
    First_Name
    ADateTime
    100
    sssstttt
    Wolly
    Polly
    12/4/2013
    130
    rrrrqqqq
    Jolly
    Molly
    12/8/2013
    200
    bbbbcccc
    Wop
    Doo
    12/12/2013
    210
    vvvvwww
    Jazz
    Razz
    12/14/2013
    Treat
    ID
    Ednum
    Doctor
    Dr_ID
    2500
    100
    Welby, Marcus
    1000
    2550
    200
    Welby, Marcus
    1000
    3000
    210
    Welby, Marcus
    1000
    3050
    130
    Welby, Marcus
    1000
    background
    ID
    Patient_No
    Last_Name
    First_Name
    DateofBirth
    2
    sssstttt
    Wolly
    Polly
    8/6/1974
    3
    rrrrqqqq
    Jolly
    Molly
    3/10/1987
    5
    bbbbcccc
    Wop
    Doo
    8/12/1957
    6
    vvvvwww
    Jazz
    Razz
    7/16/1995
    Desired output:
    Staff ID
    Doctor
    Patient_No
    Client Name
    Date of Service
    Ednum
    DX Code
    DX Cat
    DX Desc
    Substance
    1000
    Welby, Marcus
    bbbcccc
    Wop, Doo
    12/12/2013
    200
    Caffeine Dependence
    1000
    Welby, Marcus
    rrrqqq
    Jolly, Molly
    12/8/2013
    130
    ppp
    SA
    Mary Jane
    1000
    Welby, Marcus
    sssttt
    Wolly, Polly
    12/4/2013
    100
    zzz
    SA
    Alcohol
    1000
    Welby, Marcus
    sssttt
    Wolly, Polly
    12/4/2013
    100
    ddd
    SA
    LSD
    1000
    Welby, Marcus
    sssttt
    Wolly, Polly
    12/4/2013
    100
    Alcohol Dependence
    1000
    Welby, Marcus
    vvvvwww
    Jazz, Razz
    12/14/2013
    210
    ggg
    SA
    Smoker
    1000
    Welby, Marcus
    vvvvwww
    Jazz, Razz
    12/14/2013
    210
    Cigarettes
    A patient is assigned an ednum. There are two different menus for staff to enter
    diagnoses. Each menu stores the entries in a different table. The two tables are substance and pdiagnose. A patient’s diagnosis for a substance abuse can be entered in one table and not the other. 
    The number of entries for different substances for each patient can vary between the two tables. John Doe might be entered for alcohol and caffeine abuse in the pdiagnosis table and entered only for caffeine abuse in the substance table. They are only
    linked by the ednum which has nothing to do with the diagnosis/substance. The substance entered in one table is not linked to the substance entered in the other. A query will not put an entry for alcohol from the pdiagnosis table on the same row as an alcohol
    entry from the substance table except by chance. That is the reason for the way the query is written.
    The query accepts parameters for a Dr ID and a start and end date. It takes about 7 to 15 seconds to run. Hard coding the dates cuts it down to about a second.
    I might be able to select directly from the union all query instead of having it separate. But then I’m not sure about the order by clauses using aliases.
    Is there a way to rewrite the query to speed it up?
    I did not design the tables or come up with the process of entering diagnoses. It can’t be changed at this time.
    Please let me know if you notice any inconsistencies between the DDLs, data, and output. I did a lot of editing.
    Thanks for any suggestions.
    with cte_dxcat (Dr_ID, Doctor, Patient_No,Last_Name,
    First_Name, Adatetime,Ednum,
    dx_code,diagnosis_category_code,dx_description,substance,
    DateofBirth) as
    (Select distinct t.Dr_ID, t.Doctor, TP.Patient_No,TP.Last_Name,
    TP.First_Name, TP.Adatetime as 'Date of Service',TP.Ednum,
    DXCAT.dx_code,DXCAT.diagnosis_category_code,DXCAT.dx_description,
    null as 'substance',BG.DateofBirth
    From TypePatient TP
    inner join treat t on TP.ednum = t.Ednum
    inner join background BG on BG.Patient_No = TP.Patient_No
    inner join pdiagnose PD on TP.Ednum = PD.Ednum
    inner join Live_Knowledge.dbo.VA_DX_CAT_MAPPING DXCAT on DXCAT.dx_code = PD.DSMNo
    Where (TP.Adatetime >= convert(varchar(10), :ST, 121)+ ' 00:00:00.000'
    and TP.Adatetime <= convert(varchar(10), :SP, 121)+ ' 23:59:59.000')
    and DXCAT.diagnosis_category_code = 'SA'
    and t.Dr_ID =:DBLookupComboBox2
    cte_substance (Dr_ID, Doctor, Patient_No,Last_Name,
    First_Name,Adatetime, Ednum,
    dx_code,diagnosis_category_code,dx_description,Substance,DateofBirth) as
    (Select distinct t.Dr_ID, t.Doctor, TP.Patient_No,TP.Last_Name,
    TP.First_Name, TP.Adatetime as 'Date of Service', TP.Ednum,
    null as 'dx_code',null as 'diagnosis_category_code',null as 'dx_description',s.Substance, BG.DateofBirth
    From TypePatient TP
    inner join treat t on TP.ednum = t.Ednum
    inner join background BG on BG.Patient_No = TP.Patient_No
    inner join pdiagnose PD on TP.Ednum = PD.Ednum
    inner join substance s on TP.Ednum = s.Ednum
    Where (TP.Adatetime >= convert(varchar(10), '12/1/2013', 121)+ ' 00:00:00.000'
    and TP.Adatetime <= convert(varchar(10), '12/31/2013', 121)+ ' 23:59:59.000')
    and t.Dr_ID =:DBLookupComboBox2
    cte_all (Dr_ID, Doctor, Patient_No,Last_Name,
    First_Name,Adatetime, Ednum,
    dx_code,diagnosis_category_code,dx_description,Substance,DateofBirth) as
    (select cte_dxcat.Dr_ID as 'Staff ID', cte_dxcat.Doctor as 'Doctor',
    cte_dxcat.Patient_No as 'Patient_No',
    cte_dxcat.Last_Name as 'Last',cte_dxcat.First_Name as 'First',
    cte_dxcat.Adatetime as 'Date of Service',cte_dxcat.Ednum as 'Ednum',
    cte_dxcat.dx_code as 'DX Code',cte_dxcat.diagnosis_category_code as 'DX Category Code',
    cte_dxcat.dx_description as 'DX Description',
    cte_dxcat.substance as 'Substance',cte_dxcat.DateofBirth as 'DOB'
    from cte_dxcat
    union all
    select cte_substance.Dr_ID as 'Staff ID', cte_substance.Doctor as 'Doctor',
    cte_substance.Patient_No as 'Patient_No',
    cte_substance.Last_Name as 'Last',cte_substance.First_Name as 'First',
    cte_substance.Adatetime as 'Date of Service',cte_substance.Ednum as 'Ednum',
    cte_substance.dx_code as 'DX Code',cte_substance.diagnosis_category_code as 'DX Category Code',
    cte_substance.dx_description as 'DX Description',
    cte_substance.substance as 'Substance',cte_substance.DateofBirth as 'DOB'
    from cte_substance)
    select cte_all.Dr_ID as 'Staff ID', cte_all.Doctor as 'Doctor',
    cte_all.Patient_No as 'Patient_No',
    (cte_all.Last_Name + ', '+ cte_all.First_Name) as 'Client Name',
    cte_all.Adatetime as 'Date of Service',cte_all.Ednum as 'Ednum',
    cte_all.dx_code as 'DX Code',cte_all.diagnosis_category_code as 'DX Category Code',
    cte_all.dx_description as 'DX Description',
    cte_all.substance as 'Substance',
    CONVERT(char(10), cte_all.DateofBirth,101) as 'DOB'
    from cte_all
    order by cte_all.Patient_No,cte_all.Adatetime

    Please post real DDL instead of your invented non-language, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions
    and formatting rules. Your rude, non-SQL narrative is so far away from standards I cannot even use you as a bad example in book. 
    Temporal data should use ISO-8601 formats (we have to re-type the dialect you used!). Code should be in Standard SQL as much as possible and not local dialecT. 
    This is minimal polite behavior on SQL forums. You posted a total mess! Do you really have patients without names?? You really use a zero to fifty characters for a patient_nbr??? Give me an example. That is insane! 
    Your disaster has more NULLs than entire major corporate systems. Since you cannot change it, can you quit? I am serious. I have been employed in IT since 1965, and can see a meltdown.
    I looked at this and I am  not even going to try to help you; it is not worth it. I am sorry for you; you are in an environment where you cannot learn to do any right. 
    But you are still responsible for the rudeness of not posting DDL. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Oracle SQL Developer O/P and Toad O/P is Different for Same QUERY.

    Hi,
    can any one calrify me why i'm getting different result when i run the same QUERY in Oracle Developer and TOAD.
    When i Ran a Query in TOAD i could see Null&Data in a column called Customer_Category but when i Ran the same Query in Oracle SQL Developer i'm getting all Null N i couldnt see any data in the column.
    i have not performed any DDL r DML statement, just i got the Query and i Ran it in TOAD & Oracle SQL Developer.
    I found that the OUT PUT is different for perticular column.
    Thanks in Advance....

    > I found that the OUT PUT is different for perticular column.
    The RENDERING of data from Oracle (or any other server such as a POP3 server, web server, etc) IS DONE BY THE CLIENT.
    So to repeat - RENDERING IS DONE BY THE CLIENT.
    If one client selects to display the output received from the server differently than another client, it is a CLIENT ISSUE.
    It is not a server issue. It is not a SQL issue. It is not a PL/SQL issue.
    In other words, wrong forum for this question. You have a pure client side rendering problem which has absolutely nothing to do with SQL and/or PL/SQL.

  • Case Working in "TOAD" but not Working in "WHERE" clause

    Hi Friends,
    When I am using case in the where clause of SQL query in Oracle Reports 3.0.5, than it is giving me "Error - Rep - 0946 Unable to Parse Query"
    But when I am running the same query in TOAD it is working fine.
    select *from inv_stores, inv_product, inv_location
    where  (inv_stores.location_code in ('12', '13', '16', '17', '18') and
                inv_stores.location_code = inv_location.location_code and
                inv_stores.department_code = inv_product.department_code and
                inv_stores.product_code = inv_product.product_code and
                nvl(delete_flag, 'N') <> 'Y' and
                inv_product.department_code = '11' and
                       (((CASE WHEN nvl(inv_product.sale_price3jd,0) = 0 THEN 0  ELSE (nvl(inv_product.sale_price3jd,0) - nvl(inv_product.cost_pricejd,0)) /
                       nvl(inv_product.sale_price3jd,0) END) *  100 ) <= 100))
    order by inv_product.department_code, inv_product.product_codePlease Help me.......
    Thanks in Advance

    Hello,
    When you create a SQL query in Reports, Reports will parse the SQL query in order to create the "data model".
    Reports 3.0.5 is quite old, so, you can use only the SQL "supported" by the RSF included in Reports 3.0.5.
    When you use TOAD , the sql query is not parsed by TOAD but by the DB just like with sqlplus or SQL Developer.
    Regards

  • Remote connection to a database using TOAD, but without Oracle db on PC

    I want to connect to a remote database using TOAD from my PC but without having to install Oracle database on my PC.
    Is it possible?
    If yes, where do I enter the database IP address & port number?
    I am using TOAD Freeware version 8.5.0.50g
    (I want to achieve the exact thing with TOAD as it can be done with "OraCmd" program.)

    How did you create your tns entry? Manually or via netca?
    If netca is not used, I would recommend to delete the old tns entry from tnsnames.ora file manually and add the same entry back via netca utility.
    PartA.
    1) Make sure listener is up (for example on the server 192.168.0.33 you are trying to connect) before you start netca. Most probably it is on 1521 port unless you changed it.
    Assuming your server on *NIX:
    $ ps -ef |grep lsnr
    the above command will give you all the listeners which are up and running.
    If listener is not up, bring it up.
    $ lsnrctl start listener
    the above command will start listener called "LISTENER" on default port 1521. Ignore this if the listener is already up.
    PartB
    Assuming your client machine is on Windows,
    1) start --> run --> cmd --> netca
    2) You will see "Oracle Net Configuaration Assistant: Welcome" window. --> next
    3) Pick the 3rd radio button "Local Net Service Name Configuartion" --> next
    4) Pick the "ADD" button. --> next
    5) Provide the service name. (It is usually database name). Assuming my database name is FCMAT, I will give FCMAT --> next
    6) Pick "TCP" --> next
    6) Instead of the hostname, add the ip address of the host (for example 192.168.0.33 and
    "Use the standard port of 1521"--> next
    7) "Yes, perform a test" (this is why you have to have the listener up to test it) -->next
    8) It will fail as it doesn't have any password. Click on "Change Login" and provide the SYSTEM password and click "OK". If listener is up on the server and password is right and there are no connectivity issues going on, test will SUCCEED. --> next
    9) Here you will provide Net Service Name. You can give whatever you like to give here but usually giving instance name will help. AGain, I will give FCMAT. -->
    10) Click "NO" to configure another net service name. --> next
    11) click "Finish"
    The above steps will create a tnsnames.ora entry similar to this.
    FCMAT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.33)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = fcmat)
    Part3
    1) start your sqlplus utility
    2) provide username system
    3) provide password
    4) provide FCMAT in host string.
    and you should be able to connect via sqlplus and TOAD.
    If you are still getting the error, please provide us the exact error.
    --Moid M
    P.S. tnsnames.ora / listener.ora / sqlnet.ora can be found $ORACLE_HOME/network/admin directory.

  • Very Slow SQL query - Fast in SSMS

    We have a very simple query that executes instantly in SSMS, returning about 45,000 rows.  Whenever I run the same query on a CFM page it takes about 47 seconds to execute.
    I've tried reindexing, turning it into a stored procedure, etc.. but nothing seems to help.   My other queries are also running a little slower, but not nearly as noticeable because they are smaller queries.
    I have an additional CF10 server that seems to run the query perfectly fine on a test page.
    The query is pretty much this:
    Select X,Y,Z
    FROM TABLE
    WHERE BLAH BLAH BLAH
    Can someone offer me some advice on what can cause this or how to find the issue?
    Thanks!

    Just an update.  It ended up being "something" to do with the CF machine, although still not sure what exactly.
    Ended up solving the issue by installing CF on identical hardware and patching to the same windows and CF versions.   The site is now running like a champ and loading pages in less than 1 second.
    Steve, I have a dynamic filter that I run a query of query on the 45k rows to generate.  Once the first option is selected, it takes the distinct rows from the original query were x = selection and there can be 10-12 sub options to narrow down inside of that data.  It seems to load much faster this way than by returning to SQL server each time a response is selected.
    Thanks for your suggestions.  Hopefully we don't have the issue again... whatever it was.

  • Query can run in Oracle 10g but very slow in 11g

    Hi,
    We've just migrated to Oracle 11g and we noticed that some of our view are very slow (it takes seconds in 10g and takes 30 minutes in 11g), and the tables are using the local table.
    Do any of you face the same issue?
    This is our query:
    SELECT
    A.wellbore
    ,a.depth center
    ,d.MD maxbc
    ,d.XDELT xbc
    ,d.YDELT ybc
    ,e.MD minac
    ,e.XDELT xac
    ,e.YDELT yac
    from
    table_A d,table_A e, table_B a
    where a.wellbore = d.WELLBORE (+)
    and a.wellbore = e.WELLBORE(+)
    and d.MD = (select max(MD) from table_A b where b.MD < a.depth and
    d.wellBORE = b.wellBORE)
    and e.md = (select min(md) from table_A c where c.MD > a.depth and
    e.wellBORE = c.wellBORE);

    Thanks I will move to the correct one..
    Rafi,
    Build the Indexes and it is still slow. I am querying from a view from another database, which is in 10g instances.
    Moved: Query can run in Oracle 10g but very slow in 11g
    Edited by: 924400 on Apr 1, 2012 6:03 PM
    Edited by: 924400 on Apr 1, 2012 6:26 PM

  • Query working fine in toad but not in forms 6i

    i have following coding on when button press triger
    declare
    CURSOR C1(year number,month number) IS
    SELECT ITM_NO,ITM_NAME,XAQ QTY,XAQ*TP VAL,gp
    FROM
    select ci.itm_no ITM_NO,ci.itm_name ITM_NAME ,cpg.group_id gp ,xaq ,ALLIED.CORP_PRIC_TP( ci.itm_no)TP from
    select prod_no,sum(xaq)*1 xaq
    from
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_01_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_02_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_03_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_04_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    group by prod_no
    ) A,allied.corp_inv ci,allied.corp_01_01 c01, allied.corp_01_02 c02,allied.corp_prod_group cpg,allied.v_prod_grp vpg
    where ci.itm_no=a.prod_no
    and ci.itm_no=c02.itm_no
    and c01.grp_id=c02.grp_id
    and c01.grp_id in(55,56,57,58,59)
    and vpg.prod_no =ci.itm_no
    and vpg.group_id=cpg.group_id
    where XAQ <>0;
    Begin
         delete from fiaz.tmp_topten_prod;
         for i in c1(:year,:month)
    loop
              insert into fiaz.tmp_topten_prod
              values(i.itm_no,i.itm_name,i.qty,i.val,i.gp,0);
         end loop;      
    standard.commit;
    message('inserted in temp');
         exception when others then
              message (dbms_error_text);
              message (dbms_error_text);
    End;
    Same Query (as used in cursor c1) works fine in toad but giving wrong result from forms... and the problem is xaq field i.e returns incorrect qty...
    i guess union clause is not working in this situation...
    plz suggest me the appropriate changes in the query to work well from form as well...
    combination:Forms 6i,Oracle 8.0.6
    Regards,
    Usman Afzal

    As per your suggestion i have created a stored procedure but the followin error prevents procedure creation
    create or replace procedure fiaz.topten_prod(v_yr number,v_mn number) is
    begin
    delete from fiaz.tmp_topten_prod;
    insert into fiaz.tmp_topten_prod(itm_no,itm_name,qty,val,grp_id,prority)
    SELECT ITM_NO,ITM_NAME,XAQ QTY,XAQ*TP VAL,gp,0
    FROM
    select ci.itm_no ITM_NO,ci.itm_name ITM_NAME ,cpg.group_id gp ,xaq ,ALLIED.CORP_PRIC_TP( ci.itm_no)TP from
    select prod_no,sum(xaq) xaq
    from
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq from allied.mrk_01_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_02_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_03_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_04_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    group by prod_no
    ) A,allied.corp_inv ci,allied.corp_01_01 c01, allied.corp_01_02 c02,allied.corp_prod_group cpg,allied.v_prod_grp vpg
    where ci.itm_no=a.prod_no
    and ci.itm_no=c02.itm_no
    and c01.grp_id=c02.grp_id
    and c01.grp_id in(55,56,57,58,59)
    and vpg.prod_no =ci.itm_no
    and vpg.group_id=cpg.group_id
    where XAQ <>0;
    commit;
    end;
    Error:
    "PLS-00201: identifier ALLIED.MRK_01_02 must be declared "
    i have not changed any thing in query working fine in toad without create procedure text and if i describe this table it shows the structure (desc allied.mrk_01_02)
    Now where is the problemmmmm
    Plz Help

  • Connection ... able to connect using sql developer, but not sqlplus or toad too

    Hi folks, having this issue, with only one of my so many databases, what might be the reason and how to fix/correct this, please assist.
    Able to connect using sql developer, but not sqlplus or toad too; sqlplus error: ORA-12154: TNS:could not resolve the connect identifier specified
    thanks in advance.

    SQLDEVELOPER works since it use JDBC Thin & does not use tnsnames.ora
    ORA-12154 ALWAYS only occurs on SQL Client & no SQL*Net packets ever leave client system
    ORA-12154 [B]NEVER[/B] involves the listener, the database itself or anything on the DB Server.
    ORA-12154 occurs when client requests a connection to some DB server system using some connection string.
    TNS-03505 is thrown by tnsping & is same error as ORA-12154 thrown by sqlplus or others.
    The lookup operation fails because the name provided can [B]NOT[/B] be resolved to any remote DB.
    The analogous operation would be when you wanted to call somebody, but could not find their name in any phonebook.
    The most frequent cause for the ORA-12154  error is when the connection alias can not be found in tnsnames.ora.
    The lookup operation of the alias can be impacted by the contents of the sqlnet.ora file; specifically DOMAIN entry.
    TROUBLESHOOTING GUIDE: ORA-12154 & TNS-12154 TNS:could not resolve service name [ID 114085.1]
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/

  • Query runs in TOAD but hangs in Reports

    How does one begin to diagnose where a query run in Reports is hanging? The query runs in TOAD but never finishes when run within the report. Strange thing is that the query/report ran (unchanged from this month) for prior months.
    Is there a "run-time visual debugger" for reports?

    Each query, including the 5th, runs to completion when run separately. It appears to be the addition of the 5th query which causes the problem.
    NEWS FLASH: The report ran to completion over the weekend (almost totally idle server). However, it took over 90 minutes to finish.
    Immediately after optimizing the queries and indicies, the report has been known to complete in 3 minutes. Over time, this has crept back up to 20 minutes.
    The DBAs think a change in DBMS optimization might have caused this particular query to exceed a threshhold. They're looking at reversing this change to see the affect on the query.

  • I have updated my iphone 4 to ios 7 but it is not as fast as ios6 and it hangs a lot what should i do?

    i have updated my iphone 4 to ios 7 but it is not as fast as ios6 and it hangs a lot what should i do?

    http://osxdaily.com/2013/09/23/ios-7-slow-speed-it-up/
    also settings - general - reset - reset network settings --- no data loss doing this.

  • I tried PES2012 "Pro evolution 2012" which i liked but slow, thinking if i buy the full version it could be faster, but got to know it's still slow, please need back the money

    I tried PES2012 "Pro evolution 2012" which i liked but slow, thinking if i buy the full version it could be faster, but after bought the game got to know it's still slow, the acceleration is still locked and slow, my complain is that it's slow, Fifa 12 also is slow, i like Fifa 11 because it's fast,  please need back the money
    Message was edited by: Jaygod
    Message was edited by: Jaygod

    There are no refunds

  • My 1st Generation time capsule won't connect to the internet thru a new motorola sb6121 - get continuously flashing yellow light. Using a router in between the modem and capsule yields good but slower connection to internet. Any thoughts?

    My 1st Generation time capsule won't connect to the internet thru a new motorola sb6121 - get continuously flashing yellow light. Using a router in between the modem and capsule yields good but slower connection to internet. Any thoughts?

    Thanks for your response
    Let me give the history - I started with an Apple Express being fed thru a D-Link  EBTR 2310 cable Router from an RCA DCM315 Modem (Pure). Comcast service all the way.
    Got the 1st generation TC in 2008 and merely replaced the Airport Express with the TC. Worked ok
    A year or two ago I did try removing the modem and feeding the TC directly from the modem. Resulted in the same condition I have now - Continuous flashing amber on the TC. So I put the router back in the chain.
    Some time later, at the recommendation of a Comcast rep, I replaced the router with (a Belkin F5D 5231) to see if speed and dropout problems would be improved. I thought it helped some at the time but now I am not so sure.
    Last week I decided to see if a new modem would help with download speeds. So I got another pure cable modem (Motorola SB 6121- high on the Comcast recommended list).
    Got up and running easily with Comcast help and with the modem connected directly to a computer.
    Next I put the TC in the link and again could not get past the TC continuing to flash amber. Although I did get connected to the internet with this configuration I lost connection two both of my printers - one connected by USB and the other wirelessly to the TC. Again everything works fine when I put the Belkin router back in the system.
    However with the router in there, the modem shows the downstream connection to be 10/100 ethernet speed. (Modem light changes color for indicating speeds.}
    I have gone thru all of the combinations of powering down/ up, but all stays the same.
    I can live with what I have but something still doesn’t seem right.
    Thanks again

Maybe you are looking for

  • HT1473 New laptop

    Hey guys and gals, I just got a new laptop and I am trying to sync the music from my ipod onto itunes, but it wont allow me to unless I delete all of the content first... Help, please?

  • Any example for ENQUEUE_ARRAY for JMS compatible messages?

    Is there any examples of using ENQUEUE_ARRAY with messages that are compatible with JMS? either a VARRAY or NESTED TABLE of JMS content? I have an after insert trigger that propagates to JMS and in the for each row loop I'd much rather enqueue as a b

  • Replace EDI_DC40_U with EDI_DC40

    On the Header record of my output file, I would like to change EDI_DC40_U to EDI_DC40. Does anyone have any suggestions whether it would be easier to change and update this field in R3 using a User Exit, or XI using File Content Conversion. ... and h

  • Grayscale with One Purple (for instance)

    I have a group shot photo of my brother running in a large group of people in a marathon. I would like to make the picture grayscale, but I would like my brother to be in color. He is wearing a purple shirt, white male, brown hair... Is this effect p

  • Problem while using WS_DELIVERY_UPDATE_2

    Hi All I am using WS_DELIVERY_UPDATE_2 to update delivery qty and pick quantity. but there is no result, and no error. did i miss anything? call function 'WS_DELIVERY_UPDATE_2' exporting    vbkok_wa                = wa_vbkok    delivery