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

.

Similar Messages

  • Layer Dimensionality does not match geometry dimensions

    I am using a Oracle 9i instance and am try to insert a geometry using the following code but am getting an exception. Any help would be much appreciated.
                   conn = getConnection(Connection.TRANSACTION_SERIALIZABLE);
                   OracleConnection oracleConnection = unwrapOracleConnection(conn);
                   GeoPoint[] points = area.getPoints();
                   double[] ordinates = new double[points.length*2];
                   for (int i = 0, n = points.length; i < n; i++){
                        ordinates[( i * ( LONGITUDE_INDEX + 1 ) ) + i ] = points.getLongitude();
                        ordinates[( i + LATITUDE_INDEX + ( i * 1 ) ) ] = points[i].getLatitude();
                   geometry = JGeometry.createLinearPolygon(ordinates,JGeometry.GTYPE_MULTIPOLYGON,8192);
                   STRUCT struct = JGeometry.store(geometry,oracleConnection);
                   statement = oracleConnection.prepareStatement(query);
                   statement.setBigDecimal(AREA_INDEX,area.getAreaId());
                   statement.setString(NAME_INDEX,area.getAreaName());
                   statement.setString(SIC_INDEX,area.getSic());
                   statement.setObject(SHAPE_INDEX,struct);
                   statement.setString(DESCRIPTION_INDEX,area.getDescription());
                   statement.execute();
    ORA-29875: failed in the execution of the ODCIINDEXINSERT routine ORA-13364: Layer Dimensionality does not match geometry dimensions ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 319 ORA-06512: at line 1
    java.sql.SQLException: ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
    ORA-13364: Layer Dimensionality does not match geometry dimensions
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 319
    ORA-06512: at line 1

    If I change the following line of code:
    geometry = JGeometry.createLinearPolygon(ordinates,JGeometry.GTYPE_MULTIPOLYGON,8192);
    To:
    geometry = JGeometry.createLinearPolygon(new Object[]{ordinates},JGeometry.GTYPE_MULTIPOLYGON,8192);
    I get the following exception:
    RemoteException occurred in server thread; nested exception is: com.ibm.ejs.container.UncheckedException: ; nested exception is: java.lang.ArrayIndexOutOfBoundsException: -7
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         com.ibm.ejs.container.UncheckedException: ; nested exception is:
         java.lang.ArrayIndexOutOfBoundsException: -7
    com.ibm.ejs.container.UncheckedException: ; nested exception is:
         java.lang.ArrayIndexOutOfBoundsException: -7
    java.lang.ArrayIndexOutOfBoundsException: -7

  • 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.

  • 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

  • Error 'window SRID does not match layer SRID' despite using Index MBR

    Hey!
    I'm trying to run the following query:
    SELECT count(*)
    FROM mytable
    WHERE SDO_FILTER(geom, (SELECT sdo_root_mbr FROM user_sdo_index_metadata WHERE sdo_index_name='IDX_GEOM_MYTABLE') ,'querytype = WINDOW') = 'TRUE';
    The index I'm querying in the Subquery is the geometry index for mytable.geom, i.e. I'm doing a spatial query on IDX_GEOM_MYTABLE with it's own geometry index'es MBR. And I get this:
    "window SRID does not match layer SRID"
    How can that happen?
    Regards,
    Christian

    John's right. If I see correctly what you're trying to do you could also do this:
    SELECT count(*)
    FROM mytable
    WHERE SDO_FILTER(geom, SDO_TUNE.EXTENT_OF(mytable,my_SDO_column) ,'querytype = WINDOW') = 'TRUE';
    If the Index was built correctly and is not partitioned this should give you the same result.

  • Error: Window SRID does not match layer SRID (Spatial)

    Hi,
    I have successfully created an Oracle View with the following SQL:
    SELECT * FROM ZKGJI.L1100_CESTE c WHERE SDO_WITHIN_DISTANCE(c.GEOM, SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(425150,95800, 437400,105000)), 'distance=1') = 'TRUE';
    When trying to get the preview of the data of the created Oracle View, I am getting following:
    ORA-29902: error in executing ODCIIndexStart() routine ORA-13208: internal error while evaluating window SRID does not match layer SRID operator ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
    The SRID for the fo ZKGJI.L1100_CESTE is '5000000' in Oracle DBMS 11g. How can I set the SRID for the window in the above mentioned SQL?
    Dejan

    The solution SQL is
    SELECT * FROM ZKGJI.L1100_CESTE c WHERE SDO_WITHIN_DISTANCE(c.GEOM, SDO_GEOMETRY(2003, 5000000, NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(425150,95800, 437400,105000)), 'distance=1') = 'TRUE';

  • ORA-01504: database name 'DEV1' does not match parameter db_name 'PROD1'

    Hi, All -
    This is my first time cloning a database. The recovery finished but gave me the following error message. All the parameters in the pfile are set to "DEV1". I believe that the parameter db_name 'PROD1' exists in the control file and causing this error. The control file is under ASM.
    How can I change the parameter in the control file and bring the 'DEV1' cloned database up? Also, how can I avoid this issue next time I do a clone?
    Thanks in advance!
    Oracle 10g Release 2 on RHEL5
    Database cloning using RMAN Duplicate > ORA-01504: database name 'DEV1' does not match parameter db_name 'PROD1'
    ASMCMD> ls
    control01.ctl
    current.275.729098001
    archive log filename=/u001/dbsvr/dev1/1_131706_653848580.dbf recid=59 stamp=741953991
    media recovery complete, elapsed time: 00:09:31
    *Finished recover at 01-FEB-11*
    contents of Memory Script:
       shutdown clone;
       startup clone nomount ;
    executing Memory Script
    database dismounted
    Oracle instance shut down
    connected to auxiliary database (not started)
    Oracle instance started
    Total System Global Area     725614592 bytes
    Fixed Size                     2075592 bytes
    Variable Size                448791608 bytes
    Database Buffers             268435456 bytes
    Redo Buffers                   6311936 bytes
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DEV1" RESETLOGS ARCHIVELOG
      MAXLOGFILES     50
      MAXLOGMEMBERS      5
      MAXDATAFILES      100
      MAXINSTANCES     1
      MAXLOGHISTORY     5445
    LOGFILE
      GROUP  1 '+DATA3/dev1/datafile/redo01.log' SIZE 100 M ,
      GROUP  2 '+DATA3/dev1/datafile/redo02.log' SIZE 100 M ,
      GROUP  3 '+DATA3/dev1/datafile/redo03.log' SIZE 100 M
    DATAFILE
      '+DATA3/dev1/datafile/system01.dbf'
    CHARACTER SET WE8ISO8859P1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 02/01/2011 10:30:17
    RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
    ORA-01504: database name 'DEV1' does not match parameter db_name 'PROD1'
    RMAN>
    RMAN> **end-of-file**
    RMAN>

    Respected, Sybrand Bakker -
    Thanks for constructive feedback!
    Here are the command that I ran.
    RMAN> connect target sys/<password>@PROD1
    connected to target database: PROD1 (DBID=556212836)
    RMAN> connect auxiliary sys/<password>
    connected to auxiliary database: DEV1 (not mounted)
    RMAN> @rman_dup.sql
    rman_dup.sql contains
    run {
        allocate auxiliary channel d1 type disk;
    set newname for datafile 1 to '+DATA3/dev/datafile/system01.dbf';
    set newname for datafile 2 to '+DATA3/dev/datafile/undotbs01.dbf';
    set newname for datafile 3 to '+DATA3/dev/datafile/cwmlite01.dbf';
    set newname for datafile 4 to '+DATA3/dev/datafile/drsys01.dbf';
    set newname for datafile 5 to '+DATA3/dev/datafile/example01.dbf';
    set newname for datafile 6 to '+DATA3/dev/datafile/indx01.dbf';
    set newname for datafile 7 to '+DATA3/dev/datafile/odm01.dbf';
    set newname for datafile 8 to '+DATA3/dev/datafile/tools01.dbf';
    set newname for datafile 9 to '+DATA3/dev/datafile/users01.dbf';
    set newname for datafile 10 to '+DATA3/dev/datafile/xdb01.dbf';
    set newname for datafile 11 to '+DATA3/dev/datafile/cons01.dbf';
    set newname for datafile 12 to '+DATA3/dev/datafile/survey01.dbf';
    set newname for datafile 13 to '+DATA3/dev/datafile/mem201.dbf';
    set newname for datafile 14 to '+DATA3/dev/datafile/cons02.dbf';
    set newname for datafile 15 to '+DATA3/dev/datafile/mem202.dbf';
    set newname for datafile 16 to '+DATA3/dev/datafile/cater01.dbf';
    set newname for datafile 17 to '+DATA3/dev/datafile/users02.dbf';
    set newname for datafile 18 to '+DATA3/dev/datafile/mar_data01.dbf';
    set newname for datafile 19 to '+DATA3/dev/datafile/sysaux01.dbf';
    set newname for datafile 20 to '+DATA3/dev/datafile/streams_tbs_01.dbf';
    set newname for datafile 21 to '+DATA3/dev/datafile/users03.dbf';
    set newname for tempfile 1 to '+DATA3/dev1/tempfile/temp01.dbf';
      duplicate target database to dev1
      until scn 48712532746
      logfile
       '+DATA3/dev1/datafile/redo01.log' size 100M,
       '+DATA3/dev1/datafile/redo02.log' size 100M,
       '+DATA3/dev1/datafile/redo03.log' size 100M;
    }Edited by: CipherDBA on Feb 3, 2011 10:50 AM

  • SQL LOADER and ORA-01861: literal does not match format string

    Hi,
    I've to load data through control_file(.ctl) into oracle table through sqlldr. Oracle 11g, win xp.
    as soon as I use - sqlldr dss/dss control=orders.ctl I get error or nothing.
    Text file that is generated after loading fails has the following error.
    Record 1: Rejected - Error on table ORDERS, column O_ORDERDATE.
    ORA-01861: literal does not match format string
    I have checked the format of data to be loaded into Orders table is like this : *1996-01-02.*
    I checked the format of data in my database by querying sysdate from dual i.e. 10-JAN-10
    I thought that changing its format might solve my problem so i tried this:
    SQL> alter session set nls_date_format='YYYY-MM-DD';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    2010-01-10but still i'm getting the same error. I've to load millions of data. how I can solve this issue.
    Please suggest.
    Thanks alot.
    Best Regads,
    Kam

    Hi,
    It's strange ....nobody knew it?. I think this type of load problem will be very common isn't it.... where date column data is in a different format than in the db i.e.
    How to change *1996-01-02* in the Control_file to make it able to load in the table where sysdate is like this: *11-JAN-10*
    Sample data to be loaded is :
    1|36901|O|173665.47|1996-01-02|5-LOW|Clerk#000000951|0|nstructions sleep furiously among |
    Desc Orders
    O_ORDERDATE NOT NULL DATEI have tested this by creating a test table and a test control file by omitting this O_ORDERDATE and then everything was fine, data was inserted but don't know how to load this DATE also.
    Also not able to understand about POSITION in the control file...?
    Regards,
    Kam

  • SQL Error: ORA-01861: literal does not match format string

    Hello,
    I'm trying to do data mining on a web log which recorded one day web access information from a busy web server. I imported the data into Oracle Data miner, and created a table (WEBLOG). The idea is to create a new field, i.e. session, for the users so that each session could be thought as a representative of a user-intent (aka topic). Now based on this, data mining models would be used to cluster(group) the users based on their similarity. The first step is to prepare the data which involves using SQL queries. So first, all I did was to create a function for date and time. This is the following code I used,
    create or replace function ssndate(p_date in varchar2 default '03-01-18',
    p_time in varchar2)
    return number
    $if dbms_db_version.ver_le_10 $then
    deterministic
    $elsif dbms_db_version.ver_le_11 $then
    result_cache
    $end
    as
    begin
    return trunc((to_date(p_date||' '||p_time, 'dd-mm-yy hh24:mi:ss')
    - to_date('01-01-90','dd-mm-yy')) * (86400/2400));
    end ssndate;
    The function ssndate compiled successfully.
    The next step I took was to create a view through the following query,
    create or replace view WEBLOG_VIEWS
    as
    select (select ssndate(LOG_DATE, LOG_TIME) from dual) as "SESSION_DT",
    C_IP,
    CS_USER_AGENT,
    (CS_URI_STEM||'?'||CS_URI_QUERY) as WEB_LINK
    from WEBLOG;
    This was successful as well. The problem is in the next step where I try to do data grouping.
    create table FINAL_WEBLOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    For this, I got the error,
    Error starting at line 1 in command:
    create table FINAL_LOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    Error at Command Line:1 Column:7
    Error report:
    SQL Error: ORA-01861: literal does not match format string
    ORA-06512: at "DMUSER.SSNDATE", line 11
    ORA-06512: at line 1
    01861. 00000 - "literal does not match format string"
    *Cause:    Literals in the input must be the same length as literals in
    the format string (with the exception of leading whitespace).
    If the "FX" modifier has been toggled on, the literal must
    match exactly, with no extra whitespace.
    *Action:   Correct the format string to match the literal.
    I don't know where I'm going wrong with this.. the to_date function should be fine. In the data that I possess, the date and time are in no format. Example: 30118 and 0:00:09 respectively. If anyone has any clue about this I would be sincerely grateful for any help that I can get!! It's quite urgent..
    The Oracle version is 11.2.0.1.0
    Edited by: 975265 on Dec 5, 2012 5:31 PM

    975265 wrote:
    Ok.. Looks like I touched a nerve there. I apologize. I'm still a student, and this is the first time that I've tried something at this level. I'm still in the learning process, so I was hoping that someone could point me in the right direction in order to "fix" the data.Not so much touching a nerve as simply trying to implement a very very poor, but all too common, practice. Since you are a student (which we didn't know until this post) most people will cut you some slack. However, this little exchange should now be burned into your brain as you move forward. One of the very first rules of programming is to ALWAYS use the correct data types for your data. And along with that, never ever depend on implicit type conversions - always use the proper explicit conversion functions.
    And as a slight follow-on, when considering the appropriate data type, don't assume that just because we refer to a given element as a 'something number' that it is indeed a number. Telephone "numbers" are NOT numbers. U.S. Social Security "numbers" are NOT numbers. U.S. Postal Zip codes are NOT numbers. All are just character strings which, by convention, we limit to the same characters we use to represent numbers.
    And since this entire discussion came up around the representation of dates, you might want to take a look at http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/
    Now, go forth and be a smarter programmer than your peers.
    Edited by: EdStevens on Dec 6, 2012 6:12 AM

  • ORA-01161: database name DEV in file header does not match given name UAT

    This is my cloning process.... I get the following errors.. I also double check with my process and still couldn't find anything.
    SQL> @backup_control.sql
    ORACLE instance started.
    Total System Global Area  479298392 bytes
    Fixed Size                   742232 bytes
    Variable Size             385875968 bytes
    Database Buffers           81920000 bytes
    Redo Buffers               10760192 bytes
    CREATE CONTROLFILE REUSE DATABASE "UAT" NORESETLOGS  ARCHIVELOG
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01161: database name OBS in file header does not match given name of UAT
    ORA-01110: data file 1: '/u01/oracle/uatdata/system01.dbf'
    Any ideas of this error?
    Best Regards,
    Amy

    Please see followings:
    STARTUP NOMOUNT
    CREATE CONTROLFILE SET DATABASE "OBS" RESETLOGS ARCHIVELOG
    -- SET STANDBY TO MAXIMIZE PERFORMANCE
    MAXLOGFILES 16
    MAXLOGMEMBERS 2
    MAXDATAFILES 500
    MAXINSTANCES 1
    MAXLOGHISTORY 2042
    LOGFILE
    GROUP 1 '/u01/oracle/obsdata/log01a.dbf' SIZE 10M,
    GROUP 2 '/u01/oracle/obsdata/log02a.dbf' SIZE 10M,
    GROUP 3 '/u01/oracle/obsdata/log03a.dbf' SIZE 10M,
    GROUP 4 '/u01/oracle/obsdata/log04a.dbf' SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
    '/u01/oracle/obsdata/system01.dbf',
    '/u01/oracle/obsdata/system02.dbf',
    '/u01/oracle/obsdata/system03.dbf',
    '/u01/oracle/obsdata/system04.dbf',
    '/u01/oracle/obsdata/system05.dbf',
    '/u01/oracle/obsdata/rbs01.dbf',
    '/u01/oracle/obsdata/ctxd01.dbf',
    '/u01/oracle/obsdata/owad01.dbf',
    '/u01/oracle/obsdata/abmd01.dbf',
    '/u01/oracle/obsdata/abmx01.dbf',
    '/u01/oracle/obsdata/akd01.dbf',
    '/u01/oracle/obsdata/akx01.dbf',
    '/u01/oracle/obsdata/alrd01.dbf',
    '/u01/oracle/obsdata/alrx01.dbf',
    '/u01/oracle/obsdata/amsd01.dbf',
    '/u01/oracle/obsdata/amsx01.dbf',
    '/u01/oracle/obsdata/amvd01.dbf',
    '/u01/oracle/obsdata/amvx01.dbf',
    '/u01/oracle/obsdata/apd01.dbf',
    '/u01/oracle/obsdata/apx01.dbf',
    '/u01/oracle/obsdata/applsysd01.dbf',
    '/u01/oracle/obsdata/applsysx01.dbf',
    '/u01/oracle/obsdata/ard01.dbf',
    '/u01/oracle/obsdata/arx01.dbf',
    '/u01/oracle/obsdata/asfd01.dbf',
    '/u01/oracle/obsdata/asfx01.dbf',
    '/u01/oracle/obsdata/asgd01.dbf',
    '/u01/oracle/obsdata/asgx01.dbf',
    '/u01/oracle/obsdata/asod01.dbf',
    '/u01/oracle/obsdata/asox01.dbf',
    '/u01/oracle/obsdata/astd01.dbf',
    '/u01/oracle/obsdata/astx01.dbf',
    '/u01/oracle/obsdata/axd01.dbf',
    '/u01/oracle/obsdata/axx01.dbf',
    '/u01/oracle/obsdata/azd01.dbf',
    '/u01/oracle/obsdata/azx01.dbf',
    '/u01/oracle/obsdata/bend01.dbf',
    '/u01/oracle/obsdata/benx01.dbf',
    '/u01/oracle/obsdata/bicd01.dbf',
    '/u01/oracle/obsdata/bicx01.dbf',
    '/u01/oracle/obsdata/bild01.dbf',
    '/u01/oracle/obsdata/bilx01.dbf',
    '/u01/oracle/obsdata/bimd01.dbf',
    '/u01/oracle/obsdata/bimx01.dbf',
    '/u01/oracle/obsdata/bisd01.dbf',
    '/u01/oracle/obsdata/bisx01.dbf',
    '/u01/oracle/obsdata/bixd01.dbf',
    '/u01/oracle/obsdata/bixx01.dbf',
    '/u01/oracle/obsdata/bomd01.dbf',
    '/u01/oracle/obsdata/bomx01.dbf',
    '/u01/oracle/obsdata/bscd01.dbf',
    '/u01/oracle/obsdata/bscx01.dbf',
    '/u01/oracle/obsdata/cctd01.dbf',
    '/u01/oracle/obsdata/cctx01.dbf',
    '/u01/oracle/obsdata/ced01.dbf',
    '/u01/oracle/obsdata/cex01.dbf',
    '/u01/oracle/obsdata/cnd01.dbf',
    '/u01/oracle/obsdata/cnx01.dbf',
    '/u01/oracle/obsdata/crpd01.dbf',
    '/u01/oracle/obsdata/crpx01.dbf',
    '/u01/oracle/obsdata/csd01.dbf',
    '/u01/oracle/obsdata/csx01.dbf',
    '/u01/oracle/obsdata/cscd01.dbf',
    '/u01/oracle/obsdata/cscx01.dbf',
    '/u01/oracle/obsdata/csdd01.dbf',
    '/u01/oracle/obsdata/csdx01.dbf',
    '/u01/oracle/obsdata/csfd01.dbf',
    '/u01/oracle/obsdata/csfx01.dbf',
    '/u01/oracle/obsdata/cspd01.dbf',
    '/u01/oracle/obsdata/cspx01.dbf',
    '/u01/oracle/obsdata/csrd01.dbf',
    '/u01/oracle/obsdata/csrx01.dbf',
    '/u01/oracle/obsdata/cssd01.dbf',
    '/u01/oracle/obsdata/cssx01.dbf',
    '/u01/oracle/obsdata/cuad01.dbf',
    '/u01/oracle/obsdata/cuax01.dbf',
    '/u01/oracle/obsdata/cufd01.dbf',
    '/u01/oracle/obsdata/cufx01.dbf',
    '/u01/oracle/obsdata/cuid01.dbf',
    '/u01/oracle/obsdata/cuix01.dbf',
    '/u01/oracle/obsdata/cund01.dbf',
    '/u01/oracle/obsdata/cunx01.dbf',
    '/u01/oracle/obsdata/cupd01.dbf',
    '/u01/oracle/obsdata/cupx01.dbf',
    '/u01/oracle/obsdata/cusd01.dbf',
    '/u01/oracle/obsdata/cusx01.dbf',
    '/u01/oracle/obsdata/czd01.dbf',
    '/u01/oracle/obsdata/czx01.dbf',
    '/u01/oracle/obsdata/eaad01.dbf',
    '/u01/oracle/obsdata/eaax01.dbf',
    '/u01/oracle/obsdata/ecd01.dbf',
    '/u01/oracle/obsdata/ecx01.dbf',
    '/u01/oracle/obsdata/ecxd01.dbf',
    '/u01/oracle/obsdata/ecxx01.dbf',
    '/u01/oracle/obsdata/engd01.dbf',
    '/u01/oracle/obsdata/engx01.dbf',
    '/u01/oracle/obsdata/evmd01.dbf',
    '/u01/oracle/obsdata/evmx01.dbf',
    '/u01/oracle/obsdata/fad01.dbf',
    '/u01/oracle/obsdata/fax01.dbf',
    '/u01/oracle/obsdata/femd01.dbf',
    '/u01/oracle/obsdata/femx01.dbf',
    '/u01/oracle/obsdata/fiid01.dbf',
    '/u01/oracle/obsdata/fiix01.dbf',
    '/u01/oracle/obsdata/flmd01.dbf',
    '/u01/oracle/obsdata/flmx01.dbf',
    '/u01/oracle/obsdata/fptd01.dbf',
    '/u01/oracle/obsdata/fptx01.dbf',
    '/u01/oracle/obsdata/frmd01.dbf',
    '/u01/oracle/obsdata/frmx01.dbf',
    '/u01/oracle/obsdata/fvd01.dbf',
    '/u01/oracle/obsdata/fvx01.dbf',
    '/u01/oracle/obsdata/gld01.dbf',
    '/u01/oracle/obsdata/glx01.dbf',
    '/u01/oracle/obsdata/gmad01.dbf',
    '/u01/oracle/obsdata/gmax01.dbf',
    '/u01/oracle/obsdata/gmdd01.dbf',
    '/u01/oracle/obsdata/gmdx01.dbf',
    '/u01/oracle/obsdata/gmed01.dbf',
    '/u01/oracle/obsdata/gmex01.dbf',
    '/u01/oracle/obsdata/gmfd01.dbf',
    '/u01/oracle/obsdata/gmfx01.dbf',
    '/u01/oracle/obsdata/gmid01.dbf',
    '/u01/oracle/obsdata/gmix01.dbf',
    '/u01/oracle/obsdata/gmld01.dbf',
    '/u01/oracle/obsdata/gmlx01.dbf',
    '/u01/oracle/obsdata/gmpd01.dbf',
    '/u01/oracle/obsdata/gmpx01.dbf',
    '/u01/oracle/obsdata/gmsd01.dbf',
    '/u01/oracle/obsdata/gmsx01.dbf',
    '/u01/oracle/obsdata/grd01.dbf',
    '/u01/oracle/obsdata/grx01.dbf',
    '/u01/oracle/obsdata/hrd01.dbf',
    '/u01/oracle/obsdata/hrx01.dbf',
    '/u01/oracle/obsdata/hrid01.dbf',
    '/u01/oracle/obsdata/hrix01.dbf',
    '/u01/oracle/obsdata/hxcd01.dbf',
    '/u01/oracle/obsdata/hxcx01.dbf',
    '/u01/oracle/obsdata/hxtd01.dbf',
    '/u01/oracle/obsdata/hxtx01.dbf',
    '/u01/oracle/obsdata/ibad01.dbf',
    '/u01/oracle/obsdata/ibax01.dbf',
    '/u01/oracle/obsdata/ibed01.dbf',
    '/u01/oracle/obsdata/ibex01.dbf',
    '/u01/oracle/obsdata/ibpd01.dbf',
    '/u01/oracle/obsdata/ibpx01.dbf',
    '/u01/oracle/obsdata/ibud01.dbf',
    '/u01/oracle/obsdata/ibux01.dbf',
    '/u01/oracle/obsdata/ibyd01.dbf',
    '/u01/oracle/obsdata/ibyx01.dbf',
    '/u01/oracle/obsdata/icxd01.dbf',
    '/u01/oracle/obsdata/icxx01.dbf',
    '/u01/oracle/obsdata/iebd01.dbf',
    '/u01/oracle/obsdata/iebx01.dbf',
    '/u01/oracle/obsdata/iemd01.dbf',
    '/u01/oracle/obsdata/iemx01.dbf',
    '/u01/oracle/obsdata/ieod01.dbf',
    '/u01/oracle/obsdata/ieox01.dbf',
    '/u01/oracle/obsdata/iesd01.dbf',
    '/u01/oracle/obsdata/iesx01.dbf',
    '/u01/oracle/obsdata/ieud01.dbf',
    '/u01/oracle/obsdata/ieux01.dbf',
    '/u01/oracle/obsdata/iexd01.dbf',
    '/u01/oracle/obsdata/iexx01.dbf',
    '/u01/oracle/obsdata/igcd01.dbf',
    '/u01/oracle/obsdata/igcx01.dbf',
    '/u01/oracle/obsdata/igfd01.dbf',
    '/u01/oracle/obsdata/igfx01.dbf',
    '/u01/oracle/obsdata/igsd01.dbf',
    '/u01/oracle/obsdata/igsx01.dbf',
    '/u01/oracle/obsdata/igwd01.dbf',
    '/u01/oracle/obsdata/igwx01.dbf',
    '/u01/oracle/obsdata/invd01.dbf',
    '/u01/oracle/obsdata/invx01.dbf',
    '/u01/oracle/obsdata/ipad01.dbf',
    '/u01/oracle/obsdata/ipax01.dbf',
    '/u01/oracle/obsdata/iscd01.dbf',
    '/u01/oracle/obsdata/iscx01.dbf',
    '/u01/oracle/obsdata/jad01.dbf',
    '/u01/oracle/obsdata/jax01.dbf',
    '/u01/oracle/obsdata/jed01.dbf',
    '/u01/oracle/obsdata/jex01.dbf',
    '/u01/oracle/obsdata/jgd01.dbf',
    '/u01/oracle/obsdata/jgx01.dbf',
    '/u01/oracle/obsdata/jld01.dbf',
    '/u01/oracle/obsdata/jlx01.dbf',
    '/u01/oracle/obsdata/jtfd01.dbf',
    '/u01/oracle/obsdata/jtfx01.dbf',
    '/u01/oracle/obsdata/med01.dbf',
    '/u01/oracle/obsdata/mex01.dbf',
    '/u01/oracle/obsdata/mfgd01.dbf',
    '/u01/oracle/obsdata/mfgx01.dbf',
    '/u01/oracle/obsdata/mrpd01.dbf',
    '/u01/oracle/obsdata/mrpx01.dbf',
    '/u01/oracle/obsdata/mscd01.dbf',
    '/u01/oracle/obsdata/mscx01.dbf',
    '/u01/oracle/obsdata/msdd01.dbf',
    '/u01/oracle/obsdata/msdx01.dbf',
    '/u01/oracle/obsdata/msod01.dbf',
    '/u01/oracle/obsdata/msox01.dbf',
    '/u01/oracle/obsdata/mwad01.dbf',
    '/u01/oracle/obsdata/mwax01.dbf',
    '/u01/oracle/obsdata/oed01.dbf',
    '/u01/oracle/obsdata/oex01.dbf',
    '/u01/oracle/obsdata/okcd01.dbf',
    '/u01/oracle/obsdata/okcx01.dbf',
    '/u01/oracle/obsdata/oked01.dbf',
    '/u01/oracle/obsdata/okex01.dbf',
    '/u01/oracle/obsdata/oksd01.dbf',
    '/u01/oracle/obsdata/oksx01.dbf',
    '/u01/oracle/obsdata/okxd01.dbf',
    '/u01/oracle/obsdata/okxx01.dbf',
    '/u01/oracle/obsdata/ontd01.dbf',
    '/u01/oracle/obsdata/ontx01.dbf',
    '/u01/oracle/obsdata/opid01.dbf',
    '/u01/oracle/obsdata/opix01.dbf',
    '/u01/oracle/obsdata/osmd01.dbf',
    '/u01/oracle/obsdata/osmx01.dbf',
    '/u01/oracle/obsdata/otad01.dbf',
    '/u01/oracle/obsdata/otax01.dbf',
    '/u01/oracle/obsdata/ozfd01.dbf',
    '/u01/oracle/obsdata/ozfx01.dbf',
    '/u01/oracle/obsdata/ozpd01.dbf',
    '/u01/oracle/obsdata/ozpx01.dbf',
    '/u01/oracle/obsdata/ozsd01.dbf',
    '/u01/oracle/obsdata/ozsx01.dbf',
    '/u01/oracle/obsdata/pad01.dbf',
    '/u01/oracle/obsdata/pax01.dbf',
    '/u01/oracle/obsdata/pjmd01.dbf',
    '/u01/oracle/obsdata/pjmx01.dbf',
    '/u01/oracle/obsdata/pmid01.dbf',
    '/u01/oracle/obsdata/pmix01.dbf',
    '/u01/oracle/obsdata/pnd01.dbf',
    '/u01/oracle/obsdata/pnx01.dbf',
    '/u01/oracle/obsdata/pod01.dbf',
    '/u01/oracle/obsdata/pox01.dbf',
    '/u01/oracle/obsdata/poad01.dbf',
    '/u01/oracle/obsdata/poax01.dbf',
    '/u01/oracle/obsdata/pomd01.dbf',
    '/u01/oracle/obsdata/pomx01.dbf',
    '/u01/oracle/obsdata/psad01.dbf',
    '/u01/oracle/obsdata/psax01.dbf',
    '/u01/oracle/obsdata/psbd01.dbf',
    '/u01/oracle/obsdata/psbx01.dbf',
    '/u01/oracle/obsdata/pspd01.dbf',
    '/u01/oracle/obsdata/pspx01.dbf',
    '/u01/oracle/obsdata/qad01.dbf',
    '/u01/oracle/obsdata/qax01.dbf',
    '/u01/oracle/obsdata/qpd01.dbf',
    '/u01/oracle/obsdata/qpx01.dbf',
    '/u01/oracle/obsdata/rgd01.dbf',
    '/u01/oracle/obsdata/rgx01.dbf',
    '/u01/oracle/obsdata/rhxd01.dbf',
    '/u01/oracle/obsdata/rhxx01.dbf',
    '/u01/oracle/obsdata/rlad01.dbf',
    '/u01/oracle/obsdata/rlax01.dbf',
    '/u01/oracle/obsdata/rlmd01.dbf',
    '/u01/oracle/obsdata/rlmx01.dbf',
    '/u01/oracle/obsdata/sspd01.dbf',
    '/u01/oracle/obsdata/sspx01.dbf',
    '/u01/oracle/obsdata/vead01.dbf',
    '/u01/oracle/obsdata/veax01.dbf',
    '/u01/oracle/obsdata/vehd01.dbf',
    '/u01/oracle/obsdata/vehx01.dbf',
    '/u01/oracle/obsdata/wipd01.dbf',
    '/u01/oracle/obsdata/wipx01.dbf',
    '/u01/oracle/obsdata/wmsd01.dbf',
    '/u01/oracle/obsdata/wmsx01.dbf',
    '/u01/oracle/obsdata/wpsd01.dbf',
    '/u01/oracle/obsdata/wpsx01.dbf',
    '/u01/oracle/obsdata/wshd01.dbf',
    '/u01/oracle/obsdata/wshx01.dbf',
    '/u01/oracle/obsdata/wsmd01.dbf',
    '/u01/oracle/obsdata/wsmx01.dbf',
    '/u01/oracle/obsdata/xdpd01.dbf',
    '/u01/oracle/obsdata/xdpx01.dbf',
    '/u01/oracle/obsdata/xlad01.dbf',
    '/u01/oracle/obsdata/xlax01.dbf',
    '/u01/oracle/obsdata/xncd01.dbf',
    '/u01/oracle/obsdata/xncx01.dbf',
    '/u01/oracle/obsdata/xnmd01.dbf',
    '/u01/oracle/obsdata/xnmx01.dbf',
    '/u01/oracle/obsdata/xnpd01.dbf',
    '/u01/oracle/obsdata/xnpx01.dbf',
    '/u01/oracle/obsdata/xnsd01.dbf',
    '/u01/oracle/obsdata/xnsx01.dbf',
    '/u01/oracle/obsdata/xtrd01.dbf',
    '/u01/oracle/obsdata/xtrx01.dbf',
    '/u01/oracle/obsdata/applsysd02.dbf',
    '/u01/oracle/obsdata/applsysx02.dbf',
    '/u01/oracle/obsdata/asld01.dbf',
    '/u01/oracle/obsdata/aslx01.dbf',
    '/u01/oracle/obsdata/pvd01.dbf',
    '/u01/oracle/obsdata/pvx01.dbf',
    '/u01/oracle/obsdata/system06.dbf',
    '/u01/oracle/obsdata/itgd01.dbf',
    '/u01/oracle/obsdata/itgx01.dbf',
    '/u01/oracle/obsdata/ipdd01.dbf',
    '/u01/oracle/obsdata/ipdx01.dbf',
    '/u01/oracle/obsdata/eamd01.dbf',
    '/u01/oracle/obsdata/eamx01.dbf',
    '/u01/oracle/obsdata/enid01.dbf',
    '/u01/oracle/obsdata/enix01.dbf',
    '/u01/oracle/obsdata/okrd01.dbf',
    '/u01/oracle/obsdata/okrx01.dbf',
    '/u01/oracle/obsdata/cued01.dbf',
    '/u01/oracle/obsdata/cuex01.dbf',
    '/u01/oracle/obsdata/fted01.dbf',
    '/u01/oracle/obsdata/ftex01.dbf',
    '/u01/oracle/obsdata/msrd01.dbf',
    '/u01/oracle/obsdata/msrx01.dbf',
    '/u01/oracle/obsdata/igid01.dbf',
    '/u01/oracle/obsdata/igix01.dbf',
    '/u01/oracle/obsdata/portal01.dbf',
    '/u01/oracle/obsdata/ahld01.dbf',
    '/u01/oracle/obsdata/ahlx01.dbf',
    '/u01/oracle/obsdata/ahmd01.dbf',
    '/u01/oracle/obsdata/ahmx01.dbf',
    '/u01/oracle/obsdata/aspd01.dbf',
    '/u01/oracle/obsdata/aspx01.dbf',
    '/u01/oracle/obsdata/bivd01.dbf',
    '/u01/oracle/obsdata/bivx01.dbf',
    '/u01/oracle/obsdata/csed01.dbf',
    '/u01/oracle/obsdata/csex01.dbf',
    '/u01/oracle/obsdata/csid01.dbf',
    '/u01/oracle/obsdata/csix01.dbf',
    '/u01/oracle/obsdata/csld01.dbf',
    '/u01/oracle/obsdata/cslx01.dbf',
    '/u01/oracle/obsdata/cugd01.dbf',
    '/u01/oracle/obsdata/cugx01.dbf',
    '/u01/oracle/obsdata/iecd01.dbf',
    '/u01/oracle/obsdata/iecx01.dbf',
    '/u01/oracle/obsdata/imcd01.dbf',
    '/u01/oracle/obsdata/imcx01.dbf',
    '/u01/oracle/obsdata/imtd01.dbf',
    '/u01/oracle/obsdata/imtx01.dbf',
    '/u01/oracle/obsdata/jtmd01.dbf',
    '/u01/oracle/obsdata/jtmx01.dbf',
    '/u01/oracle/obsdata/jtsd01.dbf',
    '/u01/oracle/obsdata/jtsx01.dbf',
    '/u01/oracle/obsdata/okbd01.dbf',
    '/u01/oracle/obsdata/okbx01.dbf',
    '/u01/oracle/obsdata/okid01.dbf',
    '/u01/oracle/obsdata/okix01.dbf',
    '/u01/oracle/obsdata/okod01.dbf',
    '/u01/oracle/obsdata/okox01.dbf',
    '/u01/oracle/obsdata/posd01.dbf',
    '/u01/oracle/obsdata/posx01.dbf',
    '/u01/oracle/obsdata/xnid01.dbf',
    '/u01/oracle/obsdata/xnix01.dbf',
    '/u01/oracle/obsdata/system07.dbf',
    '/u01/oracle/obsdata/system08.dbf',
    '/u01/oracle/obsdata/system09.dbf',
    '/u01/oracle/obsdata/rbs02.dbf',
    '/u01/oracle/obsdata/amfd01.dbf',
    '/u01/oracle/obsdata/amfx01.dbf',
    '/u01/oracle/obsdata/bned01.dbf',
    '/u01/oracle/obsdata/bnex01.dbf',
    '/u01/oracle/obsdata/csmd01.dbf',
    '/u01/oracle/obsdata/csmx01.dbf',
    '/u01/oracle/obsdata/dddd01.dbf',
    '/u01/oracle/obsdata/dddx01.dbf',
    '/u01/oracle/obsdata/domd01.dbf',
    '/u01/oracle/obsdata/domx01.dbf',
    '/u01/oracle/obsdata/egod01.dbf',
    '/u01/oracle/obsdata/egox01.dbf',
    '/u01/oracle/obsdata/ibcd01.dbf',
    '/u01/oracle/obsdata/ibcx01.dbf',
    '/u01/oracle/obsdata/okld01.dbf',
    '/u01/oracle/obsdata/oklx01.dbf',
    '/u01/oracle/obsdata/pjid01.dbf',
    '/u01/oracle/obsdata/pjix01.dbf',
    '/u01/oracle/obsdata/pond01.dbf',
    '/u01/oracle/obsdata/ponx01.dbf',
    '/u01/oracle/obsdata/qotd01.dbf',
    '/u01/oracle/obsdata/qotx01.dbf',
    '/u01/oracle/obsdata/qrmd01.dbf',
    '/u01/oracle/obsdata/qrmx01.dbf',
    '/u01/oracle/obsdata/discoverer01.dbf',
    '/u01/oracle/obsdata/cinvd01.dbf',
    '/u01/oracle/obsdata/cinvx01.dbf',
    '/u01/oracle/obsdata/cpod01.dbf',
    '/u01/oracle/obsdata/cpox01.dbf',
    '/u01/oracle/obsdata/capd01.dbf',
    '/u01/oracle/obsdata/capx01.dbf',
    '/u01/oracle/obsdata/card01.dbf',
    '/u01/oracle/obsdata/carx01.dbf',
    '/u01/oracle/obsdata/cqcd01.dbf',
    '/u01/oracle/obsdata/cqcx01.dbf',
    '/u01/oracle/obsdata/cfndd01.dbf',
    '/u01/oracle/obsdata/cfndx01.dbf',
    '/u01/oracle/obsdata/cgld01.dbf',
    '/u01/oracle/obsdata/cglx01.dbf',
    '/u01/oracle/obsdata/convd01.dbf',
    '/u01/oracle/obsdata/applsysd03.dbf',
    '/u01/oracle/obsdata/applsysx03.dbf',
    '/u01/oracle/obsdata/cwpld01.dbf',
    '/u01/oracle/obsdata/cwplx01.dbf',
    '/u01/oracle/obsdata/csyd01.dbf',
    '/u01/oracle/obsdata/csyx01.dbf',
    '/u01/oracle/obsdata/cpod02.dbf',
    '/u01/oracle/obsdata/csyd02.dbf'
    CHARACTER SET UTF8
    ALTER DATABASE OPEN RESETLOGS;
    DROP tablespace TEMP;
    DROP tablespace TEMPSYN;
    CREATE temporary tablespace TEMP TEMPFILE '/u01/oracle/obsdata/temp01.dbf'
         SIZE 1048576000 REUSE extent management local uniform size 128K;
    CREATE temporary tablespace TEMPSYN TEMPFILE '/u01/oracle/obsdata/tempsyn01.dbf'
         SIZE 1048576000 REUSE extent management local uniform size 128K;
    Edited by: amychan60 on Jun 17, 2009 9:30 PM

  • ORA-12060: shape of prebuilt table does not match definition query

    Oracle version: 11G Release 2
    When Iam trying to create a Materialized view with on prebuilt table syntax I am facing the below issue.
    Create table sample_table as select col1,col2,col3 from sample_view;
    table created.
    Create Materialized view sample_table on prebuilt table refresh complete on demand as
    select col1,col2,col3 from sample_view;
    I am getting the below exception
    Error report:
    SQL Error: ORA-12060: shape of prebuilt table does not match definition query
    12060. 00000 - "shape of prebuilt table does not match definition query"
    *Cause:    The number of columns or the type or the length semantics of a
    column in the prebuilt table did not match the materialized
    view definition query.
    *Action:   Reissue the SQL command using BUILD IMMEDIATE, BUILD DEFERRED, or
    ensure that the prebuilt table matches the materialized view
    definition query.
    How to resolve this issue?

    SQL> create table sample_table as
      2  select owner, table_name, tablespace_name
      3  from dba_tables
      4  where rownum < 11;
    Table created.
    SQL> Create Materialized view sample_table on prebuilt table refresh complete on demand as
      2  select owner, table_name, tablespace_name
      3  from dba_tables;
    Materialized view created.What issue?
    Which leads me to ask what version of Oracle you have because we don't know.
    SELECT *
    FROM v$version;

  • Error: ORA-01861: literal does not match format string

    Hi,
    I am doing a RFC-XI-JDBC scenario.
    In the CC monitoring , i am getting this error for the reciver CC:
    "Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. "TableNAMe"(structure 'STATEMENTNAME'): java.sql.SQLException: ORA-01861: literal does not match format string "
    Please guide me what can be the cause and how to solve it.
    Thanks,
    Puneet

    This is how my payload looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_JDBC_REC xmlns:ns1="https:namespace.scene3">
    <STATEMENTNAME>
    <TABLE_NAME action="INSERT">
    <TABLE>ggclgis</TABLE>
    <access>
    <VALVE_ID>12584</VALVE_ID>
    <EQUNR>122</EQUNR>
    <ERNAM>12122</ERNAM>
    <INVNR>1212</INVNR>
    <GROES>1212</GROES>
    <ELIEF>123</ELIEF>
    <GWLEN>21-jul-2008</GWLEN>
    <GWLDT>12-jun-2006</GWLDT>
    <SERGE>wqwqw</SERGE>
    <TYPBZ>wqwqwq</TYPBZ>
    </access>
    </TABLE_NAME>
    </STATEMENTNAME>
    </ns1:MT_JDBC_REC>
    Please tell me if it looks fine.

  • ORA-19007: Schema - does not match expected T0090.xsd for non xsd owner

    I have registered an xsd in /home/divload/xsd/T0090.xsd. User "prmt" is the owner of this resource. User prmt can schemavalidate xml against this xsd just as it is now. However, I have package code in "prmt_app" user account that will actually do the schemavalidate - not prmt user. When I run the exact same code using the exact same xml with the T0090.xsd above I am getting ORA-19007: Schema - does not match expected T0090.xsd. prmt_app has "all" privs on "/home", "/home/divload", "/home/divload/xsd", and "/home/divload/xsd/T0090.xsd". What am I missing?
    XSD header info
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
         <xs:element name="T0090" xdb:defaultTable="T0090">
    ...XML header info
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <T0090 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="T0090.xsd">
    <PERMIT>
    ...The error occurs when I am inserting into this table off disk..
    create table prmt.cview_xml (filename varchar2(256), xmldoc xmltype) xmltype xmldoc xmlschema "T0090.xsd" element "T0090";
    Edited by: Mark Reichman on Jun 28, 2010 2:42 PM

    I did all that before posting the orignial post..
    declare
      v_schema_exists varchar2(1) := 'N';
      res             boolean;
      schemaURL       varchar2(100) := 'T0090.xsd';
      schemaPath      varchar2(100) :=  '/prmt/xsd/T0090.xsd'; --'/public/T0090.xsd';
      xmlSchema xmlType := XMLTYPE(bfilename('DIR_PRMT_OUT_CVIEW','T0090.xsd'),NLS_CHARSET_ID('AL32UTF8'));
    begin
      begin
        select 'Y'
          into v_schema_exists
          from sys.all_xml_schemas  -- changed from user_xml_schemas
         where schema_url = schemaURL;
        dbms_xmlSchema.deleteSchema(schemaURL,4);
        exception
          when NO_DATA_FOUND then
            null;
      end;
      if (dbms_xdb.existsResource(schemaPath)) then
        dbms_xdb.deleteResource(schemaPath);
      end if;
      res := dbms_xdb.createResource(schemaPath,xmlSchema);   
      dbms_xmlschema.registerSchema ( schemaURL, xdbURIType(schemaPath).getClob(), TRUE, TRUE, FALSE, TRUE );
    end;
    / I guess my understanding was that I could grant another oracle user access to my registered schema just like I can grant a single user access to a table. Evidently I only have two options. Only the schema owner can use the schema or everyone can use the schema and I cannot grant access to a single user other than myself.
    Edited by: Mark Reichman on Jul 2, 2010 9:08 AM
    Edited by: Mark Reichman on Jul 2, 2010 9:09 AM

  • ORA-01861 literal does not match format string, ORA-02063preceding line fro

    We have upgraded a client from 8.0.5 to 9.2.03. The following query is called from a report that was built using Cold Fusion5. It worked in 8.0.5, but not 9.2.03. When you run the report you get the errors
    [Oracle][ODBC][Ora]ORA-01861: literal does not match format string ORA-02063: preceding line from FRPE
    Here's the query:
    SELECT x.acct, x.obj, x.offn, x.status, x.asofdate, max( decode( x.func_id, 1, t, null ) ) UOB, max( decode( x.func_id, 12, t, null ) ) COB, max( decode( x.func_id, 24, t, null ) ) Rate_Warning, max( decode( x.func_id, 2, t, null ) ) Sector_Change, max( decode( x.func_id, 2006, t, null) ) FRRFRD , max( decode( x.func_id, 2003, t, null ) ) No_Tcode , max( decode( x.func_id, 2004, t, null) ) No_Sector FROM ( SELECT a.acct, a.func_id, count(*) cnt, 'Fail' t, b.obj, b.offn, b.status,a.asofdate FROM frpfaud@FRPE a, frpair@FRPE b WHERE a.acct=b.acct AND a.asofdate='2008-02-29 00:00:00' AND b.bnk not like 'B%' and b.obj not in ('KL') and b.obj in ('GAF') GROUP BY a.acct, a.func_id,b.obj,b.offn,b.status,a.asofdate) x GROUP BY x.acct, x.obj,x.offn,x.status,x.asofdate
    Now, this query will not work by running straight through SQL worksheet in either the 8.0.5 or 9.2.03 regions. So I guess it has something to do with Cold Fusion- which I know nothing about. Has anyone had any experience using Cold Fusion to issue a query? What would be the cause of the difference between the Oracle versions? That is the only thing that changed.
    Thanks for any input.

    I actually want the date format of DD-MON-YY. Which, from what I understand, is the default format for both Oracle 8.0.5 and 9.2.03. I'm trying to figure out why it is now displaying as 'yyyy-mm-dd hh24:mi:ss'. I could convince the client that the code needs changing if I had evidence that this version of Oracle (9.2.03) used a different default date format. Or if Cold Fusion pulls the date differently. Ughh.
    Here are the database parameters:
    SQL> show parameter nls_date_format
    NAME TYPE VALUE
    nls_date_format string
    select sysdate from dual;
    SYSDATE
    26-FEB-08
    1 row selected.
    select * from nls_session_parameters
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    17 rows selected.
    select * from v$nls_parameters
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    19 rows selected.

  • ORA-23327: imported deferred rpc data does not match GLOBAL NAME of ..

    Hi,
    We took an export of a production database in Oracle 9i (9.2.0.7) and created a new database on a test server with Oracle 10g (10.1.0.5)
    The original production database was called DC20 and our new test database is called SD20.
    Looking at the logs after the import we're seeing this error:
    "ORA-23327: imported deferred rpc data does not match GLOBAL NAME of importing db"
    We've looked into it a little and it seems to make sense because the names of the databases are different, and from what we've read, we really didn't need to do a full import including SYSTEM anyway. We also came across a solution telling us:
    "If you are not using Replication on the target database, these errors can be ignored. However, you should subsequently remove all the replication objects by running:
    $ORACLE_HOME/rdbms/admin/catrepr.sql, then catproc.sql"
    What I was wondering was if someone could validate that running these scripts and ignoring the errors will be ok, or if they'll cause us issues further down the line.
    In case its needed, heres my Export parameter file
    "FULL=Y
    DIRECT=Y
    LOG=E:\Exports\DC20\Log\expDC20.LOG
    FILE=E:\Exports\DC20\Data\DC20.DMP"
    and heres my Import parameter file
    "FULL=Y
    COMMIT=Y
    GRANTS=N
    IGNORE=Y
    BUFFER=500000
    FILE=E:\Imports\SD20\data\SD20.dmp
    LOG=E:\imports\SD20\log\impSD20.LOG"
    Thanks for your help!

    Thanks Neil, we did already see this note and added it to our list of possible solutions. After we found this one, we also found the one I quoted, which would seem to be the path of least resistance (it would save a good 10 hours in import time if nothing else).
    However, if we can't do what I'm asking about in my original post however, the note you mentioned will be our next route..

Maybe you are looking for

  • Process sequesnce in process chain

    Hi, In a process chain which process should come first re-create cube index or delete overlapping request and WHY. Thanks, sam

  • Read query string from End User Menu

    In our IdM application, I want to be able to read a variable passed in a query string. The string is part of the JSP page which takes the user back to the end user menu (user/main.jsp). Is there a way for the end user menu to read a value from a quer

  • CVS ideas?

    I'm in the process of developing my own Linux system. Not exactly what I would call a distro as yet, but it is early days. Ive got the system to the point where it boots and I can login. It is VERY minimal, now I need to (and am about to) start worki

  • Error at the time of cond. type deactivation in tax code

    Hi, I m facing a problem,when I go through tcode FTXP and try to deactive a one condition types from here. its showing below error:- System error: Error in routine CHANGE_CONDITION_MULTIPLE A003TXGST anybody have the suggestion regarding this...

  • Re: Received error on Review time card

    I enter Regular time as hour type with 11 hours for Monday and receive the following error when click on review button; null - An Oracle error has occured. I bounce the apache and clear cache but still receive the same error. In my preference - Rules