Error ORA-13364: layer...  using /*+ ORDERED */

We develop a spatial application using ORACLE 10.1.0.4 Spatial.
While testing the application we found a very strange behavior:
If we use the /*+ ORDERED */ hint we get an error:
ORA-13364: layer dimensionality does not match geometry dimensions
Here is the query and the results:
SQL> set echo on
SQL> set timing on
SQL> -- omitting "+" this is only a comment
SQL> select /* ORDERED */ GEM.PGNAME from
2 bas.pol_gemeinde GEM, wlk.wb_einzugsgebiet_geo GEO
3 where SDO_ANYINTERACT(gem.geometry,geo.geometry)='TRUE'
4 and GEO.objectid=24481 and geo.geometry is not null and
5 gem.geometry is not null;
PGNAME
Innsbruck
Götzens
Mutters
Elapsed: 00:00:00.07
SQL>
SQL> select /*+ ORDERED */ GEM.PGNAME from
2 bas.pol_gemeinde GEM, wlk.wb_einzugsgebiet_geo GEO
3 where SDO_ANYINTERACT(gem.geometry,geo.geometry)='TRUE'
4 and GEO.objectid=24481 and geo.geometry is not null and
5 gem.geometry is not null;
select /*+ ORDERED */ GEM.PGNAME from
ERROR at line 1:
ORA-13364: layer dimensionality does not match geometry dimensions
ORA-06512: at "MDSYS.SDO_3GL", line 4
ORA-06512: at "MDSYS.MD2", line 726
ORA-06512: at "MDSYS.SDO_3GL", line 115
ORA-06512: at "MDSYS.SDO_3GL", line 142
Elapsed: 00:00:00.04
SQL>
SQL> select /*+ ORDERED */ GEM.PGNAME from
2 wlk.wb_einzugsgebiet_geo GEO , bas.pol_gemeinde GEM
3 where SDO_ANYINTERACT(gem.geometry,geo.geometry)='TRUE'
4 and GEO.objectid=24481 and geo.geometry is not null and
5 gem.geometry is not null;
PGNAME
Innsbruck
Götzens
Mutters
Elapsed: 00:00:00.12
SQL>
The geometry-fields of both tables were checked by sdo_geom.validate_geometry_with_context. There were no errors.
We tested these queries with 10.2.0.1 and got no error.

Hi,
Some spatial operators have function-based implementations, so if the Oracle optimizer decides not to use the spatial index, the operator can complete successfully using the function-based implementation (which is usually very slow).
In this case, because of the order of the tables in the from clause (reverse of what they should be), you've told Oracle not to use the spatial index, and since there is a function-based implementation, Oracle will use it.
It looks like the function-based implementation won't let you join a 3d geometry with a 2d geometry.

