Spatial data insert problem

Hello,
i want to make an spatial data insert, but it doesn't work well. Help would be fine.
create table SCHIFFSPOSITION(
SCHIFF_ID                    NUMBER NOT NULL,
SCHIFF_NAME                VARCHAR(25),
SYS_POS_SN               VARCHAR(25),
SYS_LAT_P4_DER               VARCHAR(15),
SYS_LON_P4_DER               VARCHAR(15),
GEOM                          SDO_GEOMETRY,
constraint PK_SCHIFFSPOSITION primary key(SCHIFF_ID));
insert into MDSYS.USER_SDO_GEOM_METADATA values ('SCHIFFSPOSITION', 'GEOM',
SDO_DIM_ARRAY (
SDO_DIM_ELEMENT ('Longitude', -180, 180, .0005),
SDO_DIM_ELEMENT ('Latitude', -90, 90, .0005)),8307);
create index SCHIFFSPOS_IDX on SCHIFFSPOSITION(GEOM) indextype is MDSYS.SPATIAL_INDEX parameters('sdo_indx_dims=2, layer_gtype=point');
INSERT INTO SCHIFFSPOSITION(SCHIFF_ID, SCHIFF_NAME, SYS_POS_SN, SYS_LAT_P4_DER, SYS_LON_P4_DER,
MDSYS.SDO_GEOMETRY(2001,8307, MDSYS.SDO_POINT_TYPE(SYS_LON_GRAD_DER,SYS_LAT_GRAD_DER,null),null,null)))
VALUES (1, 'METEOR 63', 'GPS', '33° 54,4246 S', '18° 25,9184 E', '18.4319736', '-33.9070772');
thank you very much

