Insert / update data to a table through DBLINK (oracle)

I try to insert / update a table from one instance of oracle database to another one through oracle dblink, get following error:
java.sql.SQLException: ORA-01008: not all variables bound
ORA-02063: preceding line from MYLINK
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
The same code to insert / update the exact same table in local instance works fine.No any binding problem. So i am pretty sure all ? mark in SQL are set with some value before sending to Oracle.
Someone please advise what is possible problem. Db link is not set correctly? or we can not update remote table by dblink.
By the way i can do insert / update from TOAD to the remote table through DBLINK. Problem happens only in Java code.
thanks!
Gary

dblink links from one database instance to another.
So it is certainly a source of possible problems when it works on one database and not another.
You should start by looking at the dblink and it possible testing it in the database not via java.
Note as well that that error suggests that it is coming from the Oracle database. I believe if you had a bind parameter problem in your java code that the error would come from the driver. But that is a guess on my part.

Similar Messages

  • How to insert/Update date into Dictionary Table?

    Dear Experts,
    I have created a Dictionary Project and Deployed.I think the table had created in portal database.
    now i want to insert some data into that table?
    Can you plz tell me how to access the table using Abstract Portal Component using DynPage.
    Waiting for ur replies...
    Thanks and Regards,
    Visweswar.

    Hi
    Can u share the Logic???

  • Get the list of table's last Inserted/Updated date from a database

    Hi All,
    Good afternoon!
    Please help me to find the last inserted/updated date from different tables in a database.
    Consider I have a database called testDB, which contains 20 tables. Most of these tables will get data inserted/updated daily. But sometimes it may not happen due to some issues . We will not be knowing about this issue until we check  in each table
    manually. Now, somebody should be daily checking for the issues in this db. So, we have decided to make an alert mail to send this informations to us.
    We need to check whether any of the table's in TetsDB has got inserted/updated data in one day difference.
    I have tried this..
    SELECT OBJECT_NAME(OBJECT_ID) AS Object_, last_user_update,*
    FROM sys.dm_db_index_usage_stats
    WHERE database_id = DB_ID( 'TestDB')
    Thanks,
    Julie

    The solution depends on the version and edition of your SQL Server.
    If you use SQL Server 2000 or SQL Server 2005, please visit these links: 
    How do I audit changes to SQL Server data?
    Table Auditing with SQL Server 2000
    If your SQL Server 2008 or above (only on the Enterprise edition), please have a look at this link:
    Change Data Capture
    If your SQL Server 2008 or above (all editions),
    you can use Change Tracking, but Change tracking captures the fact that rows in a table were changed, but does not capture the data that was changed.
    more info: 
    Comparing Change Data Capture and Change Tracking
    Saeid Hasani [sqldevelop]
    HI,
    I've read about change tracking change data capturing now. 
    We need to track the data daily and we need to know whether any modification happens in those tables.
    Will it make any performance issue if I enable change data capturing on multiple tables.. lets say 20+ tables.?

  • Can not insert/update data from table which is created from view

    Hi all
    I'm using Oracle database 11g
    I've created table from view as the following command:
    Create table table_new as select * from View_Old
    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)
    Anybody tell me, what's happend? cause?
    Thankyou
    thiensu
    Edited by: user8248216 on May 5, 2011 8:54 PM
    Edited by: user8248216 on May 5, 2011 8:55 PM

    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)so what is wrong with the GUI tools & why posting to DATABASE forum when that works OK?

  • Issue while insert and update data to DB tables

    Hello all,
    i am having an issue while insert the data to DB table.
    my scenario is DB1 to DB2. i had a sender channel with select query which fetches data from DB1 and inserts to DB2.
    so the select query will fetch the records that were INSERTED to DB1 and records that were UPDATED to DB1 and needs to insert/update to DB2 table.
    Now the issue is i am able to insert the records but not able toupdate the records to DB2 table due to primary key issue.
    im message mapping
    sender message type is as follows:
    <src_message1>
    ----<row>
    -------<fieldA>
    -------<filedB>
    -------<filedC>
    Receiver message type as follows:
    <trgt_message1>
    ----<STATEMENT_1>
    ----<TABLE_NAME>
    ----<ACTION> INSERT
    ----<TABLE>
    ----<ACCESS>
    ----<field1> primary key
    ----<field2>
    ----<field3>
    ----<field4>
    ----<KEY>
    ----<field1>
    ----<field2>
    ----<field3>
    ----<field4>
    my query in sender channel is : select filedA, filedB, filedC from test_table where createdate=sysdate or updatedate=sysdate
    so it feteches the data from DB1 and inserting to DB2 but not updating the records to DB2 due to primarykey issue.
    please suggest how to solve ....will it solve by using UPDATE_INSERT for action?
    Best Regards,SARAN

    Hi Nagarjuna,
    i have done the following changes to target mapping structure;
    1. action as UPDATE_INSERT
    2.  in access tab, i had mapped fieldDate to field4.
    3. in Key tab, i assigned the sysdate to field4.
    but issue still exist. could you please check my above changes are correct or not. if wrong please provide me the details that needs to be done.
    thanks in advance.
    i'm providing the error details again:
    my query in sender channel is : select filedA, filedB, filedC, FiledDate from TEST_TABLE where fieldDate=sysdate or updatedate=sysdate
    it returns 4 records as follows:
    fieldA--fieldB-fieldC---fieldDate
    1001----EU----  1----
        2011-11-10
    1002----CN----  0----
         2011-11-10
    1003----AP---- 1----
          2008-03-15 (already exist in DB2)
    1004----JP----  1----
        2007-04-12 (already exist in DB2)
    the first two records are created today and remaining 2 records are updated the fieldC from 0 to 1 ( in DB1 )
    while inserting these 4 records to DB2, we get the following error "java.sql.SQLException: ORA-00001: unique constraint (data.TEST_TABLE_PK) violated" .
    Best Regards,SARAN

  • Interfaces used for insert/update data in tables

    for providing security the procedures are not allowed to directly insert/update the values in tables.some one suggested that use interfaces for this .i want infomation about this interfaces. how this works and how to use

    An interface is an intermediate set of procedures/functions that do the job for you.
    You haven't explained what it is you're trying to achieve exactly, but here's an example scenario.
    We don't want to allow our developers to query, or write to the tables directly so they are set up with certain database users that have no permissions granted on the tables for such things.
    Instead they have been granted permission to call procedures and functions belonging to another schema, and it is those procedures and functions that do the required table access and/or pass information/data back or write to the tables.
    The developers have to write their applications to call these procedures to do any access to the tables. This means that they are limited to the functionality provided by these interface procedures so, if there is internal auditing or columns of data etc. on the tables then it may be that they can't access this data, but only the "user facing" data.
    The interface can also ensure that data meets certain requirements before being written to tables, allowing for business or technical level restrictions to be implemented.

  • Can i change or modify or insert the data in standard tables

    hi gurus
    can i change /modify/insert the data in standard tables
    witout using module pools
    plz send the  progem lines also
    it ll be very helpful to me
    thank you
    kals.

    Hi Kalyan,
    It is not advisable to update standard tables directly or through your own module pool programs also.  The reasons are,
    1.  It is difficult to find out how many tables are updated through the transaction.  if we leave one table also as Mr.Andrew said data integrity will be lost.
    2.  Authorization objects and profiles will be totally bypassed if data is inserted through custom programs.
    3.  Complete data validation is not possible.  There are certain validations that are executed through code and appropriate errors and warnings are shown in the transactions.  If we insert data directly to the tables anything can be inserted into the table field violating all the validations unless we have field level check constraints on the tables at database level.
    4.  User Exits and BADIs that are implemented for specific business requirements and checks will not function on the data.
    5.  Update & Transaction locks will not work properly.
    Due to above reasons, definitely you should avoid updating standard tables directly.
    There are many tools such as LSMW Recordings, BDCs, BAPIs, IDOCs, Upload Interfaces available in SAP through which bulk data can be updated without using relevant transactions.
    You can collect data from end users in text or excel sheets or through custom programs in required format and upload at once through above mentioned tools.
    Regards,
    Hema

  • Insert the data into two tables at a time.

    Hi ,
    i have these two tables
    create table [dbo].[test1](
    [test1_id] [int] identity(1,1) primary key,
    [test2_id] [int] not null
    create table [dbo].[test2](
    [test2_id] [int] identity(1,1) primary key,
    [test1_id] [int] not null
    alter table [dbo].[test1]
    add constraint [fk_test1_test2_id] foreign key([test2_id])
    references [dbo].[test2] ([test2_id])
    alter table [dbo].[test2] add constraint [fk_test2_test2_id] foreign key([test1_id])
    references [dbo].[test1] ([test1_id])
    I want to insert the data into two tables in one insert statement. How can i do this using T-SQL ?
    Thanks in advance.

    You can INSERT into both tables within one Transaction but not in one statement. By the way, you would need to alter your dbo.Test1 table to allow null for first INSERT test2_id column
    See sample code below:
    CREATE TABLE #test1(test1_ID INT IDENTITY(1,1),test2_id INT NULL)
    CREATE TABLE #test2(test2_ID INT IDENTITY(1,1),test1_ID INT)
    DECLARE @Test1dentity INT
    DECLARE @Test2dentity INT
    BEGIN TRAN
    -- Insert NULL as test2_ID value is unknown
    INSERT INTO #test1(test2_ID)
    SELECT NULL;
    -- get inserted identity value
    SET @Test1dentity = SCOPE_IDENTITY();
    INSERT INTO #test2(test1_ID)
    SELECT @Test1dentity;
    -- get inserted identity value
    SET @Test2dentity = SCOPE_IDENTITY();
    -- Update test1 table
    UPDATE #test1
    SET test2_ID = @Test2dentity
    WHERE test1_ID = @Test1dentity;
    COMMIT
    SELECT * FROM #test1;
    SELECT * FROM #test2;
    -- Drop temp tables
    IF OBJECT_ID('tempdb..#test1') IS NOT NULL
    BEGIN
    DROP TABLE #test1
    END
    IF OBJECT_ID('tempdb..#test2') IS NOT NULL
    BEGIN
    DROP TABLE #test2
    END
    web: www.ronnierahman.com

  • Inserting/Updating data pertaining to future or past

    I am considering to use OWM to implement several lookup tables that need to keep track of data versions over time.
    One of the requirements of the application is the capability to insert or update data at any point in time, but this data should only (automatically) be available for lookup at some future point in time.
    Similarly, I need the capability to insert/update data with an effective date at some point in time in the past.
    Is it possible to make data effective from some point in the future or past with OWM ?

    The current 9.2.0.3.0 release of Workspace Manager includes support for Valid Time.
    After enableversioning a table with the Valid Time option, you will be able to insert/update rows that are associated with a particular valid time range. A procedure, setValidTime, can be used to specify the interval for which rows are effectively inserted, updated, and deleted. This date interval can also be used to limit which rows are returned from a select query.
    The documentation for the 9.2.0.3.0 release includes all the additional information pertaining to valid time support.
    Ben

  • How to insert the data system created table throuch RFC

    How can i Insert any data  system created table like MARC T100w .... throuh RFC.
    I created Funstion module.
    MY Email Address : [email protected]
                                   [email protected]

    Hello Chandan
    It is pure madness to update or modify tables like MARC or T100W directly, whether on remote systems or locally.
    If you need to update or modify such tables on remote system search for the appropriate <b>BAPI </b>(e.g. in case of MARC use BAPI_MATERIAL_SAVEDATA).
    Regards
      Uwe

  • How to insert text data into temp tables....

    Dear All,
    I have one notepad with three columns, first column is segment1, second column is segment2 & third column is price list....
    and there is no delimiter and exact spaces..(i.e, zizak fomat)
    Ex:-
    xx yy 00009999
    kk mmmm 00009333
    Data is available like above example...So, I need to insert this data into one table.(2LAKSHS OF RECORDS AVAILABLE IN THAT NOTEPAD)
    So, Any can one help me, how to insert this kind of text data into temparory table...
    Regards
    Krishna
    Edited by: user12070109 on May 29, 2010 9:48 PM
    Edited by: user12070109 on May 29, 2010 9:49 PM

    Hello,
    What manu suggested this can be done through oracle forms.
    If as i read your last post you are using that in database it will not work in db. Try to use the same process in oracle forms will work by making some changes.
    And if you don't want to use forms then there is one way using SQL LOADER. It required control file to execute for uploading data.
    See the below link.
    http://www.orafaq.com/wiki/SQL*Loader_FAQ
    In this example its showing filename.csv you can use your file name like yourfilename.txt.
    So your control file will look like this...
    load data
    infile 'file_path\file_name.txt'
    into table table_name  -- use actual table name where you want to upload data
    fields terminated by " "  -- Here using spaces as you mentioned           
    (column1, column2, column3)  -- Here use the three column names of tableAnd after creating control file with the above code. You can call it in command prompt like this
    sqlldr username/password control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
    or
    sqlldr username/password@dbconnection control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
    Before doing this practice make sure SQLLDR.exe availabe in the machine where you have to execute. Otherwise you will have to install db client for using sqlldr.exe
    -Ammad

  • Insertion of data between 2 tables ( 1 to * relationship )

    Hi all, I am new to Oracle ADF, I have a problem with the insertion of data between 2 tables (Table A and Table B), I have the ratio 1 to *, and I need to insert data in table B (* Relationship) when insert in Table A all goes well, but when inserted in Table B, I need the primary key value in Table A () in the value field in table B that is as foreign key.
    Ie
    Value Table A
    coda = 20 -> primary key
    Table B values
    1 set of values
    val_1,
    val_2,
    val_3,
    coda = 20 -> need this value is constant up to do a Commit.
    set of values 2
    val_1,
    val_2,
    val_3,
    coda = 20 -> need this value is constant up to do a Commit.
    How I can do it?
    thanks

    Thanks for you answers 'M.Jabr'
    I was wrong, because the relationship 1 to * between tables A and B, I was writing the groovy expression in each table, in this case in Table B (A.codSolicitude), but now I notice that within the DataControls, but specifically in the control data of Table A, there is a relationship between the board B, and I thought to insert into the related table that appears as a master/detail, and first inset in table A and then in Table B in the same page master/detail, and A.CodSolicitude value is automatically filled in Table B, and performed the Commit and everything works. !
    Thanks for you help.
    Now if you can give me some examples with images that are on the web similar to this problem would be great:) Thanks!

  • Creating a external content type for Read and Update data from two tables in sqlserver using sharepoint designer

    Hi
    how to create a external content type for  Read and Update data from two tables in  sqlserver using sharepoint designer 2010
    i created a bcs service using centraladministration site
    i have two tables in sqlserver
    1)Employee
    -empno
    -firstname
    -lastname
    2)EmpDepartment
    -empno
    -deptno
    -location
    i want to just create a list to display employee details from two tables
    empid firstname deptno location
    and same time update  in two tables
    adil

    When I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list.  When I attempt to edit it, I get an error:
    External List fails when attached to a SQL view        
    Sorry, something went wrong
    Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
    I can edit the view in SQL Manager, so it seems strange that it fails.
    Any advice would be greatly GREATLY appreciated. 
    Thanks,
    Randy

  • Efficient way of updating data to database table

    what is the efficient way of updating data to database table  .
    i have huge amount of data in my internal table  , how to use update statement in this case .
    1. database table having 20 fields  ,
    2. one is key field and suppose 20 th field i want to change  .
    3. I have data for only 2 fields , i.e for ( 1 st and last 20 th field ) .
    i can't use update statement in loop , as it is not good practice(hits database several times ) .
    do it effects all the 20 fields for  particular record .

    Hi,
    Use UPDATE statement , check below description from SAP help.
    UPDATE dbtab FROM TABLE itab. or UPDATE (dbtabname) FROM TABLE itab.
    Effect
    Mass update of several lines in a database table.Here, the primary key for identifying the lines tobe updated and the values to be changed are taken from the lines of theinternal table itab. 
    The system field SY-DBCNT contains the number of updated lines,i.e. the number of lines in the internal table itab which havekey values corresponding to lines in the database table.
    Regards
    L Appana

  • Send data to ECC table through RFC Call function from SAP B1 via  b1if

    Hi,
    I have created scenario in B1if which triggers from SAP B1, now I have to send this data in to ECC table, so I have created scenario for that with inbound SAP B1, outbound void and in process RFC Call atom is there but I am not getting data in receiver and also how to write xml to send data in RFC function. Function for RFC has configured from ECC end and have access of that function.
    So please help me to send data to ECC table through RFC Call function from SAP B1 (9.0) via b1if
    Thanks

    Solved by my own.

Maybe you are looking for

  • Lack of support for Canon G7 and G9. Alternatives?

    I am really disappointed about the lack of support for the Canon G9, and looking at the list of compatible cameras (http://docs.info.apple.com/article.html?artnum=306835) I notice that Canon G7 - even if it does not have a RAW format, is not supporte

  • Linked cdr files causing problems in InDesign

    I have a Pagemaker file I am trying to open in InDesign. The PageMaker file has linked Corel Draw (cdr) files in the document. When I open the PageMaker file in InDesign, I am having problems with linked cdr files. The graphics come out blurry and I

  • Playing midi back via Roland TD30 Module.....

    I can record my drum parts into Garageband via midi no problem at all.... What I would like to do is to play them back via the module not the inbuilt GarageBand sounds.... Is this possible and if so how doI do it? If not, what software would let me d

  • Cd drive doesn't work after upgrade

    why doesnt the cd drive work after upgrade to mountain lion 10.8.5

  • Pismo won't boot after screen replacement?

    I just replaced the screen on one of my Pismos with the iFixit guide. Now, when I hit the power button, I get the boot chime and I hear the fan whir, but that's it. No hard drive noises and nothing on the screen. It won't boot off another Pismo in TD