RULE hint and 11g
Oracle Standard Edition 11.1.0.7.0
We all know that the RULE hint is not longer supported, so in that case why would Oracle themselves want to use it ?
select parsing_schema_id,sql_Text from v$sqlarea where upper(sql_text) like '%+ RULE%' or upper(sql_text) like '%+RULE%'
I get 7 rows back from my 11gR1 database (and many more from 10gR2)
Basically, we have a bunch of issues with parsing SQL in a 10gR2 environment, upgrading from 9iR2, setting optimizer_features_enable down at lower releases, as far as the minimum 8.0.3, does provide quicker parses with still acceptable plans, but RULE hint gives the best parse, so wondering about the support situation if we deplot it tactically. Oracle can hardly object if the RDBMS itself uses the hint, surely ?
It was already in version 10g that the OPTIMIZER_MODE=RULE was desupported.
"Desupported" does not mean it is no longer technically possible to use RULE nor does it mean that we do not use it anymore internally. It just means that it is no longer supported that you use this optimizer mode.
In other words: Almost no testing was done with OPTIMIZER_MODE=RULE, and if you turn it on and you get any problems, our support will not be responsible to help you because of that setting.
If on the other hand it turns out that for troubleshooting purpose it is necessary to go with that mode for certain statements (because our support came to that conclusion), it will be possible to use it of course without you losing further support.
Kind regards
Uwe
http://uhesse.wordpress.com
Similar Messages
-
Hi ..
We have an application having 40+ SQL's using RULE Hint. (11g R2).
Now we have a plan to upgrade to 12c and we want to come out of these RULE Hints.
Anyone faced similar kind of issue? what are do's and don't do's to remove RULE Hint. Please advise.
Thank you!
Regards
Siva
Edited by: 985936 on Feb 4, 2013 3:33 AMIt looks like the /*+ RULE */ hint can still have an impact in 11.2.0.3:
07:23:12 SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Solaris: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
5 rows selected.
Elapsed: 00:00:00.04
07:23:20 SQL> create table test_rule_optimizer as select * from dba_objects;
Table created.
Elapsed: 00:00:03.04
07:23:23 SQL> create index TEST_RULE_OPTIMIZER_IDX on TEST_RULE_OPTIMIZER(object_type, owner, object_name);
Index created.
Elapsed: 00:00:01.32
07:23:24 SQL>
07:23:24 SQL> begin
07:23:25 2 dbms_stats.gather_table_stats(ownname => user, tabname => 'TEST_RULE_OPTIMIZER');
07:23:25 3 end;
07:23:25 4 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:03.91
07:23:29 SQL>
07:23:45 SQL> set autotrace on
07:23:45 SQL> --
07:23:45 SQL> -- Choosing these object types because they comprise over 50% of the objects in my table
07:23:45 SQL> select count(*), max(last_ddl_time)
07:23:45 2 from TEST_RULE_OPTIMIZER
07:23:45 3 where object_type in ('INDEX','SYNONYM','INDEX PARTITION','LOB PARTITION');
COUNT(*) MAX(LAST_DDL_TIME)
136189 2013/02/04 04:17:04
1 row selected.
Elapsed: 00:00:00.12
Execution Plan
Plan hash value: 166585403
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 19 | 1078 (2)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 19 | | |
|* 2 | TABLE ACCESS FULL| TEST_RULE_OPTIMIZER | 19721 | 365K| 1078 (2)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("OBJECT_TYPE"='INDEX' OR "OBJECT_TYPE"='INDEX PARTITION' OR
"OBJECT_TYPE"='LOB PARTITION' OR "OBJECT_TYPE"='SYNONYM')
Statistics
1 recursive calls
0 db block gets
3850 consistent gets
0 physical reads
0 redo size
275 bytes sent via SQL*Net to client
248 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
07:23:46 SQL>
07:23:46 SQL> select /*+ rule */ count(*), max(last_ddl_time)
07:23:46 2 from TEST_RULE_OPTIMIZER
07:23:46 3 where object_type in ('INDEX','SYNONYM','INDEX PARTITION','LOB PARTITION');
COUNT(*) MAX(LAST_DDL_TIME)
136189 2013/02/04 04:17:04
1 row selected.
Elapsed: 00:00:00.29
Execution Plan
Plan hash value: 316642056
| Id | Operation | Name |
| 0 | SELECT STATEMENT | |
| 1 | SORT AGGREGATE | |
| 2 | CONCATENATION | |
| 3 | TABLE ACCESS BY INDEX ROWID| TEST_RULE_OPTIMIZER |
|* 4 | INDEX RANGE SCAN | TEST_RULE_OPTIMIZER_IDX |
| 5 | TABLE ACCESS BY INDEX ROWID| TEST_RULE_OPTIMIZER |
|* 6 | INDEX RANGE SCAN | TEST_RULE_OPTIMIZER_IDX |
| 7 | TABLE ACCESS BY INDEX ROWID| TEST_RULE_OPTIMIZER |
|* 8 | INDEX RANGE SCAN | TEST_RULE_OPTIMIZER_IDX |
| 9 | TABLE ACCESS BY INDEX ROWID| TEST_RULE_OPTIMIZER |
|* 10 | INDEX RANGE SCAN | TEST_RULE_OPTIMIZER_IDX |
Predicate Information (identified by operation id):
4 - access("OBJECT_TYPE"='LOB PARTITION')
6 - access("OBJECT_TYPE"='INDEX PARTITION')
8 - access("OBJECT_TYPE"='SYNONYM')
10 - access("OBJECT_TYPE"='INDEX')
Note
- rule based optimizer used (consider using cbo)
Statistics
1 recursive calls
0 db block gets
37884 consistent gets
3 physical reads
0 redo size
276 bytes sent via SQL*Net to client
248 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
07:23:46 SQL>
07:23:47 SQL> -
Version Details
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
I have inherited this code in a package and was looking at the explain plan contains a Hint that is RULE , the database is 11.2 is it still valid, can anyone give me some advice on how to improve the below query?
| Id | Operation | Name |
| 0 | SELECT STATEMENT | |
| 1 | SORT AGGREGATE | |
|* 2 | INDEX RANGE SCAN | PARCEL_HISTORY_HOLDING_PF1 |
| 3 | NESTED LOOPS OUTER | |
| 4 | NESTED LOOPS OUTER | |
| 5 | NESTED LOOPS OUTER | |
|* 6 | FILTER | |
| 7 | NESTED LOOPS OUTER | |
| 8 | TABLE ACCESS BY INDEX ROWID| PARCEL_HISTORY_HOLDING |
| 9 | INDEX FULL SCAN | PARCEL_HISTORY_HOLDING_PF1 |
| 10 | TABLE ACCESS BY INDEX ROWID| PARCELS |
|* 11 | INDEX UNIQUE SCAN | PARCELS_PK |
| 12 | TABLE ACCESS BY INDEX ROWID | PARCEL_ADDRESSES |
|* 13 | INDEX UNIQUE SCAN | PARCEL_ADDRESSES_PK |
| 14 | TABLE ACCESS BY INDEX ROWID | PARCEL_ADDRESSES |
|* 15 | INDEX UNIQUE SCAN | PARCEL_ADDRESSES_PK |
|* 16 | INDEX UNIQUE SCAN | PARCEL_HISTORY_PIVOT_PK |
Predicate Information (identified by operation id):
2 - access("PH"."PARCEL_ID"=:B1)
6 - filter("P"."PARCEL_ID" IS NOT NULL)
11 - access("PHH"."PARCEL_ID"="P"."PARCEL_ID"(+))
13 - access("PAC"."PARCEL_ID"(+)="P"."PARCEL_ID" AND
"PAC"."ADDRESS_TYPE"(+)='COL')
15 - access("PAD"."PARCEL_ID"(+)="P"."PARCEL_ID" AND
"PAD"."ADDRESS_TYPE"(+)='DEL')
16 - access("PHH"."PARCEL_ID"="PP"."PARCEL_ID"(+))
Note
- rule based optimizer used (consider using cbo)
QUERY
SELECT /*+ rule */
phh.ROWID tabrow
,phh.parcel_id
,phh.scan_date
,phh.status_code
,phh.reason_code
,phh.app_code
,phh.scan_id
,phh.location_code
,phh.card_id
,phh.signature_captured
,phh.signature_reference
,phh.geo_latitude
,phh.geo_longitude
,phh.geo_date
,phh.geo_signal_strength
,phh.app_create_date
,phh.e2e_create_date
,phh.driver_comments
,p.client_account
,p.client_contract
,p.courier_type
,p.service_code
,p.col_depot
,p.col_tour
,p.del_depot
,p.del_tour
,p.traffic_type
,p.signature_reqd
,p.nom_del_date
,p.exp_del_channel
,p.exp_del_tour
,p.exp_del_date
,p.exp_col_tour
,p.exp_col_date
,pad.geo_latitude del_geo_latitude
,pad.geo_longitude del_geo_longitude
,pad.post_code delivery_postcode
,pac.post_code collection_postcode
,CASE
WHEN phh.scan_date =
(SELECT MIN (scan_date)
FROM parcel_history_holding ph
WHERE ph.parcel_id = phh.parcel_id)
AND pp.parcel_id IS NULL THEN 1
ELSE 0
END not_in_pp_insert_flag
,get_tt_status (app_code, status_code || reason_code)
tt_status_reason
FROM parcel_history_holding phh
,parcel_history_pivot pp
,parcels p
,parcel_addresses pad
,parcel_addresses pac
WHERE phh.parcel_id = pp.parcel_id(+)
AND phh.parcel_id = p.parcel_id(+)
AND pad.parcel_id(+) = p.parcel_id
AND pad.address_type(+) = 'DEL'
AND pac.parcel_id(+) = p.parcel_id
AND pac.address_type(+) = 'COL'
-- AND p_thread = pkg_utils.get_thread (phh.parcel_id, v_num_threads)
AND p.parcel_id IS NOT NULL
ORDER BY phh.parcel_id
,phh.scan_date;As Manik shows with the documentation link, the RULE hint was deprecated ages ago, especially with the CBO becoming the prominent optimizer in 10g.
And as oracle no longer support Rule based optimization, you could end up with odd 'side effects' if you use it.
Optimizer hints are something you shouldn't really be using in production code anyway...
Comments
Hints were introduced in Oracle7, when users had little recourse if the optimizer generated suboptimal plans. Now Oracle provides a number of tools, including the SQL Tuning Advisor, SQL plan management, and SQL Performance Analyzer, to help you address performance problems that are not solved by the optimizer. Oracle strongly recommends that you use those tools rather than hints. The tools are far superior to hints, because when used on an ongoing basis, they provide fresh solutions as your data and database environment change.
Hints should be used sparingly, and only after you have collected statistics on the relevant tables and evaluated the optimizer plan without hints using the EXPLAIN PLAN statement. Changing database conditions as well as query performance enhancements in subsequent releases can have significant impact on how hints in your code affect performance.
(my highlight) -
Hi ,
Cany one provide me link for hints in 11G.
Thanks in Advancehttp://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements006.htm#SQLRF50903
And
http://docs.oracle.com/cd/E11882_01/server.112/e16638/hintsref.htm
Edited by: Girish Sharma on May 8, 2012 3:53 PM -
I have created TM lock in oracle 9i and 11g databases. by using same query
here is the query uesd for finding a lock in database.
select /*+ RULE */ 'DATAPOINT # ' bpb,
l.sid, ' # ',
s.username, ' # ',
s.sql_address, ' # ',
x.sid, ' # ',
y.username, ' # ',
l.type, ' # ',
l.id1, ' # ',
l.id2, ' # ',
decode(X.LMODE,
0, 'None',
1, 'Null',
2, 'Row Share',
3, 'Row Excl',
4, 'Share',
5, 'Shr Row Excl',
6, 'Exclusive',
decode(L.REQUEST,
0, 'None',
1, 'Null',
2, 'Row Share',
3, 'Row Excl',
4, 'Share',
5, 'Shr Row Excl',
6, 'Exclusive',
from v$session s, v$lock l, v$lock x, v$session y
where l.ctime > 120
and s.lockwait = l.kaddr
and l.type in ('TM', 'TX', 'UL')
and l.id1 = x.id1
and l.id2 = x.id2
and x.sid != l.sid
and x.sid = y.sid
and x.lmode >0;
after doing further investigation i found that for 11g condition s.lockwait = l.kaddr not satisfied where as for 9i it's gives correct results
here are the lockwait and kaddr values for 9i and 11g databases.
for oracle 9i
SQL> select lockwait from v$session where sid in (10,12);
LOCKWAIT
67B4E10C
SQL> select kaddr from v$lock where sid in (10,12);
KADDR
67B4E088
67B4E10C
for oracle 11g
SQL> select lockwait from v$session where sid in (70,134);
LOCKWAIT
070000002FA080D8
SQL> select kaddr from v$lock where sid in (70,134);
KADDR
0700000030C595C0
0700000030C59830
00000001108E3E58
00000001108E3E58
070000002FA6CB30
SQL>
please advise if there is any change for calculations for lockwait,kaddr for 11g.can you post your query with explain plan for both 9i version and 10g version.
Thanks,
karthick. -
Explain plan changing between 9i and 11g
Hi
Recently we migrated the database from 9i to 11g.In 11g environment one query was running for long time and when we comapre the explain plan between 9i and 11g, we found one of the table is going through "INDEX RANGE SCAN NON UNIQUE" in 9i but in 11g it is accessing through "INDEX RANGE SCAN INDEX".
Is there any hint to add so that it will access table through "INDEX RANGE SCAN NON UNIQUE" in 11g?
Please Help.I agree with Paul.
Why are you assuming that the optimizer in 11g, which has had bug fixes and vast improvements since 9i, is optimizing the query badly just because you think the query is running slowly.
Before making assumptions, you need to find the cause of the issue, not just look for differences in two non-comparible explain plans and assume that's the cause. Adding hints to force indexes and suchlike is not the answer (even though some idiots may suggest it is).
As it says in the documentation in relation to hints:
Comments
Hints were introduced in Oracle7, when users had little recourse if the optimizer generated suboptimal plans. Now Oracle provides a number of tools, including the SQL Tuning Advisor, SQL plan management, and SQL Performance Analyzer, to help you address performance problems that are not solved by the optimizer. Oracle strongly recommends that you use those tools rather than hints. The tools are far superior to hints, because when used on an ongoing basis, they provide fresh solutions as your data and database environment change. -
Rule hint based query being fired by DB in AWR rpt ??
I am looking into AWR report and i see the below sql statment being executed 58000 in 5 hour period...
the application guy said, its not being fired from the app....is the making making some
recursive calls or what ??? as its a pretty big amount of time that its being fired...
and also this is a 10.2.0.3 database ....why would it use the rule hint if its being fired
by the database ?? below is the query....
select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#, sample_size,
minimum, maximum, distcnt, lowval, hival, density, col#, spare1, spare2, avgcln from hist_head$
where obj#=:1 and intcol#=:2funny thing we do have a user called DBSNMP on our database and we do not have grid control agent on it either...or even database control...then why we getting this sql ???
$ ./emctl status agent
EM Configuration issue. /oracle/app/product/10.2.0/xxxxxxx_nimsprod not found. -
Replacement for 'Rule' hint in 10g
Hi,
We have upgraded database from 9i to 10g. We have some sql queries which are using 'RULE' hints, but 10g is not supporting 'RULE' hints, can you please suggest me any replacement hint for 'RULE' hint in 10g or alternative ways to tune the sql query so that it will work same as 9i in 10g also in performance.
Kindly help me.
ThanksQuery:
SELECT HOU.NAME EMPRESA,
PAPF.FULL_NAME COMPRADOR,
NVL(SUBSTR(CAEV.DE_CODE, 1, 10), ' ') DE_COMPRADOR,
NVL(SUBSTR(CAEV.DI_CODE, 1, 10), ' ') DI_COMPRADOR,
NVL(SUBSTR(CAEV.GG_CODE, 1, 10), ' ') GG_COMPRADOR,
NVL(SUBSTR(CAEV.GA_CODE, 1, 10), ' ') GA_COMPRADOR,
PH.SEGMENT1 ORDEM_COMPRA,
PV.VENDOR_NAME FORNECEDOR,
DECODE(PVSA.GLOBAL_ATTRIBUTE9,
1,
PVSA.GLOBAL_ATTRIBUTE10 || '' || PVSA.GLOBAL_ATTRIBUTE12,
2,
PVSA.GLOBAL_ATTRIBUTE10 || '' || PVSA.GLOBAL_ATTRIBUTE11 || '' ||
PVSA.GLOBAL_ATTRIBUTE12,
3,
LPAD(PV.SEGMENT1 || REPLACE(PVSA.VENDOR_SITE_CODE, '-', ''),
15,
'0'),
PVSA.GLOBAL_ATTRIBUTE10 || '' || PVSA.GLOBAL_ATTRIBUTE11 || '' ||
PVSA.GLOBAL_ATTRIBUTE12) CNPJ,
PVSA.VENDOR_SITE_CODE LOCAL,
REPLACE(REPLACE(REPLACE(REPLACE(PH.COMMENTS, CHR(13) || CHR(10) || CHR(9), ' '),
CHR(9), ' '), CHR(10), ' '), '#', '')
DESCRIÇÃO,
(SELECT LAST_NAME
FROM APPS.PER_PEOPLE_F
WHERE EMPLOYEE_NUMBER = PH.ATTRIBUTE1
AND EFFECTIVE_END_DATE >= SYSDATE) GESTOR_DO_CONTRATO,
NVL(SUBSTR(CAEV2.DE_CODE, 1, 10), ' ') DE_GESTOR,
NVL(SUBSTR(CAEV2.DI_CODE, 1, 10), ' ') DI_GESTOR,
NVL(SUBSTR(CAEV2.GG_CODE, 1, 10), ' ') GG_GESTOR,
NVL(SUBSTR(CAEV2.GA_CODE, 1, 10), ' ') GA_GESTOR,
NVL(CAEV2.GA_NOME, ' ') GA_NOME,
PDT.TYPE_NAME TIPO,
TO_CHAR(PH.START_DATE, 'DD/MM/YYYY') DATA_INICIAL_EFETIVAÇÃO,
TO_CHAR(PH.END_DATE, 'DD/MM/YYYY') DATA_FINAL_EFETIVAÇÃO,
NVL(PH.CLOSED_CODE, 'OPEN') STATUS_DO_FECHAMENTO,
PH.BLANKET_TOTAL_AMOUNT VALOR_DO_CONTRATO,
(SELECT EMAIL_ADDRESS
FROM APPS.PER_PEOPLE_F
WHERE EMPLOYEE_NUMBER = PH.ATTRIBUTE1
AND EFFECTIVE_END_DATE >= SYSDATE) EMAIL_GESTOR_DO_CONTRATO
,FLV.MEANING STATUS_DA_APROVAÇÃO
,NVL((SELECT MCB.SEGMENT1 || '.' ||
MCB.SEGMENT2 || '.' ||
MCB.SEGMENT3 || '.' ||
MCB.SEGMENT4 || '.' ||
MCB.SEGMENT5
FROM PO.PO_HEADERS_ALL PAI,
PO.PO_HEADERS_ALL FILHO,
PO.PO_LINES_ALL PLA,
INV.MTL_CATEGORIES_B MCB
WHERE MCB.CATEGORY_ID = PLA.CATEGORY_ID
AND PAI.TYPE_LOOKUP_CODE = 'CONTRACT'
AND PLA.CONTRACT_ID = PAI.PO_HEADER_ID
AND PLA.PO_HEADER_ID = FILHO.PO_HEADER_ID
AND PAI.PO_HEADER_ID = PH.PO_HEADER_ID
AND NVL(PLA.CANCEL_FLAG, 'N') = 'N'
AND MCB.SEGMENT1 = 'SV'
AND ROWNUM = 1) ,
(SELECT MCB.SEGMENT1 || '.' ||
MCB.SEGMENT2 || '.' ||
MCB.SEGMENT3 || '.' ||
MCB.SEGMENT4 || '.' ||
MCB.SEGMENT5
FROM PO.PO_HEADERS_ALL PAI,
PO.PO_HEADERS_ALL FILHO,
PO.PO_LINES_ALL PLA,
INV.MTL_CATEGORIES_B MCB
WHERE MCB.CATEGORY_ID = PLA.CATEGORY_ID
AND PAI.TYPE_LOOKUP_CODE = 'CONTRACT'
AND PLA.CONTRACT_ID = PAI.PO_HEADER_ID
AND PLA.PO_HEADER_ID = FILHO.PO_HEADER_ID
AND PAI.PO_HEADER_ID = PH.PO_HEADER_ID
AND NVL(PLA.CANCEL_FLAG, 'N') = 'N'
AND MCB.SEGMENT1 = 'SE'
AND ROWNUM = 1)) CATEGORIA,
PH.ATTRIBUTE2 TIPO_DE_CONTRATO
FROM ---
(SELECT DISTINCT
PAPF.PERSON_ID,
PAPF.EMPLOYEE_NUMBER,
PAPF.FULL_NAME,
PAPF.EMAIL_ADDRESS,
HAOU_GA.ATTRIBUTE10 GA_CODE,
HAOU_GA.ATTRIBUTE11 GA_NOME,
HAOU_GG.ATTRIBUTE10 GG_CODE,
HAOU_GG.ATTRIBUTE11 GG_NOME,
HAOU_DI.ATTRIBUTE10 DI_CODE,
HAOU_DI.ATTRIBUTE11 DI_NOME,
HAOU_DE.ATTRIBUTE10 DE_CODE,
HAOU_DE.ATTRIBUTE11 DE_NOME
FROM APPS.PER_ALL_PEOPLE_F PAPF,
APPS.PER_ALL_ASSIGNMENTS_F PAAP,
APPS.PER_ALL_POSITIONS PAP,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_GA,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_GG,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_DI,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_DE
WHERE PAPF.PERSON_ID = PAAP.PERSON_ID
AND PAAP.POSITION_ID = PAP.POSITION_ID(+)
AND PAPF.EFFECTIVE_END_DATE = TO_DATE('31/12/4712', 'DD/MM/YYYY')
AND PAAP.EFFECTIVE_END_DATE = TO_DATE('31/12/4712', 'DD/MM/YYYY')
AND SUBSTR(PAP.NAME, 1, 12) = HAOU_GA.ATTRIBUTE9 (+)
AND SUBSTR(PAP.NAME, 1, 10) = HAOU_GG.ATTRIBUTE9 (+)
AND SUBSTR(PAP.NAME, 1, 8) = HAOU_DI.ATTRIBUTE9 (+)
AND SUBSTR(PAP.NAME, 1, 6) = HAOU_DE.ATTRIBUTE9 (+)) CAEV2,
APPS.PO_VENDORS PV,
APPS.PO_VENDOR_SITES_ALL PVSA,
APPS.PER_ALL_PEOPLE_F PAPF,
APPS.PO_DOCUMENT_TYPES_ALL_TL PDT,
APPS.HR_ALL_ORGANIZATION_UNITS HOU,
(SELECT DISTINCT
PAPF.PERSON_ID,
PAPF.EMPLOYEE_NUMBER,
PAPF.FULL_NAME,
PAPF.EMAIL_ADDRESS,
HAOU_GA.ATTRIBUTE10 GA_CODE,
HAOU_GA.ATTRIBUTE11 GA_NOME,
HAOU_GG.ATTRIBUTE10 GG_CODE,
HAOU_GG.ATTRIBUTE11 GG_NOME,
HAOU_DI.ATTRIBUTE10 DI_CODE,
HAOU_DI.ATTRIBUTE11 DI_NOME,
HAOU_DE.ATTRIBUTE10 DE_CODE,
HAOU_DE.ATTRIBUTE11 DE_NOME
FROM APPS.PER_ALL_PEOPLE_F PAPF,
APPS.PER_ALL_ASSIGNMENTS_F PAAP,
APPS.PER_ALL_POSITIONS PAP,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_GA,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_GG,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_DI,
APPS.HR_ALL_ORGANIZATION_UNITS HAOU_DE
WHERE PAPF.PERSON_ID = PAAP.PERSON_ID
AND PAAP.POSITION_ID = PAP.POSITION_ID(+)
AND PAPF.EFFECTIVE_END_DATE = TO_DATE('31/12/4712', 'DD/MM/YYYY')
AND PAAP.EFFECTIVE_END_DATE = TO_DATE('31/12/4712', 'DD/MM/YYYY')
AND SUBSTR(PAP.NAME, 1, 12) = HAOU_GA.ATTRIBUTE9 (+)
AND SUBSTR(PAP.NAME, 1, 10) = HAOU_GG.ATTRIBUTE9 (+)
AND SUBSTR(PAP.NAME, 1, 8) = HAOU_DI.ATTRIBUTE9 (+)
AND SUBSTR(PAP.NAME, 1, 6) = HAOU_DE.ATTRIBUTE9 (+)) CAEV,
APPS.PO_HEADERS_ALL PH,
APPS.FND_LOOKUP_VALUES FLV
WHERE PV.VENDOR_ID(+) = PH.VENDOR_ID
AND PVSA.VENDOR_ID(+) = PH.VENDOR_ID
AND PVSA.VENDOR_SITE_ID(+) = PH.VENDOR_SITE_ID
AND PVSA.GLOBAL_ATTRIBUTE9 <> 1
AND PAPF.EFFECTIVE_END_DATE > SYSDATE
AND PAPF.PERSON_ID(+) = PH.AGENT_ID
AND PH.AGENT_ID = CAEV.PERSON_ID(+)
AND PH.ATTRIBUTE1 = CAEV2.EMPLOYEE_NUMBER(+)
AND PDT.LANGUAGE = 'PTB'
AND PDT.ORG_ID(+) = PH.ORG_ID
AND PDT.DOCUMENT_TYPE_CODE IN ('PO', 'PA')
AND PDT.DOCUMENT_SUBTYPE(+) = PH.TYPE_LOOKUP_CODE
AND HOU.ORGANIZATION_ID(+) = PH.ORG_ID
AND PH.ORG_ID IN (90, 91, 92, 93, 94, 410, 414, 19626, 19628, 137) CVRD, HISPANOBRAS, KOBRASCO, NIBRASCO, ITABRASCO,CPBS,FGC,FCA,SALOBO,FVRD
AND PH.ORG_ID IN (90,19626) CVRD,FCA
AND NVL(PH.FROZEN_FLAG, 'N') = 'N'
AND NVL(PH.CANCEL_FLAG, 'N') = 'N'
AND NVL(PH.AUTHORIZATION_STATUS, 'INCOMPLETE') IN ('APPROVED', 'PRE-APPROVED', 'IN PROCESS', 'REQUIRES REAPPROVAL')
AND PH.TYPE_LOOKUP_CODE = 'CONTRACT'
AND EXISTS (SELECT 1
FROM PO.PO_HEADERS_ALL PAI,
PO.PO_HEADERS_ALL FILHO,
PO.PO_LINES_ALL PLA,
INV.MTL_CATEGORIES_B MCB
WHERE MCB.CATEGORY_ID = PLA.CATEGORY_ID
AND PAI.TYPE_LOOKUP_CODE = 'CONTRACT'
AND PLA.CONTRACT_ID = PAI.PO_HEADER_ID
AND PLA.PO_HEADER_ID = FILHO.PO_HEADER_ID
AND PAI.PO_HEADER_ID = PH.PO_HEADER_ID
AND NVL(PLA.CANCEL_FLAG, 'N') = 'N'
AND MCB.SEGMENT1 IN ('SE', 'SV'))
-- AND PH.ATTRIBUTE2 IN ('CUSTEIO (SERVIÇO)', 'INVESTIMENTO (SERVIÇO)')
AND ((NVL(PH.CLOSED_CODE, 'OPEN') = 'OPEN') OR
(NVL(PH.CLOSED_CODE, 'OPEN') = 'CLOSED' AND
PH.END_DATE BETWEEN TO_DATE(:DATA_INICIO||' 00:00:00', 'DD/MM/YYYY HH24:MI:SS') AND
TO_DATE(:DATA_FIM||' 23:59:59', 'DD/MM/YYYY HH24:MI:SS')))
and flv.language = 'PTB'
and flv.lookup_type = 'AUTHORIZATION STATUS'
and flv.lookup_code = nvl(ph.authorization_status,'INCOMPLETE') -
Data mismatch between 10g and 11g.
Hi
We recently upgraded OBIEE to 11.1.1.6.0 from 10.1.3.4.0. While testing we found data mismatch between 10g and 11g in-case of few reports which are including a front end calculated column with division included in it, say for example ("- Paycheck"."Earnings" / COUNT(DISTINCT "- Pay"."Check Date")) / 25.
The data is matching for the below scenarios.
1) When the column is removed from both 10g and 11g.
2) When the aggregation rule is set to either "Sum or Count" in both 10g and 11g.
It would be very helpful and greatly appreciated if any workaround/pointers to solve this issue is provided.
Thanksjfedynic wrote:
The 10g and 11.1.0.7 Databases are currently set to AL32UTF8.
In each database there is a VARCHAR2 field used to store data, but not specifically AL32UTF8 data but encrypted data.
Using the 10g Client to connect to either the 10g database or 11g database it works fine.
Using the 11.1.0.7 Client to go against either the 10g or 11g database and it produces the error: ORA-29275: partial multibyte character
What has changed?
Was it considered a Bug in 10g because it allowed this behavior and now 11g is operating correctly?
29275, 00000, "partial multibyte character"
// *Cause: The requested read operation could not complete because a partial
// multibyte character was found at the end of the input.
// *Action: Ensure that the complete multibyte character is sent from the
// remote server and retry the operation. Or read the partial
// multibyte character as RAW.It appears to me a bug got fixed. -
Does RULE hint cause ORA-01555 errors ?
DB Version:9.2.0.5.0
OS:SunOS 5.9
Our DBA is saying that the RULE hint in the below SQL might be causing ORA-01555 error. Is it true? Does RULE hint cause ORA-01555 errors
SELECT /*+ RULE */ COUNT(*)
FROM ( SELECT /*+ RULE */ DISTINCT CAR_HDR.CAR_NBR AS A1, CAR_HDR.PLT_ID AS A29,
CAR_HDR.PKT_CTRL_NBR AS A2, CAR_HDR.TOTAL_QTY AS A21, CAR_HDR.STAT_CODE AS A6,
CAR_HDR.CURR_LOCN_ID AS A12,
CAR_HDR.CAR_NBR AS A145,
CAR_HDR.WN_NBR AS A4, CAR_HDR.PCALL_NBR AS A7, CAR_HDR.CHAIN_CNT AS A119,
CAR_HDR.SHPMT_NBR AS A35, LPN_HDR.WHSE AS A105, CAR_HDR.MISC_CAR AS A146, '' AS A138,
CAR_HDR.CHUTE_ID AS A132, CAR_HDR.MOD_DATE_TIME AS A82, LPN_HDR.LOCN_CLASS AS A106,
LPN_HDR.AREA AS A107, LPN_HDR.ZONE AS A108, LPN_HDR.AISLE AS A109, LPN_HDR.BAY AS A110,
LPN_HDR.LVL AS A111, LPN_HDR.POSN AS A112
FROM INV_MASTER , CAR_DTL , LPN_HDR , CAR_HDR
WHERE CAR_HDR.CAR_NBR=CAR_DTL.CAR_NBR(+)
AND CAR_HDR.CURR_LOCN_ID=LPN_HDR.LOCN_ID(+)
AND CAR_HDR.WHSE=LPN_HDR.WHSE(+)
AND CAR_DTL.SKU_ID=INV_MASTER.SKU_ID(+)
AND CAR_HDR.CT_SEQ = 'ALB10'
AND INV_MASTER.INV_CODE = 98
AND INV_MASTER.TRACK_CODE = 'P10' )
user636669 wrote:
DB Version:9.2.0.5.0
OS:SunOS 5.9
Our DBA is saying that the RULE hint in the below SQL might be causing ORA-01555 error. Is it true? Does RULE hint cause ORA-01555 errorsThe full statement is causing the ORA-01555 error. Each line of the statement is important therefore each line is reponsible for the error. I personally think the DISTINCT keyword has a bigger influence than the RULE hint.
I suggest to check what you want to do with that count result. maybe there are better ways to get the same result. Maybe you can even ignore the distinct keyword or remove some outer joins. Using the CBO might result in the same plan as using the RBO, so you you will never know if that removing the hint will help or if if you'll get the same problem later again. -
Difference in select for update of - in Oracle Database 10g and 11g
Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience):
DECLARE
v_ename bonus.ename%TYPE;
BEGIN
SELECT b.ename
INTO v_ename
FROM bonus b
JOIN emp e ON b.ename = e.ename
JOIN dept d ON d.deptno = e.deptno
WHERE b.ename = 'Scott'
FOR UPDATE OF b.ename;
END;
/While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?
Edited by: Libor Nenadál on 29.4.2010 21:46
It seems that my question was answered here - http://stackoverflow.com/questions/2736426/difference-in-select-for-update-of-in-oracle-database-10g-and-11gThe behaviour seems like it really is a bug and can be avoided using non-ANSI syntax. (It makes me wonder why Oracle maintains two query languages while dumb me thinks that this is just a preprocessor matter and query engine could be the same).
-
Hi,
We are doing a conversion of oracle reports from 6i to 11g and we see some differences in fonts in the 11g version. For example some reports in 11g dont have the font type Palentino used in 6i. How do I get these font files or which folders do I find these font files. Can somebody let me know where in 6i can I find them and where do I need to copy these files into 11g and if need to make any configuration changes.
Thanks and RegardsNo problem, can you help me with the font files on the windows machine ... I have both 6i and 11g installed on my local windows machine. Since they are both on the same OS and use same font folders from OS i dont understand why the difference then.
Thanks and Regards -
How to Install oracle 10g and 11g on aix 6.1
Can we install oracle 10g and 11g Enterprise Editions on IBM aix 6.1 ? If so how
Chetan
Edited by: chetan0926 on Jan 11, 2012 2:56 AMHi;
Can we install oracle 10g and 11g Enterprise Editions on IBM aix 6.1 ? If so how Yes you can,both version is certified
I agree Sybrand, Please check installation guide. All your questions will be answered in it
http://www.oracle.com/pls/db102/homepage
http://www.oracle.com/pls/db112/homepage
Also see:
Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]
Regard
Helios -
Differences between Oracle Discoverer 10g and 11g .
we would like to know if they are any differences between Oracle Discoverer 10g and 11g and any issues with 10g that are overcome in 11g.
Please make us aware of any merits in going for 11g over 10g.
apps version 11.5.10.2
RegardsPlease see these links for the list of new features, bug fixes, certification, and installation of Discoverer 11g on 11i instance.
Discoverer 11.1.1.4 Certified with E-Business Suite
http://blogs.oracle.com/stevenChan/2011/02/discoverer_11114_ebs.html
EBS Sysadmin Primer: Oracle BI Discoverer 11gR1
http://blogs.oracle.com/stevenChan/2010/08/discoverer_11gr1_primer.html
Oracle Business Intelligence Discoverer 11g
http://www.oracle.com/technetwork/developer-tools/discoverer/overview/index.html
Oracle Business Intelligence Discoverer 11g documentation
http://www.oracle.com/technetwork/developer-tools/discoverer/documentation/index.html
Thanks,
Hussein -
Important differences between oracle 10g and 11g
Hi friends, can anyone tell me (pointwise) what are the major (and minor) differences between Oracle 10g and 11g.
Please point me to some documents if possible.
Thanks in advanceThe name of the link says it all: "top_features."
In short it is Oracle's list of what they have for marketing and sales reasons designated "top features."
It is not intended to be, and is not, a complete list of features. Often the features Oracle does not
talk about are the most important.
Let me give you some examples. I have never seen Oracle announce DBMS_XPLAN as a new feature
yet you should not run an explain plan without it. Neither have I ever seen Oracle announce the new
NO_DATA_NEEDED predefined exception. I have listed literally hundreds of new features you will not
find in Oracle's new features docs.
I did a presentation at OpenWorld this year as part of the unconference titled "New Features in
Database 11gR2 that Oracle will not announce." It was easy to prepare a one hour presentation with
little fear of being proved incorrect. As I turned out only one of the features I presented was mentioned
by Oracle.
You can find the presentation slides here:
http://www.morganslibrary.org/pres/oow09_ucnf.pdf
Maybe you are looking for
-
How to disable Satellite P750's touch buttons?
I constantly have a problem with my computer that it turns up the volume by itself because it thinks I'm tapping on the increase volume touch button. Anyway, it's really annoying, so can I disable the touch sensors so it will stop doing it?
-
Is it possibiel to disable drag and drop of JTable columns?
Hi, Using JDK6 I would like to disable user to drag and drop columns and change the default layout of my JTables. Thanks for any help,
-
Frustrated with installation of CS6
I have successfully downloaded CS6- please tell me the next step to actually install the programs- I have unzipped the files and tried to install the Windows installer packages it gives me a message "Please install PDF Settings CS6 using Setup.exe";
-
Is it possible to upgrade a SD to HD on the Apple TV?
?
-
Inventory install breaks rights to server
I had a functioning Zen 6.5 server with SP1b running NAL and WS IMPORT and REMOVE. I installed inventory from the cd and then ran support pack 2 to update everything. I now have lost administrative rights to the server. Can't do remote console, can't