Hi,
please insert that way:
INSERT INTO SCHIFFSPOSITION(SCHIFF_ID, SCHIFF_NAME, SYS_POS_SN, SYS_LAT_P4_DER, SYS_LON_P4_DER,GEOM)
VALUES (1, 'METEOR 63', 'GPS', '33° 54,4246 S', '18° 25,9184 E', MDSYS.SDO_GEOMETRY(
  2001
  ,8307
  , MDSYS.SDO_POINT_TYPE(
    18.4319736
    ,-33.9070772
    ,null
  ,null
  ,null
)

Similar Messages

  • Date insert problem m/d/yy not working

    I am trying to set up the 'birthday' date like in the 'contact management' tutorial in my user account section... For some reason, although my birthday set-up is just like the tutorial (MySQL field 'date' set as DATE, ADDT date setting is m/d/yy) and it's all uploaded to the server. When I go to add or update a record with the new birthday (just like in the tutorial) it returns with no errors, but the record in the db is '0000-00-00' instead of what I inserted... what I am I doing wrong?
    Thanks so much!

    Nathan, have you checked the Control Panel/Date Formats section & made sure the Formats are correct?
    I use a MySQL backend & have the following values in Control Panel:
    Set Database Date and Time Formats
    yyyy-mm-dd
    HH:mm:ss
    Set Screen Date and Time Formats
    mm/dd/yyyy
    hh:mm tt
    This works for me.
    Thanks,
    jlig

  • Data Insertion problem for the filter

    Hi,
    I have some 1500 rows of data in my excel  & 26 columns
    I have increased the rows to 1500 in Preferences ->excel  Options ... MAx no of rows to 1500
    I have a selector as filter when I try to select the source data of 1500 rows and 26 cols it not taking the data instead its showing the source data field blank.
    I have done this before for other rpeorts it was working but when I do this now its not working .from the desktop
    But when I do the sam e logging in to citrix it works what could be the problem
    Thanks

    That is strange, however i don't think mapping the data has something to do with the connecting to Citrix.
    Try doing the same thing on a different system.
    -Anil

  • Data Insert Problem

    Connection conn = null;
    try
    String[] deger = new String[50];
    cumle = conn.createStatement();
    cumle.excuteUpdate("INSERT INTO kelimeler(kelime,sayi) VALUES('"+deger[0]+"',1)");
    }Hello, I'm trying to insert values to database(MySQL) but compiler gives error;
    cannot resolve symbol
    symbol : method executeUpdate (java.lang.String)
    location: interface java.sql.Statement
    What shoul I do?

    The code you posted has a typo which is probably the problem.
    You have excuteUpdate and it should be executeUpdate

  • Error while inserting spatial data

    Hi All,
    I have a problem while inserting spatial data. could some one please help me in solving this.
    I have creatd a table with spatial index.
    INSERT INTO USER_SDO_GEOM_METADATA
                VALUES('SDO_CA_test', 'CA', SDO_DIM_ARRAY(
                    MDSYS.SDO_DIM_ELEMENT ('LON', 71.19545, 120.35101, 0.000005),
                    MDSYS.SDO_DIM_ELEMENT ('LAT', 12.1145, 26.58041, 0.000005)), 8687);
         CREATE INDEX IO_CA_test ON SDO_CAR_test(CA)
        INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('SDO_COMMIT_INTERVAL=10000 SDO_RTR_PCTFREE = 0');when I insert data from another spatail table that does not have a index I get an error.
    insert into sdo_ca_test as select * from base_sdo;
    ORA-29875 Failed in the ececution of the ODCINDEXINSERT routine
    ORA-13354 incorrect offset in ELEM_INFO_ARRAY
    ORA_06512 at MDSYS.SDO_INDEX_METHOD_101 line. 709I believe that there is some incorrect data that is not with my index defination.
    How do I check this invalid data at base_sdo table. The base_sdo table has no index.
    rgds
    Saz
    Edited by: Saaz Ena on Dec 21, 2009 6:16 PM

    Can you try SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT
    or SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT? e.g.
    select * from base_sdo a where
    SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(a.CA, 0.000005) != 'TRUE';

  • Oracle 11g R2, Problem Loading Spatial Data

    We have a geodatabase which has been implemented by oracle spatial. it has been working quite fine since 2 years ago. Recently the data center serving our geodatabase has been upgraded on both software and hardware specifications. The handler application now has difficulty retrieving spatial data. The problem is somehow strange; only some spatial objects are loaded and then application encounters exceptions.
    Previous working database engine was an Oracle 11g R1 and the new one is Oracle 11g R2. The application is a java application mostly written by swing. Here is the stack trace:
    java.sql.SQLRecoverableException: No more data to read from socket
         at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1200)
         at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
         at oracle.jdbc.driver.T4CCallableStatement.fetch(T4CCallableStatement.java:1079)
         at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:369)
         at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:273)
         at ir.mas.aamar.service.map.MapService.getModifiedMap(MapService.java:405)
         at ir.mas.aamar.map.MapPanel.redrawLayers(MapPanel.java:504)
         at ir.mas.aamar.map.LayersTree.onSnapshotDisplayCheckBoxItemChanged(LayersTree.java:420)
         at ir.mas.aamar.map.LayersTree.onMouseReleased(LayersTree.java:204)
         at ir.mas.aamar.map.LayersTree.access$0(LayersTree.java:188)
         at ir.mas.aamar.map.LayersTree$1.mouseReleased(LayersTree.java:170)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    java.sql.SQLRecoverableException: No more data to read from socket
         at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1200)
         at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
         at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1469)
         at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:389)
         at ir.mas.aamar.service.map.MapService.executeJDBCQuery(MapService.java:78)
         at ir.mas.aamar.service.map.MapService.getSnapshotsForThisTermPlusHoze(MapService.java:1013)
         at ir.mas.aamar.dialog.edit.EditTools.refreshLayersCombo(EditTools.java:327)
         at ir.mas.aamar.dialog.edit.EditTools.refresh(EditTools.java:301)
         at ir.mas.aamar.dialog.edit.EditTools.<init>(EditTools.java:103)
         at ir.mas.aamar.dialog.edit.EditTools.editTools(EditTools.java:62)
         at ir.mas.aamar.map.MapPanel.paintComponent(MapPanel.java:7591)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintToOffscreen(Unknown Source)
         at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
         at javax.swing.RepaintManager.paint(Unknown Source)
         at javax.swing.JComponent._paintImmediately(Unknown Source)
         at javax.swing.JComponent.paintImmediately(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    java.sql.SQLRecoverableException: Closed Resultset: next
         at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:224)
         at ir.mas.aamar.service.map.MapService.getSnapshotsForThisTermPlusHoze(MapService.java:1014)
         at ir.mas.aamar.dialog.edit.EditTools.refreshLayersCombo(EditTools.java:327)
         at ir.mas.aamar.dialog.edit.EditTools.refresh(EditTools.java:301)
         at ir.mas.aamar.dialog.edit.EditTools.<init>(EditTools.java:103)
         at ir.mas.aamar.dialog.edit.EditTools.editTools(EditTools.java:62)
         at ir.mas.aamar.map.MapPanel.paintComponent(MapPanel.java:7591)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintToOffscreen(Unknown Source)
         at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
         at javax.swing.RepaintManager.paint(Unknown Source)
         at javax.swing.JComponent._paintImmediately(Unknown Source)
         at javax.swing.JComponent.paintImmediately(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at ir.mas.aamar.dialog.edit.EditTools.setTypeOfEditModel(EditTools.java:452)
         at ir.mas.aamar.dialog.edit.EditTools.<init>(EditTools.java:104)
         at ir.mas.aamar.dialog.edit.EditTools.editTools(EditTools.java:62)
         at ir.mas.aamar.map.MapPanel.paintComponent(MapPanel.java:7591)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintToOffscreen(Unknown Source)
         at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
         at javax.swing.RepaintManager.paint(Unknown Source)
         at javax.swing.JComponent._paintImmediately(Unknown Source)
         at javax.swing.JComponent.paintImmediately(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I read in some forums that the problem could be caused by jdbc version incompatibility, so I just copied jdbc archives from the installed oracle 11g R2 jdbc folder but the problem persists. Last thing I should mention is that only spatial data is problemistic and non-spatial data is easily loaded.
    Please Help, Thanks.

    Hi storm,
    During the installation of oracle as you said if you have given the global password, basically this specific password will reflect to users such as
    -sys
    -system
    -dbsnmp
    -sysman
    As you are new to oracle the basics that you should know is that "SYS" user is the highly privileged user in Oracle and should be logged in as "sys as sysdba" with his respective password (i.e. the global password that you have entered during database installation) to obtain his privilege. Remember to manipulate your database with caution when you are logged in as the sys user. You can log into the database using the sys user in the following way:
    c\> sqlplus sys as sysdba
    password: ****** --It will ask you for the password and you will have to give the global password that was given during installation
    Hope this helps!!!
    Regards,

  • Export to "insert" spatial data

    I'm using sqldeveloper-1.1.3.with an 11g R1 database. I'm trying to get the insert statements (including the SDO_GEOMETRY) from a table which I loaded from Shapefile.
    I am getting inert statements without any spatial data like below:
    Insert into TU (TRID,GEOM) values (100,'MDSYS.SDO_GEOMETRY');
    I am using this method: Right-click on the table in the "connections explorer tree", select Export Data, then insert...
    Is there any other way to export spatial data to insert sql.

    Thnx Irian
    I used the same with sql Developer 2.1. It worked fine

  • Cannot edit Oracle Spatial data

    Hello,
    I am running into some problems with my Oracle Spatial data. Maybe somebody has some insight. Here's what is going on:
    1) I am able to connect to and view the data in uDig but I cannot edit the data and also the data shows up in the table of contents with a line symbol even though it is polygon data (it renders correctly in the map as polygons). I try using the 'Create Polygon Geometries' tool and it errors saying 'Create Polygon Tool' cannot operate on current layer.
    2) When I try testing edits through WFS-T it errors and tells me that the table is read only.
    The table is in the USERS tablespace and I have verified that it is read/write. I also set object permissions on the user: ALTER, DELETE, INSERT, SELECT, UPDATE
    Am I missing something obvious? Anyone else have this problem? Thanks a lot for any ideas anyone has.

    My apologies for the confusion. My insert statement DID work just fine. I just wasn't seeing it...probably because I was querying the table in Enterprise Manager DB Control and it looks like it takes some time to refresh. So it appears that user permissions are not the issue.
    I have used two data loading methods:
    Before loading data, I needed to create a user defined coordinate reference system:
    1 create projection operation for my custom projection
    2 configure projection parameters
    3 create the projected CRS in mdsys.sdo_coord_ref_system
    First data load steps
    1 shp2sdo.exe my_shapefile my_table -g geom -s 1000002 -v
    2 execute my_table.sql
    3 execute sqlldr.exe
    4 EXECUTE SDO_MIGRATE.TO_CURRENT('my_table','GEOM');
    5 CREATE INDEX my_table_index ON my_table(geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    Second data load steps:
    1 open up MapBuilder, make a connection, and go through the Import Shapefile wizard. MapBuilder automatically creates a spatial index.
    Does it appear that I am missing any steps or doing anything obviously wrong that would be causing me to not be able to edit the data through clients such as uDig or WFS-T?

  • MapViewer data source problem in the morning

    Hi all,
    I have the Oracle Application server 10g and Oracle database 10g installed on 2 different computers. On the application server I have installed MapViewer the last version.
    I have defined a datasource in the configuration file and that works perfect.
    My application uses mapviewer through java and displays the generated image in an jsp. The same working as the demos though.
    Each night there is a backup of the database made on the other computer.
    The MapViewer/data source remains open through the night. When I come to the office in the morning, and i try to access my webpage with the mapviewer image, I get an
    500 Internal Server Error, java.lang.NullPointerException...
    I check in the admin page of the map viewer the following:
    <list_data_sources /> - The datasource is still defined
    <data_source_exists data_source="blabla"/> - The datasource exists
    If i try to <list_predefined_themes data_source="blabla" /> I get again an error. It seems that the connection with the database is not working.
    If I <redefine_data_source ..> or <restart/> mapviewer everything starts to work again without problems.
    I have attached further some erros I have in the log file, maybe it will help you to help me ;-)
    Regards,
    Adrian
    Thu Feb 02 08:10:28 CET 2006 ERROR [oracle.sdovis.theme.pgtp] *** Exception while querying theme: LEVEL_1
    Thu Feb 02 08:10:28 CET 2006 ERROR [oracle.sdovis.theme.pgtp] java.sql.SQLException: I/O-uitzondering: Connection reset by peer: socket write error
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
    Thu Feb 02 08:10:28 CET 2006 ERROR [oracle.sdovis.DBMapMaker] Message:Exception while querying theme: LEVEL_1
    Description: Nested exception is:
    java.sql.SQLException: I/O-uitzondering: Connection reset by peer: socket write error
    java.sql.SQLException: I/O-uitzondering: Connection reset by peer: socket write error
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:286)
    Thu Feb 02 08:10:28 CET 2006 WARN [oracle.sdovis.MapMaker] null MBR resulted from buildDataMBR.
    Thu Feb 02 08:10:28 CET 2006 ERROR [oracle.lbs.mapserver.core.RealWorker] Message:[SDOVIS] No spatial data to render!
    Description:
         at oracle.sdovis.DBMapMaker.renderEm(DBMapMaker.java:1304)
         at oracle.sdovis.MapMaker.renderMap(MapMaker.java:1399)
    Thu Feb 02 08:10:28 CET 2006 ERROR [oracle.lbs.mapserver.core.RealWorker] Message:null
    Thu Feb 02 08:10:28 CET 2006
    Severity: 0
    Description:
    Message:[SDOVIS] No spatial data to render!
    Description:
         at oracle.sdovis.DBMapMaker.renderEm(DBMapMaker.java:1304)
         at oracle.sdovis.MapMaker.renderMap(MapMaker.java:1399)
    Thu Feb 02 08:12:45 CET 2006 ERROR [oracle.lbs.mapserver.core.MapperConfig] java.sql.SQLException: I/O-uitzondering: Connection reset by peer: socket write error
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)

    Hi,
    please post how you did define the data source in the configuration file.
    Thanks.

  • Re:LOB, Spatial data

    Hi all,
    can any one tell me that does goldengate support LOB and spatial data? if so do we have to add any parameters to the parameter file in the goldengate?
    thanks in advance..

    Hi
    I hoppe this help you:
    ----- Supported data types Classic Capture
    **Basicfile LOB columns
    LOB modifications done via
    DML
    (INSERT/UPDATE/DELETE)
    are captured from redo.
    ◆ LOB modifications done via
    DBMS_LOB package are
    captured by fetching values
    from the base table.
    *** Securefile LOB
    ◆ Securefile LOBs are only
    captured from redo if LOBs are
    not transformed (such as not
    compressed or encrypted) and
    stored out of row, and if the
    modification is done via DML
    statements.
    ◆ LOBs are fetched from the
    base table for the following
    cases:
    ◆ LOB is encrypted
    ◆ LOB is compressed
    ◆ LOB is stored in-line
    ◆ LOB is modified via
    DBMS_LOB package
    ◆ LOB is deduplicated
    ◆ LOB is modified via
    fragment operations
    ◆ NOLOGGING LOBs
    Check the Oracle Installation and Setup Guide for obtain more detail
    Edited by: user11237143 on 23/05/2012 10:57 AM

  • Update/Insert Problem with Oracle Warehouse Builder

    Hello,
    i have update/insert problem with owb.
    Situation: I have a source-table called s_account and a target table called w_account_d. In the target table are already data which was filled trough the source table inserts. Now anyone make changes on data on the target table. This changes should now give further on the source table with an update operation. But exactly here is the problem i can´t map back the data to source because that will create a loop.
    My idea was to set a trigger but i can´t find this component in owb or is anywhere hidden?
    Also i have already seen properties as CDC or conditonal loading in the property inspector of the table, but i have no idea how it works.
    Give it other possibilities to modeling this case? or can anyone me explain how i can implement this eventually with CDC?
    I look forward for your replies :)

    Hi
    thanks for your answer. I follow your suggestion and have set the constraints of both tables into the database directly.Nevertheless it doesn´t work to begin. In the next step i found by right click on a table the listpoint "configure" - I goes to "unique key" --> creation method and set here follow options: Constraint State = ENABLE, Constraint Validation = Validate. That error message that appears before by the deployment disappears yet. Now i start the job to test if the insert/update process works right. Finally it seems to work - but not really.
    My Testscenario
    1. Load the data from source table about the staging area to data warehouse table: Check - it works!
    2. Change one data record in source table
    3. Load the source table with changed data record once again to staging area: Check - it works!
    4. Load new staging area table with the changed data record to data warehouse table: Check it works! BUT, BUT i can not recognize if it is insert or update operation, then under the design window by jobs execution windows is reported "rows selected 98", Rows inserted" is empty and "rows updated" is empty. So i think works not correct, then my opinion if it works correct it should show be "rows updated" 1.
    What can yet now still be wrong or forgotten? Any ideas?
    *By the way think not 98 rows there is not important if you make an update or insert which performance. It is an example table the right tables have million of records.*
    I look forward for your answers :)

  • CRUD insert problems.

    Hello all,
    I was wondering about DB operations in JSF pages, so I took a look over the Single Page CRUD example. What hitted me was there is a need for a two step insertion, first by issuing a select in search for the biggest ID of the primary key, and after that the insertion of the element with that obtained biggest ID + 1. I see at least 2 problems with this approach:
    1. Concurrency issues.What happends if 2 users are issuing at the same time an insert operation over the same table? There is the possiblity of getting the same ID to insert, and the first one could insert, but the second one would fail even if it's request is logically corect (validated & converted). I see three solutions over the insert problem:
    a. lock on the database (if it's possible).
    b. using a synchronized block in the application bean to get the ID and insert.
    c. using DB specific constructs (e.g. MySQL's AUTO_INCREMENT)
    2. Overhead issues. Why doing in two steps an operation that should be just an insert? Previous a. an b. approaches do not solve our overhead problem, because we still have two steps in insertion; we only synchronize them.
    I was wondering which is the best practice for production quality web applications. Personally because I've picked MySQL as DB I've used AUTO_INCREMENT, but the immediate huge and obvious drawback is dumping DataProvider's capability of changing the storage medium at a glance.

    I'm not sure if I entirely understood your questions here.
    - Concurrency problem.
    database bound Data provider underneath uses CachedRowset, which uses SyncProvider to take care of concurrency problem. If the default RIOptimisticProvider is not enough, it possible to register other more sophisticated SyncProvider.
    You can read about it here.
    http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html
    - Overhead issue
    I believe, it is possible to let the DB auto increment the primary key field, and left it out in the insertion from data provider.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • [Begginer] How to view my Oracle spatial Data ?

    I'm a begginer , I know how to make and insert Spatial data but , i want to see it like map , how ?
    Please tell me the software and good documentation ?

    Try using MapViewer. It is downloadable from OTN:
    http://otn.oracle.com/products/spatial
    then click on the software button to find instructions and the MapViewer software.

  • Exception has occurred during data insertion ... Wrong number of parameters

    I am using an ADO dataflow source and an ADO dataflow destination to move data from a table on an IBM iSeries DB2 database to another IBM iSeries DB2 database on another machine.  The connection managers for source and destination both use .Net Providers\Odbc
    Data Provider with the Data Source Specification being ODBC connections specified on the Windows Server 2008 r2 machine hosting bids.  All the test connections work...so far so good.
    Issue is when I execute the control flow task the rows get picked up from the source DB2 database no problem but it fails on the insert to the destination DB2 table...The progress tab specifies the exceptions...
    [ADO NET Destination [601]] Error: An exception has occurred during data insertion, the message returned from the provider is: ERROR [07002] [IBM][System i Access ODBC Driver]Wrong number of parameters.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "ADO NET Destination" (601) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (604). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the
    failure.
    I put a data viewer on the data flow connection and the records I expect are  getting picked up and look ok. I checked to make sure the source and destination tables have the same number of columns in their record layout and identical data
    types and they look fine.
    Could someone kindly tell me whats going wrong?  Does the error message indicate that some of the columns are getting dropped from the dataset before the insert?
    Thanks much in advance for any help, Roscoe

    Hi Roscoe,
    Glad to hear that you have found the root cause. So, the issue occurs because numeric values with no decimal cannot be inserted into the Decimal data type column in the DB2 table. In SSIS, data type Decimal of DB2 database is mapped to data type DT_NUMERIC.
    To address the issue, you can do a data conversion for the column in question to define its precision and scale such as DT_NUMERIC(9,2) by using the Data Conversion Transformation before the ADO NET Destination.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Jdbc-updating spatial data

    i looked to the next link:
    http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html
    I want to update spatial data.To the previous link i found how to update tables but not how to update tables which contain spatial data.For example:
    CREATE TABLE customers (
    customer_id NUMBER,
    last_name VARCHAR2(30),
    first_name VARCHAR2(30),
    street_address VARCHAR2(40),
    city VARCHAR2(30),
    state_province_code VARCHAR2(2),
    postal_code VARCHAR2(9),
    cust_geo_location SDO_GEOMETRY);
    INSERT INTO customers VALUES
    (1001,'Nichols', 'Alexandra',
    '17 Maple Drive', 'Nashua', 'NH','03062',
    SDO_GEOMETRY(2001, 8307,
    SDO_POINT_TYPE (-71.48923,42.72347,NULL), NULL, NULL));
    if i want to update the costumer position (-71.48923,42.72347) how can i do this;;;

    Try posting this to the JDBC forum:
    http://forum.java.sun.com/forum.jspa?forumID=48

Maybe you are looking for

  • SunPKCS11 and NSS on Mac OS X 10.5

    Hello there, I've been scratching my head the whole day about how to use the SunPKCS11 provider and Mozilla's NSS framework under Mac OS X 10.5 (a.k.a Leopard). Let me replay the whole movie for you... So here I am, religiously following Sun's guidel

  • Can't drag music files into new shuffle. Pls? Thx.

    Good Morning. Using a computer (G4 MDD) with an iPod mini on it already. Created a new user account named ipod. Switched to that user account, installed/configured new iPod Shuffle named it Nicks and tried to drag music over to the main iTunes page t

  • Has anyone heard when the iOS 6 user manual will be posted?

    I thought I would get a jump on reading the manual for iOS 6 for iPhones before I updated my 4S to 6.0 (I'm waiting for the battery life thing to settle down before I update) and noticed that Apple still has the 5.1 manual on the web site. Hopefully

  • Printing in ink backup mode on 7960

    Despite replacing all 3 ink cartridges with 3 brand new ones (which was costly), my 7960 printer continues to display the message "Printing in ink backup printing mode." I made sure to remove the protective tape and seated them solidly when I install

  • Cannot update photoshop CS6

    I have tried up dating CS6 as it says there is an update available, it bets to about 98% then says update failed. I am also subscribed to Adobe cloud and have both Photoshop and Bridge CC, but  wouldnt have thought this would have any bearing on the