Default Sorting behaviour of Oracle 9i in 11g along with group by clause

Hi,
We have recently migrated from 9i to 11g. The reports from application comes in a jumbled fashion. Later we understood when there is a group by clause in the query, the recordset will be sorted by default in 9i and this feature is not available in 11g. Do anyone faced the same issue and resolved at the DB level.
Only alternate we found is the change in code with addittional order by clause which will take a long time to complete and roll out the same.
If anyone has got any immediate solution, please let me know.
Thx in advance.
Sheen

Hi,
A group by can sort (depending on the method of grouping) but it isn't necessary. If you want to sort the output you need the ORDER BY clause. There are different group by mechanismes between 9i and 11g. 10g introduced HASH GROUP BY where in 9i only the SORT GROUP BY existed. The latter gives a sorted set, the first not.
if you want the same behaviour you can use "_gby_hash_aggregation_enabled parameter" = false, which disables the hash group by.
Have also a look at the support document "'Group By' Does Not Guarantee a Sort Without Order By Clause In 10g and Above [ID 345048.1]".
Herald ten Dam
http://htendam.wordpress.com

Similar Messages

  • Oracle Access Manager 11g Basic with E-Business Suite

    Hi gurus,
    I was just wondering if anyone could tell me if the basic edition of Oracle Access Manager 11g is licensed for use with e-Business Suite 11i as a partner application? Or is it necessary to purchase the full license to use it with EBS?

    925237 wrote:
    Hi gurus,
    I was just wondering if anyone could tell me if the basic edition of Oracle Access Manager 11g is licensed for use with e-Business Suite 11i as a partner application? Or is it necessary to purchase the full license to use it with EBS?You need a license for Oracle Access Manager. However, AccessGate is available at no charge to customers who have already licensed both Oracle E-Business Suite and Oracle Access Manager.
    Oracle E-Business Suite AccessGate Release 1.0.2 Now Available
    https://blogs.oracle.com/stevenChan/entry/ebs_accessgate_102
    Oracle Access Manager 11.1.1.5 Certified with E-Business Suite 12
    https://blogs.oracle.com/stevenChan/entry/oracle_access_manager_11_11
    Oracle Access Manager 11.1.1.3 Certified with E-Business Suite 12
    https://blogs.oracle.com/stevenChan/entry/oracle_access_manager_11_1
    Please contact your Oracle sales representative (account manager), he/she is the best one to answer your license questions.
    Global Pricing and Licensing
    http://www.oracle.com/us/corporate/pricing/index.html
    Thanks,
    Hussein

  • Oracle Access Manager 11g r2 with Oracle Entitlement Server 11g r2

    Hello,
    I would like to set up a configuration with Oracle Access Manager 11g r2 where Authentication is against Active Directory, and Authorisation is against Oracle internet Directory
    Access Manager has to get authorizations from Oracle internet Directory via Oracle Entitlement Server
    I cant find any document describing how to integrate Oracle Access Manager with Oracle Entitlement Server
    could any one help ?
    Regards

    Hi all,
    I am facing some issue with the distribution of the policy in the security module of OES.
    The "application" distribution tab allows me to distribute the policy created but does not generate any distribution ID or address for webservice access.
    I am using OES 11.1.5
    Thanks in advance.

  • Upgrade issues OBIEE 10g to 11g along with OBIA upgrade

    Hi,
    I have to upgrade OBIEE 10.1.3.4.1 to OBIEE 11.1.1.5 along with OBIA 7.9.6.1 to 7.9.6.5(Informatica 8.6.1 to 9.0.1) at my client location and I have very little knowledge on it. and want to know/have help documents for upgrade.
    And if anyone in the forums involved in upgrade please list the errors/issues occured during upgrade and after upgrade.
    1. OBIEE 10g to 11g upgrade issues??
    2. OBIA OBIA 7.9.6.1 to 7.9.6.5 upgrade issues along with 10g to 11g??
    3. Informatica 8.6.1 to 9.0.1 upgrade issues??
    4. DAC upgrade issues??
    any response for my questions is appreciated.
    Thanks
    Jay.
    Edited by: Jay on Apr 11, 2012 9:11 AM

    HI Jay,
    We cannot explained thread list here, If you get any errors plz post me,will try to help out.
    This is oracle document link - This document has given step by step with screen shots upgration for 10g to 11g ,Please refer the below link.
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11115/upgrade/upgrade_to_11g.htm
    http://obieemanu.blogspot.in/2011/05/rpd-upgration-from-10g-to-11g.html
    http://docs.oracle.com/cd/E21764_01/upgrade.1111/e10125/ua_command_line.htm#ASMAS149
    Award points it is useful.
    Thanks,
    satya

  • OBIEE 11g Issue with "group by"

    Hello,
    I have issues with the physical queries generated by OBIEE engine.
    All the facts are at detailed granular level. when I query the table, group by clause is excluded from the query. following is the sample query generated by OBIEE 11g engine.
    select 0 as c1,
    D1.c2 as c2,
    D1.c1 as c3,
    D2.c3 as c4,
    D2.c2 as c5,
    D2.c1 as c6
    from
    (select distinct T48494.SMBL as c1,
    T48494.EXP_DT as c2
    from
    VW_CONTRACT_DETAILS T48494
    where ( T48494.EXP_DT in (TO_DATE('2012-09-03 00:00:00' , 'YYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-09-19 00:00:00' , 'YYYY-MM-DD HH24:MI:SS')) )
    ) D1,
    (select sum(T48494.TRADED_VOL) as c1,
    sum(T48494.TRADED_VAL) as c2,
    sum(T48494.TOTAL_TRADES) as c3
    from
    VW_CONTRACT_DETAILS T48494
    where ( T48494.EXP_DT in (TO_DATE('2012-09-03 00:00:00' , 'YYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-09-19 00:00:00' , 'YYYY-MM-DD HH24:MI:SS')) )
    ) D2
    order by c3, c2
    I'm getting similar kind of issues(exclusion of group by from query) even when i query other fact tables as well. Is there any global change to be made?
    Regards,
    Kishore

    Does it mean you are expecting a group by on
    D1.c1, D1.c2?
    So query should like
    select 0 as c1,
    D1.c2 as c2,
    D1.c1 as c3,
    D2.c3 as c4,
    D2.c2 as c5,
    D2.c1 as c6
    from
    (select distinct T48494.SMBL as c1,
    T48494.EXP_DT as c2
    from
    VW_CONTRACT_DETAILS T48494
    where ( T48494.EXP_DT in (TO_DATE('2012-09-03 00:00:00' , 'YYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-09-19 00:00:00' , 'YYYY-MM-DD HH24:MI:SS')) )
    ) D1,
    (select sum(T48494.TRADED_VOL) as c1,
    sum(T48494.TRADED_VAL) as c2,
    sum(T48494.TOTAL_TRADES) as c3
    from
    VW_CONTRACT_DETAILS T48494
    where ( T48494.EXP_DT in (TO_DATE('2012-09-03 00:00:00' , 'YYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-09-19 00:00:00' , 'YYYY-MM-DD HH24:MI:SS')) )
    ) D2
    group by c3, c2 ---> added line
    order by c3, c2

  • Is it mandatory to install oracle web logic server along with EM?

    Hello All, I am a new user for EM. i was going through the EM installation with OBE. I found that Web logic server installation is thier along with EM but my question is if i am not monitoring my application (which is SAP) with the help of EM then is it compulsory to install web logic server. i want EM only for Database Monitoring.
    Thanks in advance.
    Regards,
    Ajay

    Hello Rob,
    Thank you very much for the answer. I had a check in installation guide from oracle documentation and i came to know that it is a prerequisite for oracle 11 release.
    Thanks & Regards,
    Ajay

  • Oracle Standalone DB 11g installation with ASM on Windows 2008

    Hi Experts,
    I would like to install Oracle Database 11g R2 on Windows 2008 with ASM .
    Since I want to do it as a standalone database server , I did not confiugre any shared storage. I have a single disk on my machine with 1 TB space.
    There is a free space of 750 GB and want to use that space for ASM disks.
    Can someone guide me on how to configure ASM disks ?.
    Thanks

    859875 wrote:
    Thanks Fiedi. Thanks a lot for your response.
    Last month I did RAC installation where I need format raw devices using below commands :
    clean all
    create part ext
    create part log
    Is it not required for standalone DB installation with ASM ?
    Basically preparing disk for ASM on RAC or non RAC is the same
    >
    >
    I am able to create 4 logical raw devices (175GB) each. 2 for Data and 2 for DB flash. However I am not able to clean those raw devices with "clean all" command.
    Can you help me ?
    what error did you get?. Try delete the logical partition and recreate it

  • Oracle 11g: update with group by

    DB. 11.2.0.2.0
    Hello
    This feels as though it should be simple. The below code tries to update the Activities table with the sum of staff hours (worked out from two other tables).
    The select works fine:
    select a.activities_id, sum((t.st_proportion*s.staff_time)*7*(t.st_enddate-t.st_startdate)/100)
    from aa_wl_activities3 a
    join aa_wl_stafftime2 t
    on a.activities_id=t.st_activity_id
    join aa_wl_staff s
    on t.st_staff_id=s.staff_id
    group by a.activities_idand produces data like this:
    7    700
    6    700
    44  700
    41  700
    update aa_wl_activities3 a
    set a.activities_stafftime = sum((t.st_proportion*s.staff_time)*7*(t.st_enddate-t.st_startdate)/100)
    join aa_wl_stafftime2 t
    on a.activities_id=t.st_activity_id
    join aa_wl_staff s
    and t.st_staff_id=s.staff_id
    group by a.activities_idI get this error:
    ORA-00934: group function is not allowed hereFrom various bits of googling, it is possible to update using an aggregate function - I want to check it's possible in Oracle SQL and if anyone can spot anything wrong with my code
    Thanks
    Emma

    emma-apex wrote:
    From various bits of googling, it is possible to update using an aggregate function - I want to check it's possible in Oracle SQL and if anyone can spot anything wrong with my codeYes, it's possible but you have to do it with a correlated subquery that computes the sum for each row of the target table :
    update aa_wl_activities3 a
    set a.activities_stafftime =
      select sum(
               (t.st_proportion * s.staff_time)
             * 7
             * (t.st_enddate - t.st_startdate)
             / 100
      from aa_wl_stafftime2 t
           join aa_wl_staff s on s.staff_id = t.st_staff_id
      where t.st_activity_id = a.activities_id
    ;(Or MERGE as suggested)

  • How to install and integrate oracle 10g and 11g Warehouse with EBS???

    Hi,
    We are using EBS r12 (12.0.6) and database 12.2.0.3.
    Please give us the Doc Id's for installing and confihuration oracle Data Warehouse with EBS r12?
    thx

    Hi;
    We are using EBS r12 (12.0.6) and database 12.2.0.3.you mean db version is 10.2.0.3 right? Coz there is no version like start 12 yet!
    Please give us the Doc Id's for installing and confihuration oracle Data Warehouse with EBS r12?Check below:
    Oracle E-Business Intelligence Embedded Data Warehouse Implementation Guide Release 4.1 [ID 246156.1]
    Embedded Data Warehouse White Papers [ID 149406.1]
    Embedded Data Warehouse Library [ID 149404.1]
    Regard
    Helios

  • Can I use Oracle Forms Services 11g with Database 9.2.0.8.0?

    Hi everyone.
    My department is evaluating development tools in order to build new web applications, and also possibly to migrate current applications buit with Oracle Forms 6.0.5.34.0. Our database is Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit.
    We have read that the newest Oracle Forms version is Oracle Forms Services 11g. Is Oracle Forms Services 11g compatible with Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit? or would we have to migrate our RDBMS to Oracle 11g?
    If our database is compatible, what would we need to develop and deploy applications with Oracle Forms Services 11g?
    Many thanks in advance.

    Wheter it's compatible or not: Database 9.2.0.8 is in sustaining support which means you won't get patches for it. So even if it is compatible I'd opt to upgrade to a newer version, as I wouldn't feel comfortable having a not-supported product out in production.
    Have a look at the certification matrix for supported configurations
    http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls
    As for the requirements; most things can be found on the forms homepage on OTN:
    http://www.oracle.com/technetwork/developer-tools/forms/
    or at the documentation:
    http://download.oracle.com/docs/cd/E17904_01/index.htm
    cheers

  • Output not sorted when using group by clause

    Recently we migrated our application from Forms5 to Forms10g and database from 7.3.2 to 10gR2.
    More than 400 applications using sql stmt with "group by" clause and without "order by".
    In Earlier version of oracle 7.3.2 "group by" clause in SQL stmt sorts the output by order of the column in the "group by"
    stmt, where new version of oracle 10g (10.2.0.1.0 - 64bit Production) doesnt behave like older version.
    eg select div_cd,dept_cd,count(*) from class group by div_cd,dept_cd
    Output of the above query in Oracle7
    DIV_CD DEPT_CD COUNT(*)
    0 1     120
    0 9 131
    1 4 938
    1 6 1
    4 1 1490
    5 2 59
    6 6 848
    6 9 295
    8 1 45
    9 5 19
    Output of same query in Oracle10g
    DIV_CD DEPT_CD COUNT(*)
    0 6 120
    0 9 131
    4 1 1490
    6 9 295
    8 1 45
    9 5 19
    1 4 938
    1 6 1
    5 2 59
    6 6 848
    My question is
    a) Does the oracle behave in that manner?.
    b) if so, Any patch set available for this?
    c) if no patch set how to resolve this issue.
    if i use "order by" clause
    along with group by then i can get the output how i want.
    BUt problem is more than 400 applications (forms) using above method.
    Identify Forms/Reports and rectifing is a tedious job.
    Anyone can give me a good solution to solve the above issue

    Group By does not, and never has guaranteed order. Just because it happened that way on the past does not mean it will continue to do so.
    In the past, the algorithm used for Group By invoked a sort. It was convenient for the system to simply dump the output in that resulting order. These days, Group By could also be accomplished using a hash algorithm. Walking through the hash can easily result in a completely different ordering, as you have seen.
    Your problem is that the assumptions made previously are now invalid. Oracle is still working correctly. No patch, but you might be able to work around it by crippling your database and using the COMPATIBLE parameter (although the official lower limit is 9.2.0)

  • Transactional Behaviour of Oracle B2B 11g

    Hi Gurus/Anuj,
    Can you please explain Transactional Behaviour in Oracle B2B 11g?
    For a Inbound Interface I have three Mediators(Mediator M1,M2 and M3)
    Partner push a file at file location --> B2B Interface used in M1 ,through B2B Binding,picks the FIle and brings to SOA and--> Give it to M2 and M3.
    I need to perform Error Handling in this case..
    M1 M2 and M3 are Asynchronous,Synch and Synch in nature and I guess M1 will propogate it's transaction to M2 and M2 will propogate it's transaction to M3.
    Routing rules are Sequential..
    Note : Fault policies are applicable to parallel routing rules only. For sequential routing rules, the fault goes back to the caller and it is the responsibility of the caller to handle the fault.
    Am I correct in understanding that :
    B2B Adapter in M1 is the caller and M2 and M3 ,as being Synchronous,will follow M1'a transaction.
    And if a Fault goes into M2 and M3,it will go back to the caller,means M1.
    And in M1 we can have Fault-Handling.
    Also please explain Transactional Behaviour in Oracle B2B 11g?
    Is B2B is Asynchronous in nature?
    Is B2B Adapter a Transactional Adapter?
    What category of JCA adapter is Oracle B2B adapter?
    Thanks
    Vivek
    Edited by: Vivek on May 19, 2011 11:41 PM
    Edited by: Vivek on May 19, 2011 11:54 PM

    Hi Vivek,
    Also please explain Transactional Behaviour in Oracle B2B 11g?Oracle B2B depends upon the underlying transport being used for transactional behavior. As far as transaction propagation is concerned, we never had any such need in B2B communication.
    Am I correct in understanding that :
    B2B Adapter in M1 is the caller and M2 and M3 ,as being Synchronous,will follow M1'a transaction.
    And if a Fault goes into M2 and M3,it will go back to the caller,means M1.
    And in M1 we can have Fault-Handling.If you are using AQ interface of B2B adapter with XA Data Source then that adapter can participate in an XA global transaction that can span multiple resources. In this transaction, the application server acts as the coordinating transaction manager with multiple databases (or other resources such as JMS), each of which is involved in a single transaction.
    If you are using JMS interface of B2B adapter with XA Connection factor then that adapter can also participate in an XA global transaction that can span multiple resources.
    If you are using Default (Fabric) interface of B2B adapter then it does not participate in global transaction, rather it starts it's own local transaction and executes in that. So it will totally depend upon the interface you are using with B2B adapter that it will start and propagate a global transaction or will not participate in a global transaction. Moreover, if B2B adapter is starting a transaction and propagating it to a async service then that sync service will start a new local transaction and further sync services may execute in that transaction. As soon as the control comes back to B2B adapter, it will commit the transaction.
    Is B2B is Asynchronous in nature?B2B can be used for both sync and async calls (between partners). B2B is async when communicating with middleware.
    Is B2B Adapter a Transactional Adapter?Explained above
    What category of JCA adapter is Oracle B2B adapter?No special category. It is a specific adapter for Oracle SOA SCA composites to facilitate them in communication with Oracle B2B. You may or may not use this adapter in SOA SCA composites.
    Regards,
    Anuj

  • Oracle 10G gives in sorted order without order by ,in 11g it is not.

    we are facing a strange problem.
    we have M Views on which we perform select operation ,we put joins of M Views and get the results by select operation , the results was in sorted order (asc) and we were not using any order by clause in the select query , this was in oracle 10G.
    The compelte schema where these M views are and also the underneath tables are now migrated to oracle 11g using import/export option.
    Now the queries which was giving the result set in sorted order (asc), are not given the result set in sorted order anymore. it is in different order but I think at always return the same order not asc or desc but an specific random order .
    we can not change the query as of now as there are 1000+ and each query would require a order by statement .
    Do we have any parameters which can be change , so that we can force oracle to use a different plan so that it gives result in order ?
    the select queries are very simple ones not complicated no extra function or group by is used in most of the queries.
    Please suggest possible solutions . Thanks much.

    Su**** wrote:
    Please guide me how to go to this doc link ,i am newbi, and do not how to go to this link.
    MOS Doc 345048.1 ('Group By' Does Not Guarantee a Sort Without Order By Clause In 10g and Above)
    Go to http://support.oracle.com, log in to My Oracle Support, and search for 345048.1 If you don't have a My Oracle Support account, you'll need to contact whoever manages your company's Oracle support and ask them to create an account for you.
    Basically, no version of Oracle has ever guaranteed the order of results if you don't specify an ORDER BY clause. In 10g, the only algorithm that was available to implement a GROUP BY happened to sort the results as a side effect. 11g introduced a new algorithm for grouping results that is more efficient and does not have the side effect of ordering the results. Most likely, your query plans have changed to use the more efficient grouping algorithm.
    If you want the results to be sorted, you should add an appropriate ORDER BY clause. If you go through the MOS document, there will also be suggestions for ways that you can disable the new grouping algorithm though I would not recommend that.
    Justin

  • Default sorting order used by oracle

    Can anyone please let me know whether oracle uses any default sort order or not when executing an sql which does not have any sort order/ order by clause?
    I have a sql query where no sort order is specified.
    Now if I add some more columns in the select clause and execute the same query, the number of records returned are same and also the records are same.
    But the order in which they are displayed is different from the previous query.
    Could anyone please let me know whether oracle uses any default sort order or not when executing an sql which does not have any sort order/ order by clause
    or does it depend on the columns of the table?
    Thanks in advance.

    To answer your direct question "why the order in the previous example differ".
    When you added additional columns to the select list, that changed the query plan generated for the query. This caused Oracle to pick up the rows in a different order. There are a number of reasons this could happen, the new selected columns caused a different index (or no index) to be used for one of the tables in the query, it caused a different table to be be used as the "driving" table (i.e. the first one accessed), it caused a different join method to be used.
    HTH
    John

  • What is default UserID/Password for Oracle 11g

    Hello experts,
    I’m new to Oracle and installed 11g first time on Windows. Installation has finished successfully. It gave me the link on open my database.
    Enterprise Manager Database Control URL - (orcl) :
    https://192.168.2.25:1158/em
    when I open it it ask for user id and password. I don’t know what is my userid is. Can anybody help me with this issue.
    Thanks a lot in advance.
    Edited by: user10791378 on Aug 16, 2009 1:36 PM

    >
    I’m new to Oracle and installed 11g first time on Windows. Installation has finished successfully. It gave me the link on open my database.
    Enterprise Manager Database Control URL - (orcl) :
    https://192.168.2.25:1158/em
    when I open it it ask for user id and password. I don’t know what is my userid is. Can anybody help me with this issue.
    >
    You can log in to the Enterprise Manager Database Control with any DBA user. Typically, you should be able to logon as sys or as system. The passwords for these two users where specified by you during the install of the database.
    If you can't remember them, you should be able to change them on the command line after a connect as sysdba there.
    Kind regards
    Uwe
    http://uhesse.wordpress.com

Maybe you are looking for