Similar Messages

  • Error ORA-06502 When using function REPLACE in PL/SQL

    Hi,
    I have a PL/SQL procedure which gives error 'Error ORA-06502 When using function REPLACE in PL/SQL' when the string value is quite long (I noticed this with a string 9K in length)
    variable var_a is of type CLOB
    and the assignment statement where it gives the error is
    var_a := REPLACE(var_a, '^', ''',''');
    Can anyone please help!
    Thanks

    Even then that shouldn't do so:
    SQL> select overload, position, argument_name, data_type, in_out
      2  from all_arguments
      3  where package_name = 'STANDARD'
      4  and object_name = 'LPAD'
      5  order by 1,2
      6  /
    OVERLOAD   POSITION ARGUMENT_NAME                  DATA_TYPE                      IN_OUT
    1                 0                                VARCHAR2                       OUT
    1                 1 STR1                           VARCHAR2                       IN
    1                 2 LEN                            BINARY_INTEGER                 IN
    1                 3 PAD                            VARCHAR2                       IN
    2                 0                                VARCHAR2                       OUT
    2                 1 STR1                           VARCHAR2                       IN
    2                 2 LEN                            BINARY_INTEGER                 IN
    3                 0                                CLOB                           OUT
    3                 1 STR1                           CLOB                           IN
    3                 2 LEN                            NUMBER                         IN
    3                 3 PAD                            CLOB                           IN
    4                 0                                CLOB                           OUT
    4                 1 STR1                           CLOB                           IN
    4                 2 LEN                            NUMBER                         INI wonder what happened?

  • ORA-13364;  layer dimension issues

    I am having trouble creating a spatial index for a table of parcels. I run the following code:
    create index POLYS_sidx on POLYS(geometry)
    indextype is mdsys.spatial_index;
    commit;
    And get this error back:
    Error starting at line 2 in command:
    create index POLYS_sidx on POLYS(geometry)
    indextype is mdsys.spatial_index
    Error at Command Line:2 Column:13
    Error report:
    SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in spatial index: [mdrcrtxfergm]
    ORA-13249: Error in spatial index: [mdpridxtxfergm]
    ORA-13200: internal error [ROWID:AAADWaAABAAAKcyAAA] in spatial indexing.
    ORA-13206: internal error [] while creating the spatial index
    ORA-13364: layer dimensionality does not match geometry dimensions
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    29855. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine"
    *Cause:    Failed to successfully execute the ODCIIndexCreate routine.
    *Action:   Check to see if the routine has been coded correctly.
    commit succeeded.
    I have made sure the SRID is congruent in both the table and the metadata and I exported this data from Intergraph's GeoMedia to have no 3D coordinates. I can see from google searches that the layer is in two different dimensions. How can I query/update the record with an incongruent dimension? How can I isolate this problem? Any help would be great.
    Thanks,
    Tom

    Which version of Oracle are you running?
    What is your SRID (to double check since you have 2D and 3D data)?
    Is it possible to convert your 2D data into 3D data just by adding zeroes for the z-coordinates?
    thanks

  • Using Oracle OLE DB provider (with ADO) generates error: ORA-01843 while using date

    Were using OLE DB provider in order to connect to our Oracle 9i database. When executing the following query in a SQL Plus window I will get the correct results:
    SELECT gum_seu_syo_id, seu_userid, seu_first_name, seu_last_name
    From group_user_mapping, security_users
    Where gum_seu_syo_id = seu_syo_id
    and gum_term_date > '8/19/2002'
    and gum_seg_syo_id = 11
    However if will execute the same query from the our application (VB using ADO) I will get the following error:
    ORA-01843: Not a valid month
    Checking with our Oracle DBA we made sure my registry is correct and includes the correct format under HEKY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_HOME,
    where the key is NLS_DATE_FORMAT (of type REG_EXPAND_SZ) with the value:
    MM/DD/YYYY HH:MI:SS AM
    I also run the following query in a SQL Plus window:
    select sysdate from dual;
    and got the following result:
    08/19/2002 10:27:20 AM
    which shows that the data format is correct.
    Trying to switch between the month and day in the query (put '19/8/2002') worked from the application but generated ORA-01843: Not a valid month in the SQL Plus window.
    Any ideas?

    try using
    to_char function
    for eg.
    select * from emp where to_char(hiredate,'dd/mm/yy') > '20/3/83'.
    Jagriti

  • ORA-13364 Layer Dimensionality does not match geometry dimensions

    Hi!
    I tried to insert a LINE GEOMETRY to Oracle 10xe with java and get following error:
    CHWERWIEGEND: ORA-29875: Routine ODCIINDEXINSERT nicht erfolgreich ausgeführt
    ORA-13364: Ebenendimensionalität stimmt nicht mit Geometrie-Dimensionen überein
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_10I", Zeile 623
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_10I", Zeile 227
    org.hibernate.exception.GenericJDBCException: could not insert: [at.pcd.wam.technologie.persistence.model.GPSToursModel]
         at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
         at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:40)
         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)
         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)
         at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
         at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
         at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
         at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
         at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
         at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
         at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
         at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
         at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
         at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
         at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
         at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
         at $Proxy0.save(Unknown Source)
         at at.pcd.wam.technologie.persistence.db.GPSToursDB.insertGPSToursModel(GPSToursDB.java:52)
         at at.pcd.wam.technologie.batch.RunBatch.main(RunBatch.java:59)
    Caused by: java.sql.SQLException: ORA-29875: Routine ODCIINDEXINSERT nicht erfolgreich ausgeführt
    ORA-13364: Ebenendimensionalität stimmt nicht mit Geometrie-Dimensionen überein
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_10I", Zeile 623
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_10I", Zeile 227
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
         at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:33)
         ... 23 moreIf I try an insert with my plsqldeveloper it works but if i try it with java and hibernate I get the error above.
    INSERT INTO gps_tours (gt_geom) VALUES(
      SDO_GEOMETRY(
        2002,
        8307,
        NULL,
        SDO_ELEM_INFO_ARRAY(1,2,1), -- compound line string
        SDO_ORDINATE_ARRAY(10,10, 10,14, 6,10, 14,10)
    );I did a wrong insert to user_sdo_geom_metadata?
    --Tabelle erzeugen
    CREATE TABLE GPS_TOURS (
           GT_ID NUMBER(25,0) CONSTRAINT pk_gps_tour PRIMARY KEY,
           GT_TOUR_ID NUMBER(25,0),
           GT_TOUR_DESCRIPTION VARCHAR2(50),
           GT_START TIMESTAMP,
           GT_END TIMESTAMP,
           GT_GEOM MDSYS.SDO_GEOMETRY
    --Löschen bestehender Spatial Metadaten zu Tabelle Feature
    DELETE FROM USER_SDO_GEOM_METADATA
      WHERE TABLE_NAME = 'GPS_TOURS' AND COLUMN_NAME = 'GT_GEOM' ;
    --Aktualisieren der Spatial Metadaten für Tabelle Feature
    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
      VALUES ('GPS_TOURS', 'GT_GEOM',
        MDSYS.SDO_DIM_ARRAY
          (MDSYS.SDO_DIM_ELEMENT('X', -180.000000000, 180.000000000, 0.500000000),
           MDSYS.SDO_DIM_ELEMENT('Y', -90.000000000, 90.000000000, 0.500000000) 
         8307);
    --Erstellung des Spatial Indexes für Tabelle Feature
    CREATE INDEX gps_torus_sidx ON GPS_TOURS(GT_GEOM)
           INDEXTYPE IS mdsys.spatial_index;
    CREATE SEQUENCE GPS_TOURS_SEQ
           START WITH 1
           INCREMENT BY 1
           NOMAXVALUE;
    CREATE OR REPLACE TRIGGER GPS_TOURS_TRIGGER
           BEFORE INSERT ON GPS_TOURS
           FOR EACH ROW      
    BEGIN
               SELECT GPS_TOURS_SEQ.NEXTVAL INTO :NEW.GT_ID FROM DUAL;
    END;Message was edited by:
    yoda

    .

  • 7.3.4 to 8.1.7  ODMA ERROR : ORA-01552: CANNOT USE SYSTEM ROLLBACK

    Trying to upgrade an old 7.3.4 database running on Aix to 8.1.7 so I can get a compatible export file to allow me to take it to 10gR2.
    I have done some work to get the init.ora file configured with the proper values but the odma fails with the following error:
    drop table dual;
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01552: cannot use system rollback segment for non-system tablespace 'xxx'
    I have other rollback segments defined by my init.ora file and during a normal database startup they are online.
    When I run the 'odma' process it takes the database down and when it brings it up it only has the SYSTEM rollback segment online.
    I know this is an old configuration but anyone have any suggestions?
    I do have "audit_trail = none" in my init file.
    Update:
    Looks like to just do an exp/imp I don't need to worry about going through odma so I am just going to close this post.
    Edited by: user6445925 on 11-Apr-2013 15:23

    Looks like to just do an exp/imp I don't need to worry about going through odma so I am just going to close this post.

  • Oracle error ORA-00600 when using Oracle 10g and Sun One Web Server 6.1

    I have a java application that was running under Solaris 8 and Oracle 9i. I am trying to get it up and running on a new server that is configured with Solaris 9 and Oracle 10g. Whenever the application tries to connect to the database it receives the following error: ORA-00600 [ttcgcshnd-1][0]. My research indicates that this is an internal Oracle error that represents a low level unexpected condition. I have looked through my configuration for the Web Server and I have not been able to determine the cause of this problem. My DBA tells me that we have the latest patch installed for Oracle! Has anyone encountered this problem before? Any help would be greatly appreciated!

    If the problem is also present in a SWING app, i.e. outside the web server, then it is porbably something external to the webserver.
    I think you should ensure that the driver and database are compatible with each other. It is very likely that you need a new jdbc driver for the new database.
    download from here http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc101020.html
    try the ojdbc14.jar

  • Message error ORA-00936 when using JDBC adapter

    Hi all,
    I'm using the folow scenario:
    RFC --> XI --> JDBC
    RFC <-- XI <-- JDBC (response)
    It's a SYNCHRONOUS interface.
    RFC call without COMMIT WORK:
    CALL FUNCTION 'Y_TESTE_NEI'
        DESTINATION 'RFC_XI'
    EXPORTING
       DATE_FROM       =  v_data_from
       DATE_TO         =  v_data_to
      TABLES
        t_return        = t_dados.
    I'm not using KEY in JDBC message, because for test I want to get entiry table, and I set the communication channel JDBC to KEY not mandatory.
    I'm not having mapping error, in SXMB_MONI I can see the two messages of interface, but both with SYSTEM ERROR.
    In JDBC adapter in Runtime Workbench apears the follow message error:
    com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 't7_productionorder' (structure 't7_productionorder'): java.sql.SQLException: ORA-00936: missing expression
    And DUMP in function call in R/3: CALL_FUNCTION_REMOTE_ERROR
    Could anyone help me about this problem ?
    Thanks in advance.
    Regis Ferrato

    Hi Regis,
    I did the same scenario just now. The error you get is, you need to check whether the fields you are entering into the database have correct datatypes.
    Check out your database structure with your structure in XI, and also test in Message Mapping, to make sure you are sending correct values.
    In my case I was sending date like this '10-12-06', but my DB accepts only '101206'. So I removed the '-'. It was fine .
    The Dumping error is not due to your ABAP, due to the DB operation.
    Let me know Whether I am correct.
    Raj.

  • Error Ora-12500 when using dblink

    Hi all,
    I have a database that I can connect directly with no problem, but there's error when I try to connect to that db from another db by using dblink
    (Select * from someTab@link_name)
    The error is Ora-12500
    (Sure that tnsname.ora file is OK, I meant SID that using in dblink)
    What can I do to deal with this prob?
    Thank you!

    Mr_what wrote:
    Thank you guys! Of course I've known what Ora-12500 means, google is always the first thing I do when have to deal with any prob.Then you should have run across the cause of the problem..?
    The client (in this case, the PL/SQL code using the db-link) uses a TNS alias to connect to an Oracle Listener. Part of the TNS alias is specifying the database the client wants to connect to (e.g. using SID or SERVICE_NAME).
    The Listener confirms that it services this SID or service (it needs to be registered with the Listener). It then "+hands off+" the connection to that database. It can do this either as a dedicated or shared server process.
    In your case, your TNS connection does not request a shared server connection. So the Listener needs to provide a dedicated server to service your client connection. It does so by executing +$ORACLE_HOME/bin/oracle+ - using the settings for that registered database (which includes the +$ORACLE_HOME+ dir). It passes command line parameters to this process (typically +(LOCAL=NO)+ ), and other data via the call (such as the socket handle this oracle executable needs to use to communicate with your client session).
    This is the step that fails. The Listener fails to create this dedicated process. It uses a specific kernel call (differs from o/s to o/s) to create this dedicated server (a process on Linux/Unix, or thread on Windows). This call is usually what fails and results in the error you see on the client side.
    There can be a number of reasons why this failed. The usual two suspects are:
    - the kernel not allowing the Oracle o/s user to create more processes as it has reached it resource quota
    - invalid +$ORACLE_HOME+ and the call fails to load the bin/oracle executable process
    I would first eliminate these two as the cause of the problem. If it is not caused by these, then I would enable listener tracing and troubleshoot a connection that results in this error. There are various levels of diagnostics that can be enabled for tracing. At the lowest level one can trace the actual calls made by the listener, including the parameters values passed.

  • ORA-12032: cannot use rowid column

    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.
    PS :
    my script is :
    START WITH TO_DATE('06-jul-2010 17:57:48','dd-mon-yyyy hh24:mi:ss')
    NEXT SYSDATE+1/24

    user522961 wrote:
    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.run above
    EXECUTE DBMS_MVIEW.REFRESH('MV_NAME','C');

  • URGENT : ORA 302000 when using TEXT_IO.fopen

    Hi,
    I get this error ORA 302000 when using TEXT_IO package, the code I use is
    new_file:=text_io.fopen('c:\text.txt','r')
    i don't have the description of this ORA 302000 , pls does anyone have it?

    Hi,
    I know it's been 2 years but it's still up to date for me.
    I tried the suggested piece of code to trace the error but it did not bring anything more
    EXCEPTION
    When Others then
    srw.Message( 2, 'EXCEPTION ' || SQLCODE || ' in common package. Can not open the file ');
    IF SQLCODE = -302000 then
    LOOP
    EXIT WHEN TOOL_ERR.NERRORS = 0;
    SRW.MESSAGE( 667, TO_CHAR(TOOL_ERR.CODE) || ': ' || TOOL_ERR.MESSAGE);
    TOOL_ERR.POP;
    END LOOP;
    END IF;
    srw.Message( 3, 'EXCEPTION ' || SQLCODE || ' in com package. Can not open the file ' || I_Desname || ' : ' || SQLERRM );
    Only Message 2 and 3 are displayed in the trace file
    Any other suggestion?
    Manu

  • Creating view containing case statements received error ORA-22992

    We have a create view referencing table through dblink. The select statement in the create view has case statements, when running the Select statement alone, results are return. However, when executing the create view, it returns:
    SQL Error: ORA-22992: cannot use LOB locators selected from remote tables
    22992. 00000 - "cannot use LOB locators selected from remote tables"
    *Cause:    A remote LOB column cannot be referenced.
    *Action:   Remove references to LOBs in remote tables.
    One of the source table has LOB column but not in the select statement. The strange thing is when removing the case statement from the select, create view works fine. Can anybody tell me what caused the error and how to fix it?
    Create View Snippet:
    CREATE OR REPLACE VIEW "ABC"."XYZ" (....
    AS SELECT
    CASE
    WHEN A.OUTAGE =1
    THEN 'Y'
    ELSE 'N'
    END AS OUTAGE,
    FROM
    TABLEA@XXXX A
    LEFT JOIN TABLEB@XXXX B
    ON
    A.LOC =B.LO
    AND A.SITE =B.SITE
    WHERE
    A.CLASS ='CUSTOMER'
    AND A.PLUSSISGIS =1;

    What is your 4 digit Oracle version?
    Try rewriting the query to not use ANSI SQL92 joins. I found a link where this solved a problem similar to yours.
    DBLink problem ORA-22992
    >
    But, look at this curious thing: I re-write the query as follows:
    SELECT A.ID, A.ID_REF, A.EVENDATE, B.DESCRIPTION
    FROM A@ORCL A, B@ORCL B
    WHERE A.ID_REF = B.ID_REF;
    and it works fine... It seems like Oracle don't like the ANSI SQL92...
    >
    Several similar links by googling: 'SQL Error: ORA-22992'
    http://www.dbuggr.com/smallwei/solution-error-ora-22992-lob-locators-selected-remote-tabl/
    >
    Fixing ORA-22992 “cannot use LOB locators selected from remote tables” error
    You have migrated your Oracle 9i database to 10g and a distributed statement which worked fine in 9i now is getting error ORA-22992 “cannot use LOB locators selected from remote tables”. Even though the related remote table(s) does not contain any LOB column datatype.
    FIX:
    There is a bug on 9i,10g, and 11g that is related to this error. It is being fixed in 11.2. It can also be backported for previous 9i, 10g and 11g releases under the latest patchsets.
    You may also do a workaround as follow:
    Modify the affected SQL by adding the TO_CHAR function. For example:
    -- Original SQL:
    SELECT NVL2('a', 'b','c' ) FROM dual@remote_db;
    -- Modified SQL:
    SELECT TO_CHAR(NVL2('a','b','c')) FROM dual@remote_db;
    >
    See if that helps.

  • ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

    Hello All,
    I have an instance on my LAB server. To explore more avenues in cloning a DB I did the following.
    1. On my Oracle 10g Instance I fired an large query which would take atleast an hour to execute.
    2. Opened another session and executed shu ABORT to shutdown the above instance abruptly.
    3. Took backup of datafiles, archive logs and redologs [ prior to shu abort, I had issued ALTER DATABASE BACKUP CONTROLFILE TO TRACE]
    Restoration steps:
    NOMOUNT with pfile edited to hold the name of the new DB_NAME
    Create control file script edited to reflect the new paths of datafile and redologs.
    MOunted succesfully.
    ALTER DATABASE OPEN RESETLOGS;
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1:
    'F:\ORACLE\COLD_BACKUP_TRIAL\SET2\DATAFILE\DUPLISYSTEM_553LC8QX_.DBF'
    SQL> recover datafile 'F:\ORACLE\COLD_BACKUP_TRIAL\SET2\DATAFILE\DUPLISYSTEM_553LC8QX_.DBF';
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    SQL> recover database using backup controlfile;
    ORA-00279: change 2962256 generated at 09/03/2009 12:06:49 needed for thread 1
    ORA-00289: suggestion :
    F:\ORACLE\COLD_BACKUP_TRIAL\SET2\FLASH_RECOVERY_AREA\DUPLI\ARCHIVELOG\2009_09_23
    \O1_MF_1_2_%U_.ARC
    ORA-00280: change 2962256 for thread 1 is in sequence #2
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    F:\oracle\cold_backup_trial\SET2\ONLINELOG_BK\O1_MF_3_553LGCH3_.log
    ORA-00342: archived log does not have expected resetlogs SCN 2933995
    ORA-00334: archived log:
    'F:\ORACLE\COLD_BACKUP_TRIAL\SET2\ONLINELOG_BK\O1_MF_3_553LGCH3_.LOG'
    I didn't find the file it was suggesting so I tried many combinations of providing the right recovery file name :-- All the latest Archive logs and Redologs in my backup.
    Still the recovery is not successful. Please let me know how can I recover my DATABASE.
    Many thanks in advance.
    Regards,
    Valli

    Greetings,
    If I understood, you basically have a copy of a primary database and the redo log archives of this pretty same database, you have backed up the control file of this primary database, edited it pointing all paths of your datafiles to the new location but renaming the instance name.
    I am assuming that you have edited the first line of your control file to something like "CREATE CONTROLFILE SET DATABASE "DB02" RESETLOGS ARCHIVELOG", in this case are you sure that the redolog archives have not loose the sequence? In this case it will ask more and more archives and it will never end, take a look at the date and time of the thread that your instance is asking for recovery. Is your instance a production database? If it is NOT production and you are SURE that the database is completely recovered and is asking for redolog files that does not even exist you can try to add the ALLOWRESETLOGS_CORRUPTION=TRUE to your init.ora and open the db... This solution is not recommended and you should never use it on production instances... take this hint as a LAST effort to bring your db online.
    Regards,
    Bruno Carvalho

  • ORA-01589 must use RESETLOGS option for database open

    I am running 10.1.0 and the database went down and I have been trying to get it started again. I have worked through several errors but stuck on this one.
    When trying to run startup I get this error ORA-01589 must use RESETLOGS or NORESETLOGS option for database open.
    Thanks,
    Tim

    please try below steps:--
    SQL> select * from v$logfile;
    GROUP# STATUS TYPE MEMBER IS_
    4 ONLINE /restore-11/POS/posebu-db/corppos-data02/oradata/EBUPOSPR/redo4_01.log NO
    4 ONLINE /restore-11/POS/posebu-db/corppos-data01/oradata/EBUPOSPR/redo4_02.log NO
    3 ONLINE /restore-11/POS/posebu-db/corppos-data02/oradata/EBUPOSPR/redo3_01.log NO
    3 ONLINE /restore-11/POS/posebu-db/corppos-data01/oradata/EBUPOSPR/redo3_02.log NO
    2 ONLINE /restore-11/POS/posebu-db/corppos-index01/oradata/EBUPOSPR/redo2_01.log NO
    2 ONLINE /restore-11/POS/posebu-db/corppos-data02/oradata/EBUPOSPR/redo02_02.log NO
    1 ONLINE /restore-11/POS/posebu-db/corppos-data01/oradata/EBUPOSPR/redo1_01.log NO
    1 ONLINE /restore-11/POS/posebu-db/corppos-index01/oradata/EBUPOSPR/redo1_02.log NO
    8 rows selected.
    SQL> select * from v$log;
    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
    1 1 0 1073741824 2 YES UNUSED 0
    4 1 1 1073741824 2 NO CURRENT 7.6915E+12 21-SEP-11
    3 1 0 1073741824 2 YES UNUSED 0
    2 1 0 1073741824 2 YES UNUSED 0
    SQL> recover database until cancel using backup controlfile;
    ORA-00279: change 7691479663660 generated at 09/21/2011 05:10:48 needed for thread 1
    ORA-00289: suggestion : /restore-11/POS/posebu-db/corppos-archive01/EBUPOSPR/1_1_762412057.arc
    ORA-00280: change 7691479663660 for thread 1 is in sequence #1
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /restore-11/POS/posebu-db/corppos-data02/oradata/EBUPOSPR/redo4_01.log
    Log applied.
    Media recovery complete.
    SQL> select hxfil file_id, fhtnm tablespace_name from x$kcvfh;
    FILE_ID TABLESPACE_NAME
    1 SYSTEM
    2 UNDOTBS
    3 SYSAUX
    4 USERS
    SQL> select file#, checkpoint_change#, checkpoint_time, error from v$datafile_header;
    FILE# CHECKPOINT_CHANGE# CHECKPOIN ERROR
    1 7.6915E+12 21-SEP-11
    2 7.6915E+12 21-SEP-11
    3 7.6915E+12 21-SEP-11
    4 7.6915E+12 21-SEP-11
    SQL> col CHECKPOINT_CHANGE# for 9999999999999
    SQL> l
    1* select file#, checkpoint_change#, checkpoint_time, error from v$datafile_header
    SQL> /
    FILE# CHECKPOINT_CHANGE# CHECKPOIN ERROR
    1 7691479663749 21-SEP-11
    2 7691479663749 21-SEP-11
    3 7691479663749 21-SEP-11
    4 7691479663749 21-SEP-11
    SQL> select hxfil file_id, fhscn scn, fhthr thread, fhrba_seq sequence, fhsta status from x$kcvfh;
    FILE_ID SCN THREAD SEQUENCE STATUS
    1 7691479663749 1 1 8192
    2 7691479663749 1 1 0
    3 7691479663749 1 1 0
    4 7691479663749 1 1 0
    24 rows selected.
    SQL> select * from v$recover_file;
    no rows selected
    SQL> alter database open resetlogs;
    Database altered.
    +++++++++++++++++++++++++++++++++++++++++++++++++
    Best regards
    Shishir Tekade.

  • Help with circumvention of ORA-01472: cannot use connect by on view with ..

    Hi,
    Any help resolving the following would be v. helpful.
    The Aim
    Produce a hierarchical report of all users and the privileges they have via the various roles they are granted.
    The SQL
    select lpad(' ', level*2,' ')|| granted_role from (select grantee, granted_role
    from dba_role_privs
    union
    select role, granted_role
    from role_role_privs
    union
    select role, privilege
    from role_sys_privs
    union
    select 'All users', username
    from dba_users)
    start with grantee='All users'
    connect by prior granted_role = grantee;
    The error
    ORA-0147: cannot use connect by on view with DISTINCT, GROUP BY, etc.
    The database
    Oracle 8.1.7.4 (Yes I know ....)
    The Solution
    [Thanks in advance]

    What if you create a table first
    create table role_grants as
        select granted_role, grantee
           from (select grantee, granted_role
                   from dba_role_privs
                 union
                 select role, granted_role
                   from role_role_privs
                 union
                 select role, privilege
                   from role_sys_privs
                 union
                 select 'All users', username
                  from dba_users)
    Then run the hierarchical report
    select lpad(' ', level*2,' ')|| granted_role
       from role_grants
       start with grantee='All users'
       connect by prior granted_role = grantee

Maybe you are looking for