Error ORA-00907 with query  SDO_GEOM.SDO_DIFFERENCE

Hi,
I have following query:
SELECT SDO_GEOM.SDO_DIFFERENCE(
SDO_RELATE(square.geometry, SDO_GEOM.SDO_BUFFER(MDSYS.SDO_GEOMETRY(3001, 1, MDSYS.SDO_POINT_TYPE(424, 1272, 0) , NULL, NULL), 100, 0.05,'unit=m arc_tolerance=0.005'), 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE',
SDO_RELATE(square.geometry, SDO_GEOM.SDO_BUFFER(MDSYS.SDO_GEOMETRY(3001, 1, MDSYS.SDO_POINT_TYPE(276, 1274, 0) , NULL, NULL), 100, 0.05,'unit=m arc_tolerance=0.005'), 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE',
0.001
Always get the ora-00907: a bracket is missing-error.
Any help is really appreciated. Is there a error in the query?
Regards Ronald.

Hi Ronald,
try following:
SELECT SDO_GEOM.SDO_DIFFERENCE(
    SELECT square.geometry from square where
      SDO_RELATE (square.geometry, SDO_GEOM.SDO_BUFFER(
          MDSYS.SDO_GEOMETRY(
            3001, 1, MDSYS.SDO_POINT_TYPE(424, 1272, 0) , NULL, NULL
          ), 100, 0.05,'unit=m arc_tolerance=0.005'
        ), 'mask=ANYINTERACT querytype=WINDOW'
      ) = 'TRUE'
    SELECT square.geometry from square where
      SDO_RELATE (square.geometry, SDO_GEOM.SDO_BUFFER(
          MDSYS.SDO_GEOMETRY(
            3001, 1, MDSYS.SDO_POINT_TYPE(276, 1274, 0) , NULL, NULL
          ), 100, 0.05,'unit=m arc_tolerance=0.005'
        ), 'mask=ANYINTERACT querytype=WINDOW'
      ) = 'TRUE'
    0.001   
FROM DUAL   

Similar Messages

  • During Table Import got error ORA-12805: parallel query server died unexpectedly

    Hi,
    I tried to import a single table of size 51 GB which normally imported in 5 hours but last time I got following error after 1.5 hours
    ORA-31693: Table data object "SCHEMA"."TABLE_NAME" failed to load/unload and is being skipped due to error:
    ORA-12805: parallel query server died unexpectedly.
    From the "Alert log" file I found the error is
    ORA-00603: ORACLE server session terminated by fatal error
    ORA-24557: error 1114 encountered while handling error 1114; exiting server process
    ORA-01114: IO error writing block to file 622 (block # 373725)
    ORA-27063: number of bytes read/written is incorrect
    IBM AIX RISC System/6000 Error: 28: No space left on device
    Additional information: -1
    Additional information: 253952
    I checked all the table spaces have more then 100GB free space. No idea why this happened.
    Some mount points of the machine is 100% in used where the table spaces created but in table spaces auto extend is off on every data file and each data file have free space.
    Anyone have idea how to resolve this issue.

    Hi,
    Which filesystem is file 622 in - it's quite a lrge numbered file - is it a tempfile or do you really have that many datafiles?
    Regards,
    Harry
    http://dbaharrison.blogspot.com

  • Database stopped with Error:ORA-10388: parallel query server interrupt (fai

    Hi Team,
    My Oracle 10g Database stopped automatically. When i checked the alert log i found the below Errors:
    Errors in file /opt/oracle/admin/DWS/bdump/dws_p000_10374.trc:
    ORA-10388: parallel query server interrupt (failure)
    Fri Mar 2 18:55:18 2012
    SMON: Restarting fast_start parallel rollback
    Fri Mar 2 18:55:47 2012
    Thread 1 advanced to log sequence 384310 (LGWR switch)
    Current log# 3 seq# 384310 mem# 0: +DBDG/dws/onlinelog/group_3.259.733426831
    Fri Mar 2 18:57:48 2012
    Errors in file /opt/oracle/admin/DWS/bdump/dws_p000_10374.trc:
    ORA-10388: parallel query server interrupt (failure)
    Fri Mar 2 18:57:49 2012
    Errors in file /opt/oracle/admin/DWS/bdump/dws_smon_10337.trc:
    ORA-00600: internal error code, arguments: [6006], [1], [], [], [], [], [], []
    Fri Mar 2 19:18:31 2012
    Errors in file /opt/oracle/admin/DWS/bdump/dws_pmon_10277.trc:
    ORA-00474: SMON process terminated with error
    Fri Mar 2 19:18:31 2012
    PMON: terminating instance due to error 474
    ======================================================================
    A week before we stopped oracle using "Shutdown abort" command. But two days before we stopped using "shutdown immediate", it went fine and system up and run fine.
    But today it stopped with this error message.
    Operating system : SOlaris 10
    I changed the parameter parameter fast_start_parallel_rollback to HIGH from LOW, but no use
    SQL> ALTER SYSTEM SET FAST_START_PARALLEL_ROLLBACK=HIGH SCOPE=BOTH;
    System altered.
    SQL> show parameter fast_start_parallel_rollback
    NAME TYPE VALUE
    fast_start_parallel_rollback string HIGH
    Usually The dead transaction will be rolled back after raising the Priority from LOW to HIGH. But this time its not rolled back. still etting the same error.
    Your answers will help to stop the oracle getting down in the LIVE production server. please share your experience guys.
    Thanks and Regards,
    Deeban

    Hi,
    Here im pasting the Trace file content for the error "ORA-00600: internal error code, arguments: [6006], [1], [], [], [], [], [], []".
    [10:20pm] root@dws41: # cat /opt/oracle/admin/DWS/bdump/dws_pmon_10277.trc
    /opt/oracle/admin/DWS/bdump/dws_pmon_10277.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORACLE_HOME = /opt/oracle/product/10.2.0
    System name: SunOS
    Node name: dws41
    Release: 5.10
    Version: Generic_138888-06
    Machine: sun4u
    Instance name: DWS
    Redo thread mounted by this instance: 1
    Oracle process number: 3
    Unix process pid: 10277, image: oracle@dws41 (PMON)
    **** 2012-03-02 19:18:31.509*
    **** SERVICE NAME:(SYS$BACKGROUND) 2012-03-02 19:18:31.504*
    **** SESSION ID:(1511.1) 2012-03-02 19:18:31.504*
    Background process SMON found dead
    Oracle pid = 8
    OS pid (from detached process) = 10337
    OS pid (from process state) = 10337
    dtp = 380017a10, proc = 7fd001048
    Dump of memory from 0x0000000380017A10 to 0x0000000380017A58
    380017A10 0000007C 00000000 00000007 FD001048 [...|...........H]
    380017A20 00000000 00000000 00000000 534D4F4E [............SMON]
    380017A30 00020000 00000000 00002861 00000000 [..........(a....]
    380017A40 00000000 4F507D38 00000001 327FA838 [....OP}8....2..8]
    380017A50 00040081 00000000 [........]
    Dump of memory from 0x00000007FD001048 to 0x00000007FD001830
    7FD001040 02010000 00000000 [........]
    7FD001050 00000000 00000000 00000000 00000000 [................]
    7FD001060 00000000 00000000 00000007 FD6D0CD0 [.............m..]
    7FD001070 00000007 FD700328 00000007 FD546D78 [.....p.(.....Tmx]
    7FD001080 00000005 3C6FD110 00000000 00000000 [....<o..........]
    7FD001090 00000005 3C6FD198 00000005 3C6FD198 [....<o......<o..]
    7FD0010A0 00000007 FD700318 01160800 00000000 [.....p..........]
    7FD0010B0 00000007 FD53FF88 00000007 FD544698 [.....S.......TF.]
    7FD0010C0 00000008 00000000 00000000 00000000 [................]
    7FD0010D0 00000000 00000000 00000000 00000000 [................]
    7FD0010E0 00000007 FD6CE770 00000007 FD6D0D00 [.....l.p.....m..]
    7FD0010F0 00000000 00000000 00000000 00000000 [................]
    Repeat 3 times
    7FD001130 00000000 00000000 00000012 00000000 [................]
    7FD001140 00000000 00000000 0000000F 00000000 [................]
    7FD001150 00000000 00000000 00000012 00000000 [................]
    Repeat 1 times
    7FD001170 00000000 00000000 0000000F 00000000 [................]
    Repeat 1 times
    7FD001190 00000000 00000000 00000012 00000000 [................]
    Repeat 1 times
    7FD0011B0 00000000 00000000 0000000E 00000000 [................]
    7FD0011C0 00000000 00000000 00000008 00000000 [................]
    7FD0011D0 00000000 00000000 00000012 00000000 [................]
    7FD0011E0 00000000 00000000 00000000 00000000 [................]
    Repeat 2 times
    7FD001210 00000000 00000000 00000004 00000000 [................]
    7FD001220 00000000 00000000 00000000 00000000 [................]
    7FD001230 4F50FF9A 00000000 00000000 00000000 [OP..............]
    7FD001240 00000000 00000000 00000000 00000000 [................]
    Repeat 1 times
    7FD001260 00000007 FD001260 00000007 FD001260 [.......`.......`]
    7FD001270 00000000 00000000 00000000 FFFFFFFF [................]
    7FD001280 00000007 FD001280 00000007 FD001280 [................]
    7FD001290 00000000 00000000 00000005 00000000 [................]
    7FD0012A0 00000000 00000000 00000000 00000000 [................]
    7FD0012B0 000000AB BABCDEFA 00000000 00000000 [................]
    7FD0012C0 00000000 00000000 000000FF 7FFFC971 [...............q]
    7FD0012D0 00000021 00000026 0008CBAA 00039976 [...!...&.......v]
    7FD0012E0 00000005 3C003FB8 00000006 7E0037D0 [....<.?.....~.7.]
    7FD0012F0 00000001 00000000 00000000 00000000 [................]
    7FD001300 00000000 00000000 00000000 00000000 [................]
    Repeat 1 times
    7FD001320 00000000 00000000 00002861 00000000 [..........(a....]
    7FD001330 00000000 00000000 00000000 00000000 [................]
    Repeat 2 times
    7FD001360 00000000 00000000 00000007 FD001048 [...............H]
    7FD001370 00000000 00000000 00000000 00000000 [................]
    Repeat 4 times
    7FD0013C0 00000000 00000000 00000001 00000000 [................]
    7FD0013D0 00000000 00000000 00000000 00000000 [................]
    Repeat 1 times
    7FD0013F0 4F50FF9A 00000000 00000007 FD0013F8 [OP..............]
    7FD001400 00000007 FD0013F8 00000000 00000000 [................]
    7FD001410 00010000 00000000 00000000 01000057 [...............W]
    7FD001420 0000000C 00000000 00002861 00000000 [..........(a....]
    7FD001430 00000000 4F507D38 00000001 00000000 [....OP}8........]
    7FD001440 00000000 00000000 00000000 00000000 [................]
    Repeat 3 times
    7FD001480 0000000F FFFFFFFF 00000000 00000000 [................]
    7FD001490 00000000 00000000 00000000 00000000 [................]
    Repeat 2 times
    7FD0014C0 00000000 00000000 00000020 00000000 [........... ....]
    7FD0014D0 00000000 00000000 00000000 00000000 [................]
    Repeat 8 times
    7FD001560 00000000 00000000 6F726163 6C650000 [........oracle..]
    7FD001570 00000000 00000000 00000000 00000000 [................]
    7FD001580 00000000 00000000 00000000 00000006 [................]
    7FD001590 64777334 31000000 00000000 00000000 [dws41...........]
    7FD0015A0 00000000 00000000 00000000 00000000 [................]
    Repeat 2 times
    7FD0015D0 00000000 00000005 554E4B4E 4F574E00 [........UNKNOWN.]
    7FD0015E0 00000000 00000000 00000000 00000000 [................]
    7FD0015F0 00000000 00000000 00000000 00000008 [................]
    7FD001600 31303333 37000000 00000000 00000000 [10337...........]
    7FD001610 00000000 00000000 00000000 00000005 [................]
    7FD001620 6F726163 6C654064 77733431 2028534D [oracle@dws41 (SM]
    7FD001630 4F4E2900 00000000 00000000 00000000 [ON).............]
    7FD001640 00000000 00000000 00000000 00000000 [................]
    7FD001650 00000000 00000013 00000000 00000002 [................]
    7FD001660 00000000 00000000 00000000 00000000 [................]
    Repeat 9 times
    7FD001700 00000000 00020000 00000000 00000000 [................]
    7FD001710 00000000 00000000 00000000 00000000 [................]
    7FD001720 00000003 BD4FFA28 00000005 3C0026F8 [.....O.(....<.&.]
    7FD001730 00000006 7E000F40 00000000 00000000 [....~..@........]
    7FD001740 00000003 BC691FD8 00000000 00000000 [.....i..........]
    7FD001750 00000000 00000000 00000000 00000000 [................]
    7FD001760 00000000 00000000 00000007 FD001768 [...............h]
    7FD001770 00000007 FD001768 00000000 09EF0000 [.......h........]
    7FD001780 00000000 086F0000 00000000 017A17D9 [.....o.......z..]
    7FD001790 00000000 00273A49 00000000 13B817D9 [.....':I........]
    7FD0017A0 00000000 00015030 00000000 0000A848 [......P0.......H]
    7FD0017B0 00000000 001350A0 00000000 00000828 [......P........(]
    7FD0017C0 00000000 000000E0 00000000 00000828 [...............(]
    7FD0017D0 00000000 00000000 00000000 00000000 [................]
    Repeat 4 times
    7FD001820 32B310E7 000152FB 00000003 00000000 [2.....R.........]
    error 474 detected in background process
    ORA-00474: SMON process terminated with error
    [10:20pm] root@dws41: #

  • Create a package with one function - Error Ora-00907

    Hello,
    I want to create a package which should store one function.
    The code looks like this:
    Package Header:
    CREATE OR REPLACE
    PACKAGE "PCK_REPORT" AS
      TYPE t_varchar2 IS TABLE OF VARCHAR2(4000);
      FUNCTION f_tabtostring(i_varchar2 IN t_varchar2) RETURN VARCHAR2;
    END;Package Body:
    CREATE OR REPLACE PACKAGE BODY "PCK_REPORT" AS
      FUNCTION f_tabtostring (i_varchar2 IN t_varchar2) RETURN VARCHAR2 IS
                                o_string VARCHAR2(32767);
      BEGIN
        FOR i IN 1 .. i_varchar2.COUNT LOOP
          IF i != i_varchar2.FIRST THEN
            o_string := o_string || ', ';
          END IF;
          o_string := o_string || i_varchar2(i);
        END LOOP;
        RETURN o_string;
      END f_tabtostring;
    END;Comilation works fine, but when I try to use the function with the following example:
    SELECT pck_report.f_tabtostring(CAST(COLLECT(mytable.col1) as t_varchar2)) as column1
    FROM mytable;it only returns an error ORA-00902: Unknown datatype.
    When I add the package name to the datatype at the cast in the sql statement, it returns an error ORA-00903.
    What is my misstake?
    Thanks,
    Thomas

    create a global type, and not in the package :
    1* create or replace type t_varchar2 is table of varchar2(100)
    SQL> /
    Type created.
    1 CREATE OR REPLACE PACKAGE "PCK_REPORT" AS
    2 FUNCTION f_tabtostring(i_varchar2 IN t_varchar2) RETURN VARCHAR2;
    3* END;
    SQL> /
    Package created.
    1 CREATE OR REPLACE PACKAGE BODY "PCK_REPORT" AS
    2 FUNCTION f_tabtostring (i_varchar2 IN t_varchar2) RETURN VARCHAR2 IS
    3 o_string VARCHAR2(32767);
    4 BEGIN
    5 FOR i IN 1 .. i_varchar2.COUNT LOOP
    6 IF i != i_varchar2.FIRST THEN
    7 o_string := o_string || ', ';
    8 END IF;
    9 o_string := o_string || i_varchar2(i);
    10 END LOOP;
    11 RETURN o_string;
    12 END f_tabtostring;
    13* END;
    SQL> /
    Package body created.
    SQL> select col1 from mytable;
    COL1
    test1
    test2
    test3
    test4
    test5
    test6
    test7
    test8
    test9
    test10
    10 rows selected.
    SQL> select pck_report.f_tabtostring(cast(collect(mytable.col1) as t_varchar2)) as col1 from mytable
    COL1
    test1, test2, test3, test4, test5, test6, test7, test8, test9, test10

  • FOR UPDATE on scrollable cursor and error: ORA-00907: missing right parenthesis

    If change my query to have a FOR UPDATE and make it an updatable scrollable cursor I get an error on the updateRow() command saying "ORA-00907: missing right parenthesis"
    If I remove the FOR UPDATE it works OK.
    The problem I have is trying to update a CLOB from a ResultSet. If I do not upate any other column I get the error saying that the error"
    "ORA-22920: row containing the LOB value is not locked"
    I can get around this by adding FOR UPDATE. But if I add FOR UPDATE and try to update any non-CLOB column I get the 00907 error above.
    Hmmmm. So here is what I can and cannot do:
    - I CAN update the CLOB IF I update another column 1st and NO FOR UPDATE clause.
    - I CAN update the CLOB only if I have FOR UPDATE clause.
    - I CANNOT update just the CLOB without FOR UPDATE.
    - I CANNOT update any non-CLOB column with FOR UPDATE.
    What a pain in the ***! How am I to provide generic access to the applications being built on my DB layer. This is crazy!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Andrew Edgar ([email protected]):
    I have this same problem!
    The error occurs when performing updateRow.
    The turning off of auto commit only gets the query to work but not the actual update.
    Will this be fixed in the next version of the Driver?<HR></BLOCKQUOTE>
    Here is the stack Trace I recieved:
    java.sql.SQLException: ORA-00907: missing right parenthesis
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
    at oracle.jdbc.driver.UpdatableResultSet.execute_updateRow(UpdatableResultSet.java:2135)
    at oracle.jdbc.driver.UpdatableResultSet.updateRow(UpdatableResultSet.java:1322)

  • Using DBMS_METADATA.GET_DDL get error: ORA-00907: missing right parenthesis

    Hi,
    I'm trying to extract schema DDL from a database (10.2.0.4.0 - 64bit Enterprise Edition on Solaris 10). I run the query below and get an ORA-00907: missing right parenthesis error.
    SELECT DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN ('TABLE_PARTITION','INDEX_PARTITION','LOB');
    This is the output when running the above in sqlplus worksheet
    select DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') as object_type, object_name) FROM user_objects where object_type not in ('TABLE_PARTITION','INDEX_PARTITION','LOB')
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    removing the where clause gives the following:
    select DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') as object_type, object_name) FROM user_objects
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    Any pointers would be gratefully received. I know I could get the DDL out using exp/imp but I want to understand why I'm getting the missing parenthesis error.
    cheers,
    Ewan

    SELECT DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN You don't need an alias here. Get rid of " AS object_type" and it should work.

  • SVG CHart error ORA-20001 with Stacked Bar Chart HTML DB 1.6.0.00.87

    Hi,
    during I put a How-To into execution (How To Create a Stacked Bar Chart) I'll get the following error code:
    SVG Chart error:ORA-20001:line_Chart error:ORA-20001:
    get_data error:ORA-20001:Parse error:ORA009
    (see http://www.oracle.com/technology/products/database/htmldb/howtos/index.html)
    This Situation occurs when i add a second series to the
    chart. The first series works fine. I've used the following SQL-Statement:
    select null l, sales_month, revenue from (select to_char(o.order_timestamp,'Mon YYYY') sales_month, sum(oi.quantity * oi.unit_price) revenue, to_date(to_char(o.order_timestamp,'Mon YYYY'),'Mon YYYY') sales_month_order from DEMO_PRODUCT_INFO p, DEMO_ORDER_ITEMS oi, DEMO_ORDERS o where o.order_timestamp <= (trunc(sysdate,'MON')-1)and o.order_timestamp > (trunc(sysdate-365,'MON'))and o.order_id = oi.order_id and oi.product_id = p.product_id and p.category = 'Audio' group by to_char(o.order_timestamp,'Mon YYYY') order by sales_month_order);
    Please help.
    Regards
    Detlev

    Well,
    I've just been struggling for a couple of hours with a cluster bar chart giving the same problem.
    The problem is definitely with "ORDER BY".
    I guess the graphing chart is taking the sql query as a string and then does some other manipulation on it which ends abnormally when you include the order by clause.
    I presume that if you embed the query in a
    SELECT * FROM (<actual query with order by>)
    it might mitigate the problem.
    Bye,
    Flavio

  • FOR UPDATE on updatable cursor and error: ORA-00907: missing right parenthesis

    Anyone run into this? I've searched the message board and bug db to no avail.
    - Using latest Oracle JDBC 2.0 compliant "thin" driver and Oracle 8.1.6 database.
    1) Using prepareStatement specifying an updatable cursor for something like "SELECT FNAME,LNAME FROM USERS FOR UPDATE OF FNAME,LNAME"
    2) Updating FNAME using updateString("FNAME","whatever"), and then calling updateRow() of the ResultSet yields:
    ORA-00907: missing right parenthesis
    If I remove the FOR UPDATE clause then everything works just fine.
    Workarounds/suggestions appreciated!
    Thanks,
    Ryan
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Andrew Edgar ([email protected]):
    I have this same problem!
    The error occurs when performing updateRow.
    The turning off of auto commit only gets the query to work but not the actual update.
    Will this be fixed in the next version of the Driver?<HR></BLOCKQUOTE>
    Here is the stack Trace I recieved:
    java.sql.SQLException: ORA-00907: missing right parenthesis
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
    at oracle.jdbc.driver.UpdatableResultSet.execute_updateRow(UpdatableResultSet.java:2135)
    at oracle.jdbc.driver.UpdatableResultSet.updateRow(UpdatableResultSet.java:1322)

  • Error: ORA-13199 following a SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT call

    Good afternoon all,
    I am new to this group. I tried to search the web for hints and clues to my error, but could not find a solution to my problem, so I decided to post here. I have an existing spatial table in which I recently inserted new values. I am trying to validate them, using the SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT function and I am getting errors:
    BEGIN
    SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('ALS.ALS_GEO_SVC_AREAS','GEOLOC','VALIDATION_RESULTS');
    END;
    Error at line 1
    ORA-13199: Invalid GEOMETRY table (or table does not exist)
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 17
    ORA-06512: at "MDSYS.SDO_GEOM", line 2828
    ORA-06512: at line 2
    Script Terminated on line 1.
    The spatial table is in a different schema = 'ALS' and is named 'ALS_GEO_SVC_AREAS'; the geometry column = 'GEOLOC'.
    I created the validation table ('VALIDATION_RESULTS') as such:
    CREATE TABLE VALIDATION_RESULTS(
    sdo_rowid ROWID,
    status VARCHAR2(2000));
    I am using TOAD 9.7.2.5.
    Can someone in the community help with this error?
    Thank you.
    Avridog

    Avridog,
    The only way I can see to get this cross-schema validation to work is via a view.
    Here is my use case.
    DROP  TABLE VALIDATION_RESULTS;
    CREATE TABLE VALIDATION_RESULTS(
    sdo_rowid ROWID,
    status VARCHAR2(2000)
    select count(*) from CODESYS.GEODPOINT2D;
    grant select on geodpoint2d to public with grant option;
    create view geodpoint2d as select * from codesys.geodpoint2d;
    insert into user_sdo_geom_metadata (table_name,column_name,diminfo,srid)
    select table_name,column_name,diminfo,srid
      from all_sdo_geom_metadata
    where owner = 'CODESYS' and table_name = 'GEODPOINT2D' and column_name = 'GEOM';
    commit;
    BEGIN
    SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('GEODPOINT2D','GEOM','VALIDATION_RESULTS');
    END;
    Select * from VALIDATION_RESULTS;
    SDO_ROWID STATUS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
    NULL      Rows Processed <500>This worked for me (all points passed validation). If it works for you, and you believe your question is answered please award points.
    regards
    Simon

  • Compiling error ORA-00600 with Forms 6 and Database 10g

    Hi,
    I am using "Oracle Database 10g Enterprise Edition Release 10.1.0.4.0" and "Forms [32 Bit] Version 6.0.8.26.0 " with patch 17, when i compile a form that works with some tables in another database under dblink the error ORA-00600:internal error code, arguments:[16203],[],[],[],[],[],[],[] is displayed.
    If i word with reports or sqlplus no error is displayed.
    Before we installed 10g everything worked ok
    What is wrong with forms or do i need to configure something else?
    Regards
    Yuri V. López Manrique

    I searched for this error on Google and found the following blog:
    Is there a tool to troubleshoot ORA-00600 and ORA-07445 errors?
    February 27th, 2006 By Fahd Mirza
    ORA-00600 and ORA-07445 errors are the most esoteric errors in Oracle.
    There is a tool called “ORA-600/ORA-7445 Troubleshooter” available at Metalink. It asks for the first argument of ORA-600 error with an optional database version number.
    For example, to see the description of the error:
    ORA-00600: internal error code, arguments: [723], [25908], [25908], [memory leak]
    You enter 723 in the “ORA-600 First Argument” field. The first argument is a pointer to where in the code the error was caught and thus is the key information in identifying the problem.
    You can also embed (copy/paste) the “Call Stack Trace” there, and, when you click on the “Search Call Stack” button an advanced MetaLink search is performed to find documents containing relevant sections from the call stack.
    Call Stack extracts from the following files are supported:
    * Generic foreground and background server trace files located in background_dump_dest and user_dump_dest
    * OpenVMS NETV2 and BEQ log files located in ORA_ROOT:[NETWORK.LOG]
    * WINDOWS CORE.LOG files
    * GDB (debugger) backtrace call stacks (best endeavors)
    Of course you will need a login to Oracle's Metalink site.
    Hope that helps,
    c

  • Error ORA-12162 with sqlplus

    Hi everybody,
    When I open sqlplus64, I take the user-name ans password and I have the error message
    ERROR:
    ORA-12162: TNS:net service name is incorrectly specified
    But while processing the user-name and password are the same I made ...
    I don't understand.
    Best regards,
    Transact
    Edited by: transact on 4 déc. 2010 13:36

    =================================
    A couple of important points.
    First, the listener is a server side only process. It's entire purpose in life is to receive requests for connections to databases and set up those connections. Once the connection is established, the listener is out of the picture. It creates the connection. It doesn't sustain the connection. One listener, with the default name of LISTENER, running from one oracle home, listening on a single port, will serve multiple database instances of multiple versions running from multiple homes. It is an unnecessary complexity to try to have multiple listeners or to name the listener as if it belongs to a particular database. That would be like the telephone company building a separate switchboard for each customer.
    Additional notes on the listener: One listener is capable of listening on multiple ports. But please notice that it is the listener using these ports, not the database instance. You can't bind a specific listener port to a specific db instance. Similarly, one listener is capable of listnening on multiple IP addresses (in the case of a server with multiple NICs) But just like the port, you can't bind a specific ip address to a specific db instance.
    Second, the tnsnames.ora file is a client side issue. It's purpose is for address resolution - the tns equivalent of the 'hosts' file further down the network stack. The only reason it exists on a host machine is because that machine can also run client processes.
    Assume you have the following in your tnsnames.ora:
    larry =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = curley)
      )Now, when you issue a connect, say like this:
    $> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Next, tns sends a request to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
    Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
    Next, the request arrives at port 1521 on myhost. Hopefully, there is a listener on myhost configured to listen on port 1521, and that listener knows about SERVICE_NAME = curley. If so, you'll be connected.
    What can go wrong?
    First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't find your telephone directory (tnsnames.ora) or can't find the party you are looking for listed in it (no entry for larry)) you don't look for problems at the telephone switchboard.
    Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
    Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
    Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
    Third: If the client is on the same machine as the db instance, it is possible to connect without referencing tnsnames and without going through the listener.
    Now, when you issue a connect, say like this:
    $> sqlplus scott/tigertns will attempt to establish an IPC connection to the db instance. How does it know the name of the instance? It uses the current value of the enviornment variable ORACLE_SID. So...
    $> export ORACLE_SID=fred
    $> sqlplus scott/tigerIt will attempt to connect to the instance known as "fred". If there is no such instance, it will, of course, fail. Also, if there is no value set for ORACLE_SID, the connect will fail.
    check executing instances to get the SID
    [oracle@vmlnx01 ~]$ ps -ef|grep pmon|grep -v grep
    oracle    4236     1  0 10:30 ?        00:00:00 ora_pmon_vlnxora1set ORACLE_SID appropriately, and connect
    [oracle@vmlnx01 ~]$ export ORACLE_SID='vlnxora1
    [oracle@vmlnx01 ~]$ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:37 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsNow set ORACLE_SID to a bogus value, and try to connect
    SQL> exit
    [oracle@vmlnx01 ~]$ export ORACLE_SID=FUBAR
    [oracle@vmlnx01 ~]$ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:57 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    Enter user-name: Now set ORACLE_SID to null, and try to connect
    [oracle@vmlnx01 ~]$ export ORACLE_SID=
    [oracle@vmlnx01 ~]$ sqlplus /scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:43:24 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-12162: TNS:net service name is incorrectly specifiedOk, that is how we get from the client connection request to the listener. What about the listener's part of all this?
    The listener is very simple. It's job is to listen for connection requests and make the connection (server process) between the client and the database instance. Once that connection is made, the listener is out of the picture. If you were to kill the listener, all existing connections would continue. The listener is configured with the listener.ora file, but if that file doesn't exist, the listener is quite capable of starting up with all default values. One common mistake with the listner configuration is to specify "HOST=localhost" or "HOST=127.0.01". This is a NONROUTABLE ip address. LOCALHOST and ip address 127.0.0.1 always mean "this machine on which I am sitting". So, all computers are known as "localhost" or "127.0.0.1". If you specify this address, the listener will only be capable of receiving requests from the machine on which it is running. If you specified that address in your tnsnames file - on a remote client machine - the request would be routed to the machine on which the requesting client resides. Probably not what you want.
    =====================================

  • Networking error (ORA-28547) with 10g on Red Hat Linux

    Hello everybody
    I'm having the following error when trying to set up a 10g database on a Red Hat machine. I can start the listener correctly, but then the Enterprise Manager shows the following error in the 'Agent Connection to Instance' section:
    ORA-28547: connection to server failed, probable Oracle Net admin error (DBD ERROR: OCISessionBegin)
    When I try to access using SQL*Plus, I get the same error. I don't know what can be wrong: the listener starts correctly, tnsping gives OK, both using the server name and the SID, and the config. files seem to be correct. Anyone has a clue?
    Thanks in advance for your answers.
    Just in case, here are (the relevant parts of) mi config. files:
    listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = extproc)
    (SID_NAME = oradb10g)
    (ORACLE_HOME = /opt/app/oracle/)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = oradb10g))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = st03)(PORT = 1521))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    tnsnames.ora:
    ORADB10G =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = st03)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = oradb10g)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(Key = EXTPROC0))
    (CONNECT_DATA =
    (SID = oradb10g)
    (PRESENTATION = RO)
    sqlnet.ora:
    SQLNET.AUTHENTICATION_SERVICES=(NONE)
    Thanks again.

    Sorry for the delay, I've been kind of busy :S
    Here are the requested files' contents
    /etc/hosts:
    192.168.1.19 st00.summatec.net st00
    192.168.1.33 st03.summatec.net st03
    127.0.0.1 localhost.localdomain localhost
    192.168.1.11 st01.summatec.net st01
    /etc/nsswitch.conf:
    passwd: files
    shadow: files
    group: files
    hosts: files dns
    bootparams: nisplus [NOTFOUND=return] files
    ethers: files
    netmasks: files
    networks: files
    protocols: files
    rpc: files
    services: files
    netgroup: files
    publickey: nisplus
    automount: files
    aliases: files nisplus
    $ORACLE_HOME/sysman/config/emd.properties:
    perlBin=/opt/app/oracle/perl/bin
    scriptsDir=/opt/app/oracle/sysman/admin/scripts
    emdRoot=/opt/app/oracle
    agentStateDir=/opt/app/oracle
    chronosRoot=/opt/app/oracle/sysman/emd/chronos
    REPOSITORY_URL=http://st03.summatec.net:4889/em/upload/
    agentSeed=802746336
    agentVersion=10.1.0.4.0
    UploadInterval=5
    UploadFailBackoffPct= 20
    UploadTimeout=1800
    UploadFileSize=2048
    UploadMaxBytesXML=50
    UploadMaxNumberXML=5000
    UploadMaxDiskUsedPct=98
    UploadMaxDiskUsedPctFloor=95
    emdRootCertLoc=/opt/app/oracle/sysman/config/b64LocalCertificate.txt
    internetCertLoc=/opt/app/oracle/sysman/config/b64InternetCertificate.txt
    emdWalletSrcUrl=http://st03.summatec.net:4889/em/wallets/emd
    emdWalletDest=/opt/app/oracle/sysman/config/server
    emd_email_address=
    emd_email_gateway=
    emd_from_email_address=
    EMD_URL=http://st03.summatec.net:/emd/main/
    AgentListenOnAllNICs=TRUE
    NormalThreadStackSize=0
    ouiLoc=/opt/app/oracle/oui
    hostConfigClasspath=/opt/app/oracle/oui/jlib/xmlparserv2.jar:/opt/app/oracle/oui/jlib/OraInstaller.jar:/opt/app/oracle/oui/jlib/srvm.jar:/opt/app/oracle/oui/jlib/share.jar:/opt/app/oracle/sysman/jlib/emd_java.jar:/opt/app/oracle/sysman/jlib/log4j-core.jar
    JAVA_HOME=/opt/app/oracle/jdk/jre
    CLASSPATH=/opt/app/oracle/sysman/jlib/emd_java.jar:/opt/app/oracle/opmn/lib/ons.jar:/opt/app/oracle/lib/xmlparserv2.jar:/opt/app/oracle/sysman/jlib/log4j-core.jar:/opt/app/oracle/oc4j/j2ee/home/lib/http_client.jar:/opt/app/oracle/lib/dms.jar:/opt/app/oracle/lib/dmsEmd.jar:/opt/app/oracle/jlib/share.jar:/opt/app/oracle/jdbc/lib/ojdbc14dms.jar:/opt/app/oracle/jlib/jssl-1_1.jar:/opt/app/oracle/jlib/javax-ssl-1_1.jar:/opt/app/oracle/jlib/ojmisc.jar:/opt/app/oracle/lib/em_test.jar:/opt/app/oracle/jlib/ojmisc.jar:/opt/app/oracle/jlib/repository.jar:/opt/app/oracle/opmn/lib/optic.jar
    agentJavaDefines=-Doracle.dms.refresh.wait.time=1000 -DUrlTiming.UseJSSE=true
    LogFileMaxSize=4096
    LogFileMaxRolls=4
    TrcFileMaxSize=4096
    TrcFileMaxRolls=4
    dynamicPropsComputeTimeout=60
    EMAGENT_PERL_TRACE_LEVEL=ERROR
    tracelevel.main=WARN
    tracelevel.emSDK.xml=WARN
    tracelevel.emSDK.utl=WARN
    tracelevel.ResMonitor=WARN
    tracelevel.Dispatcher=WARN
    tracelevel.ThreadPool=WARN
    tracelevel.pingManager=WARN
    tracelevel.collector=WARN
    tracelevel.http=WARN
    tracelevel.ssl=WARN
    tracelevel.ssl.io=WARN
    tracelevel.blackouts=WARN
    tracelevel.upload=WARN
    tracelevel.command=WARN
    tracelevel.reload=WARN
    tracelevel.scheduler=WARN
    tracelevel.Authentication=WARN
    tracelevel.metadata=WARN
    tracelevel.targets=WARN
    tracelevel.TargetManager=WARN
    tracelevel.engine=WARN
    tracelevel.javaproc=WARN
    tracelevel.vpxoci=WARN
    tracelevel.javavm=WARN
    tracelevel.fetchlets=WARN
    tracelevel.fetchlets.os=WARN
    tracelevel.fetchlets.osline=WARN
    tracelevel.fetchlets.oslinetok=WARN
    tracelevel.fetchlets.UDM=WARN
    tracelevel.fetchlets.sql=WARN
    tracelevel.fetchlets.url=WARN
    tracelevel.fetchlets.urllines=WARN
    tracelevel.fetchlets.urllinetoken=WARN
    tracelevel.fetchlets.URLTiming=WARN
    tracelevel.fetchlets.propEcho=WARN
    tracelevel.fetchlets.readFromFile=WARN
    tracelevel.fetchlets.readMultFromFile=WARN
    tracelevel.fetchlets.throwable=WARN
    tracelevel.fetchlets.resourceGrab=WARN
    tracelevel.fetchlets.emSDK=WARN
    httpTimeoutPrimaryHeader=30
    httpTimeoutSecondaryHeaders=30
    httpTimeoutBody=60
    $ORACLE_HOME/log/st03/client/css.log:
    (the following lines are repeated several times)
    2006-05-02 12:33:35.709: [  OCROSD][3070490304]utgdv:2:ocr loc file cannot be opened
    2006-05-02 12:33:35.710: [  OCROSD][3070490304]utopen:1: Couldnt find ocr,[ocrmirror] location in config file
    2006-05-02 12:33:35.710: [  OCRRAW][3070490304]proprinit: Could not open raw device
    2006-05-02 12:33:35.710: [ default][3070490304]a_init:7!: Backend init unsuccessful : [33]
    2006-05-02 12:33:35.711: [ CSSCLNT][3070490304]clsssinit: error(33 ) in OCR initialization
    $ORACLE_HOME/network/log/listener.log (a representative piece):
    05-MAY-2006 10:46:58 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=oradb10g)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.33)(PORT=52204)) * establish * oradb10g * 0
    05-MAY-2006 10:47:07 * ping * 0
    WARNING: Subscription for node down event still pending
    05-MAY-2006 10:47:07 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=st03.summatec.net)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS=(PROTOCOL=TCP)(HOST=st03.summatec.net)(PORT=1521)))(VERSION=169869568)) * status * 0
    05-MAY-2006 10:47:08 * (CONNECT_DATA=(SID=oradb10g)(CID=(PROGRAM=perl)(HOST=st03.summatec.net)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.33)(PORT=52208)) * establish * oradb10g * 0
    05-MAY-2006 10:47:28 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=oradb10g)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.33)(PORT=52212)) * establish * oradb10g * 0
    (the last line is repeated several times)
    $ORACLE_HOME/network/log/sqlnet.log :
    Fatal NI connect error 12505, connecting to:
    (DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS=(PROTOCOL=IPC)(Key=EXTPROC0))(CONNECT_DATA=(SID=oradb10g)(SERVER=)(PRESENTATION=RO)(CID=(PROGRAM=java)(HOST=st03.summatec.net)(USER=oracle))))
    VERSION INFORMATION:
    TNS for Linux: Version 10.2.0.1.0 - Production
    Unix Domain Socket IPC NT Protocol Adaptor for Linux: Version 10.2.0.1.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
    Time: 02-MAY-2006 12:35:22
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12564
    TNS-12564: TNS:connection refused
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    Fatal NI connect error 12505, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(Key=EXTPROC0))(CONNECT_DATA=(SID=oradb10g)(PRESENTATION=RO)(CID=(PROGRAM=java)(HOST=st03.summatec.net)(USER=oracle))))
    VERSION INFORMATION:
    TNS for Linux: Version 10.2.0.1.0 - Production
    Unix Domain Socket IPC NT Protocol Adaptor for Linux: Version 10.2.0.1.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
    Time: 02-MAY-2006 12:38:18
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12564
    TNS-12564: TNS:connection refused
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    I wasn't sure which logs to post, so I included the ones in $ORACLE_HOME/logs and $ORACLE_HOME/network/logs; I hope they are helpful.
    Thanks again, and sorry for the long post.

  • SQL-Query with JDBC returns error ORA-00600

    Hi,
    I try to execute a SQL-Query using JDeveloper 3.2.3 and the Oracle JDBC-Library 8.1.7
    The following statement
    'ResultSet rset=stmt.executeQuery(SQL-String);'
    where stmt is Statement returns a Database-Error
    ORA-00600 with the Arguments [ttcgcshnd-1], [0] [], [], [], [], [], []
    when the SQL-String queries Varchar2 or CHAR-Columns.
    The Query returns correct values for numeric fields.
    The Database-Server is running on Oracle 9i
    Does anybody know, what could be the reason?
    Thanks, Harold

    I found many forums about it also, but I still haven't got solution yet.
    They talk about the cause, and report to oracle group and so on,
    but I still don't know how to solve my problem and how to enable my oracle 9i jdbc driver working.
    Need help please

  • 'Order By' in Exists / Not Exists condition causing ORA-00907 in Apex4.1.1

    Hi Guys,
    We have just upgraded from apex 3.2.1 to 4.1.1. on Oracle DB V11.2.0.1, while testing the apps in apex, I come across this problem.
    When I have a page process that has a condition defined.
    When Condition Type is Exists (SQL query returns at least one row) or Not Exists (SQL query returns no rows) and the Expression 1 is a query with an 'Order By' clause, e.g.
    SELECT 123 FROM DUAL
    ORDER BY 1
    When the process is triggered, Apex 3.2.1 would evaluate the condition and run the process just fine, however Apex 4.1.1 would throw an error : ORA-00907: missing right parenthesis
    I totally understand that an Order by clause in an Exists or Not Exists condition is unnecessary and agree that they shouldn't be there in the first place.
    But unfortunately I am dealing with other developers codes and these conditions have been coded like these, probably from copy & paste codes.
    Saying that, I also believe that an Apex upgrade should not stop anything that is working in previous releases without warning or provide a workaround, right?
    I don't know if this affects other types of artifacts that can have a condition in apex when upgrading from 3.2.1, e.g Regions/Items/Computations/Validations etc.
    Does anyone else get this behaviour? and is there an easy solution to fix these?
    Ideally I don't want to go through all processes (and whatever other artifacts might be affected too) in all apps in all workspaces to check the condition type and remove the 'Order By' clause manually.
    Thanks for any advises
    Just did some more testing
    'Computation' , 'Validations', 'Processes' and 'Branches' have the same problem, 3.2.1 takes 'Order By' fine in Exists/Not Exists condition, but 4.1.1 throws error.
    'Regions', 'Buttons', 'Items' have consistent behaviour - both 3.2.1 and 4.1.1 throw error ORA-00907: missing right parenthesis, when page is rendered.
    Edited by: Danny on 25/04/2012 20:07

    Hi Danny,
    that's interesting. I just had a look what happens when you use an EXISTS or NOT EXISTS condition type. The following final SQL statement will be generated with your above example. You can also see that if you run your application in debug mode.
    select count(*) from sys.dual where exists (select 123 from dual order by 1)Executing that statement in SQL*Plus will also show the ORA-00907 error. It appears that the SQL parser doesn't allow an order by clause in an EXIST clause.
    I wonder why this should have worked in previous versions, but I can only suspect that in the past we may just have executed
    select 123 from dual order by 1which can be slightly slower because with the new EXISTS statement the SQL engine can stop processing earlier if it finds a record.
    We try to be backward compatible as much as possible, but I doubt that we will change that back to the way it was before because of the performance penalty 99.9% of our customers would face.
    Possible Workaround: You might be able to use the new "Application Search" to scan your application for "order by" and fix it for all hits where the attribute name is "Expression 1".
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Why ORA-00907?

    Sorry for my english, I've tried the following query in TOAD and it works OK, but i try the same from vb.net using oraoledb and error ORA-00907 appears.
    select M.NRO_ASIENTO as N_Asiento ,
    (select count(ASI.NRO_ASIENTO) FROM dgo_asientos ASI WHERE ASI.NRO_ASIENTO <= A.NRO_ASIENTO and ASI.TIPO_ASIENTO='002') as ordenAsiento
    FROM dgo_movimientos M, dgo_asientos A
    WHERE A.EJERCICIO= M.EJERCICIO and A.NRO_ASIENTO= M.NRO_ASIENTO
    any ideas??
    thank you

    I also get the ORA-00907 with the query show below. It fails in both 9.2.0.2 and 9.2.0.4. It works fine using SQL*PLus and Micrcosoft's MSDAORA driver (!) against a 9.2.0.1 database and Microsoft .NET Framework v1.0.3705.
    Tony Bravo
    SQL> r
    1 select SUM(case when emad.EMAD_ADJUSTMENT_CD = 'GI'
    2 then empo.EMPO_BASIC_PAY * cora.CORA_MAX_ADJUSTMENT / 100
    3 else 0 end) as SumGIAvailable,
    4 SUM(case when emad.EMAD_ADJUSTMENT_CD = 'MI'
    5 then empo.EMPO_BASIC_PAY * cora.CORA_MAX_ADJUSTMENT / 100
    6 else 0 end) as SumMIAvailable,
    7 SUM(case when emad.EMAD_ADJUSTMENT_CD = 'MI'
    8 then empo.EMPO_BASIC_PAY * emad.EMAD_ADJUSTMENT_VALUE / 100
    9 else 0 end) as SumMISpent,
    10 SUM(case when emad.EMAD_ADJUSTMENT_CD = 'CAD'
    11 then emad.EMAD_ADJUSTMENT_VALUE else 0 end) as SumCADSpent
    12 from PBCS_EMPLOYEE_POSITIONS empo,
    13 PBCS_EMPL_COMP_REVIEWS emco,
    14 PBCS_EMPL_COMP_ADJUSTMENTS emad,
    15 PBCS_COMP_ADJUSTMENT_RANGES cora
    16 where empo.EMPO_EMPLOYEE_ID = emco.EMCO_EMPLOYEE_ID
    17 and empo.EMPO_PERIOD_ID = emco.EMCO_PERIOD_ID
    18 and emco.EMCO_REVIEW_ID = emad.EMAD_REVIEW_ID
    19 and emad.EMAD_ADJUSTMENT_CD = cora.CORA_ADJUSTMENT_CD
    20 and emco.EMCO_PERIOD_ID = cora.CORA_PERIOD_ID
    21* and empo.EMPO_PERIOD_ID = 4
    SUMGIAVAILABLE SUMMIAVAILABLE SUMMISPENT SUMCADSPENT
    10813.14 27726 9460 17002

Maybe you are looking for

  • Help me!!!! my itunes library and play list are disappearance!!! Please!! 50gb of music!!

    Help me!!!! my itunes library and play list are disappearance!!! Please!! 50gb of music!!

  • Using NT username and password with Portal??

    I want to have a pulling mechanism between the Portal application and the component that holds the NT username and password. If I were to log onto my NT box with username:XXX password: YYY and bring up the Portal application.. I wouldn't have to go t

  • Script update when running

    Oracle SQL Developer version 1.1.2.25 BUILD MAIN-25.79 Running under WinXP Issue description: It is currently not possible to update the script that is currently running.

  • How 2 Search files in MAC

    hi, im a new user in Mac OS. i have a question on how to search By file types in MAC Os. in Windows you can do a "ind File" by *.mp3....this will search & list all the .mp3 in the HD. How can i can like this in OSX. thnx

  • Desktop Won't Run - New Install

    I get the following message:     "Application has generated an exception that could not be handled.    Process ID=0x1114 (4372), Thread ID=0x1120 (4384)" I installed from CD, from a downloaded file, saved in a separate directory and ran as administra