Inserting Blob over db link issue

Hi,
We have a customer who has a db link which links from a 9.2.0.5.0 oracle database to a 10.2.0.2.0 oracle database. We also have the exact same setup here internally (9.2.0.5.0 -> 10.2.0.2.0). The issue is that when we try to do a SELECT FROM table (INSERT INTO table@dblink); on our customers system the row is inserted correctly apart from one column which is of type BLOB. No errors are raised but the content of the BLOB field is always empty, all other fields are inserted correctly.
When we try the same thing on our system internally, the BLOB inserts across the db link fine. To add further complication on both our system and our customers system we can successfully select blob content from the 10g database to the 9i database with no problems.
It appears that the problem is only when inserting from the 9i database to the
10g database, and only on our customers system. We cannot replicate this issue.
This has always worked on our system, we have only ever had brief intermittent
success with their system and we don't know why.
Has anyone had similar experiences or problems when using dblinks and blobs?
Does anyone know if we can enable debug/trace in a way such that it will capture the unsuccessful BLOB insert?
Could there potentially be any additional contributing factors, or operating system/network related influences that are preventing the BLOB data from being inserted?
If anybody has any relevant answers to any of these questions we would really appreciate it.
Thanks in advance,
Lee.

Hi, could anyone help me with this?

Similar Messages

  • Error insert data over db link in table covered by materialized view

    Hello together,
    following problem:
    I got a table called LOCATION_INFO which is defined:
    create table LOCATION_INFO
    LOCATION_ID VARCHAR2(40) not null,
    PLANT VARCHAR2(4) not null,
    PRODUCT VARCHAR2(3),
    AREA VARCHAR2(1),
    LINE NUMBER(10),
    STATION NUMBER(10),
    STATINDEX NUMBER(10),
    FU NUMBER(10),
    WP NUMBER(10),
    TP NUMBER(10),
    LOCATION_LEVEL NUMBER(1) not null,
    LOCATION_PARENT_ID VARCHAR2(40),
    TIME_STAMP TIMESTAMP(6) WITH TIME ZONE not null
    I try to load data over PL/SQL procedure from another database using database link:
    INSERT INTO LOCATION_INFO
    (LOCATION_ID,
    PLANT,
    PRODUCT,
    AREA,
    LINE,
    STATION,
    STATINDEX,
    FU,
    WP,
    TP,
    LOCATION_LEVEL,
    LOCATION_PARENT_ID,
    TIME_STAMP)
    SELECT LOCATION_ID,
    PLANT,
    PRODUCT,
    AREA,
    LINE,
    STATION,
    STATINDEX,
    FU,
    WP,
    TP,
    LOCATION_LEVEL,
    LOCATION_PARENT_ID,
    GetUTCDateTime(TIME_STAMP) AS time_Stamp
    FROM LOCATION_INFO@SOURCE_MMPDDB
    WHERE ROWNUM < 100;
    This works fine (If i do select count(*) from location_info the data is present) but if set a commit
    ORA-00603 appears and the session is terminated.
    The point is i got a materialized view MVIEW_LOCATIONS in another schema in the database reading the data from my table location_info and a corresponding MVIEWLOG.
    create table MLOG$_LOCATION_INFO
    LOCATION_ID VARCHAR2(40),
    SNAPTIME$$ DATE,
    DMLTYPE$$ VARCHAR2(1),
    OLD_NEW$$ VARCHAR2(1),
    CHANGE_VECTOR$$ RAW(255)
    CREATE MATERIALIZED VIEW MVIEW_LOCATIONS
    REFRESH FAST ON COMMIT
    ENABLE QUERY REWRITE
    AS
    SELECT "LOCATION_INFO"."LOCATION_ID" "LOCATION_ID","LOCATION_INFO"."PLANT" "PLANT","LOCATION_INFO"."PRODUCT" "PRODUCT","LOCATION_INFO"."AREA" "AREA","LOCATION_INFO"."LINE" "LINE","LOCATION_INFO"."STATION" "STATION","LOCATION_INFO"."STATINDEX" "STATINDEX","LOCATION_INFO"."FU" "FU","LOCATION_INFO"."WP" "WP","LOCATION_INFO"."TP" "TP","LOCATION_INFO"."LOCATION_LEVEL" "LOCATION_LEVEL","LOCATION_INFO"."LOCATION_PARENT_ID" "LOCATION_PARENT_ID","LOCATION_INFO"."TIME_STAMP" "TIME_STAMP" FROM "CP4MMPDNEW"."LOCATION_INFO" "LOCATION_INFO";
    What do I need to do to make the insert working properly without deleting my mviews?
    Can anyone help me?
    Thanks, Matthias

    Helllo,
    Can you change this on your Materialized View DDL:
    REFRESH FAST ON COMMITTo:
    REFRESH FAST ON DEMANDThen, if your INSERT and COMMIT works OK then, can you try:
    exec DBMS_MVIEW.REFRESH('MVIEW_LOCATIONS')

  • Report over database link error

    Good morning all.
    I have a database link LINKA from USERA on LOCALSERVER to USERB on REMOTESERVER.
    (create database link LINKA connect to USERB identified by mypassword using validtns)
    In USERC on REMOTESERVER I have a TABLEX, with grant all on TABLEX to USERB on REMOTESERVER.
    In USERB on REMOTESERVER I have a view TABLEXV, select * from USERC.TABLEX
    From USERA on LOCALSERVER I can select * from TABLEXV@LINKA. In fact I can insert/update/delete tablexv from USERA.
    I also have a view TABLEXV on USERA, select * from TABLEXV@LINKA. I can also select/insert/update/delete from USERA.TABLEXV.
    So far so good - all working as expected.
    Then, my APEX app on LOCALSERVER, interactive report, parsing schema USERA, querying TABLEXV, I get the following:
    when "Exclude Link Column", I get the error "The requested URL /pls/apex/f was not found on server.
    when "Link to Single Row View", report displays correctly.
    when "Link to Custom Target", I get the error "The requested URL /pls/apex/f was not found on server.
    When I run the select * from TABLEXV as a regular report (i.e. not interactive), I also get the error.
    So the only time I get the report displayed correctly is using IR and "Link to Single Row View".
    However, clicking on the link (for Single Row View) I get "The requested URL /pls/apex/wwv_flow.show was not found on this server.".
    To summarize:
    - accessing table via view over database link
    - works outside of apex without issue
    - inside only works when Link to Single Row View set
    - But clicking on link fails
    I could live with just having the Link to Singe Row View option if I could disable displaying of the icon so that the user cant click on it.
    APEX 3.2.00.27
    EE Database - 10.2.0.3 (yes I know out of support)
    Remote EE Database - 10.2.0.5
    Real object names replaced to protect the innocent!
    Anyone got any clues?
    I have used remote tables many times in my APEX applications and never had this issue.
    Thanks,
    Rob @ very confused .com

    Good morning all.
    I have a database link LINKA from USERA on LOCALSERVER to USERB on REMOTESERVER.
    (create database link LINKA connect to USERB identified by mypassword using validtns)
    In USERC on REMOTESERVER I have a TABLEX, with grant all on TABLEX to USERB on REMOTESERVER.
    In USERB on REMOTESERVER I have a view TABLEXV, select * from USERC.TABLEX
    From USERA on LOCALSERVER I can select * from TABLEXV@LINKA. In fact I can insert/update/delete tablexv from USERA.
    I also have a view TABLEXV on USERA, select * from TABLEXV@LINKA. I can also select/insert/update/delete from USERA.TABLEXV.
    So far so good - all working as expected.
    Then, my APEX app on LOCALSERVER, interactive report, parsing schema USERA, querying TABLEXV, I get the following:
    when "Exclude Link Column", I get the error "The requested URL /pls/apex/f was not found on server.
    when "Link to Single Row View", report displays correctly.
    when "Link to Custom Target", I get the error "The requested URL /pls/apex/f was not found on server.
    When I run the select * from TABLEXV as a regular report (i.e. not interactive), I also get the error.
    So the only time I get the report displayed correctly is using IR and "Link to Single Row View".
    However, clicking on the link (for Single Row View) I get "The requested URL /pls/apex/wwv_flow.show was not found on this server.".
    To summarize:
    - accessing table via view over database link
    - works outside of apex without issue
    - inside only works when Link to Single Row View set
    - But clicking on link fails
    I could live with just having the Link to Singe Row View option if I could disable displaying of the icon so that the user cant click on it.
    APEX 3.2.00.27
    EE Database - 10.2.0.3 (yes I know out of support)
    Remote EE Database - 10.2.0.5
    Real object names replaced to protect the innocent!
    Anyone got any clues?
    I have used remote tables many times in my APEX applications and never had this issue.
    Thanks,
    Rob @ very confused .com

  • Urgent -- DB link issue

    Hi,
    Can we tranfer CLOB data type over DBlink?
    I heared we cannot tranfer CLOB data over DB link.So i'm having varchar data type and collects data into varchar variable and insert into removed table's clob column over db link.
    Now i couldnt tranfer more than 4000 chars. But i want to tranfer 32000 chars..
    Please give me some suggestions..
    Thanks,
    Sujeeth

    Thanks for your updates..
    Still i'm having issue..
    The following procedure is working fine for me
    Here i declared xml_msg_in as varchar and in the same procedure i'm inserting into dstb_to_wm_msg table's XML_DATA column which is CLOB
    Declare
    xml_msg_in varchar(32767);
    Successful One:
    Begin
    xml_msg_in :=rpad('#',31999,'#');
    insert into dstb_to_wm_msg("CREATE_DT","CREATED_BY","STATUS","MSG_TYPE","REC_NUM","APP_NAME","MSG_ID","XML_DATA") values (to_date('26-JUL-07','DD-MON-RR'),'OPRDV91','Y','item1',44447,'dwh','18523998',xml_msg_in);
    commit;
    End;
    =================
    Now my issue is, instead of inserting dstb_to_wm_msg table in same procedure i'm
    passing this xml_msg_in varchar value to some other procdure(DWM_SEND_OUT_MSG_SP). In DWM_SEND_OUT_MSG_SP procedure i'm inserting into dstb_to_wm_msg table. Here only i'm getting error message.
    Please refer the following one which is failing
    declare
    xml_msg_in varchar(32767);
    begin
    xml_msg_in := rpad('#',31999,'#');
    DWM_SEND_OUT_MSG_SP('item1',
    'dwh',
    xml_msg_in,
    lpad(12367, 8, '0'),
    'IMMEDIATE',
    'Test');
    DBMS_OUTPUT.PUT_LINE('SQLCODE : ' || SQLCODE);
    DBMS_OUTPUT.PUT_LINE('SQLERRM : ' || SQLERRM);
    end;
    ==========================
    DWM_SEND_OUT_MSG_SP procedure is as follows
    PROCEDURE dwm_send_out_msg_sp(msg_type_in IN VARCHAR,
    app_name_in IN VARCHAR,
    xml_msg_in IN VARCHAR,
    msg_id_in IN VARCHAR,
    msg_pri_in IN VARCHAR,
    prg_name_in IN VARCHAR)
    Begin
    Using this xml_msg_in variable we are just inserting into dstb_to_wm_msg table which is in Remote database.
    End;
    My aim is to send 32000 characters to remote database table (dstb_to_wm_msg) . I'm not in the position to change is table(dstb_to_wm_msg) column (xml_data)CLOB to Varchar.
    Thanks for your support.
    sujeeth

  • Insert Loop through a Report or Insert using a Column Link

    Hello!
    I think I have an easy one.
    I have created a site that tracks "issues" with the curriculum of a university's courses. If a curriculum developer sees something that must be updated, they use this site to log the "issue" so we have a running list of how the curriculum has changed for the particular course or courses. Some "issues" span multiple courses, so a table was created to allow the issue to be associated with as many courses as necessary.
    The "Courses" table holds a list of all courses at the university
    The "Issue_Courses" table combines the primary key for the "issue" and the "course" and creates the association between issues and courses.
    The page users use to create the associations has a report called "add_courses" which is searchable and filterable so the user can narrow down the list of courses they want to view (the list is well into the thousands), and this report contains a column with check boxes. This page also contains a hidden field containing the primary key for the issue, "p13_Issue_ID"
    I would like to create an insert statement that grabs the primary key for the issue from "p13_issue_ID" and loops through the report, inserting a new record for each checked box in the report. Any assistance would be great! Admittedly, my sql is pretty week.
    Another option that I think would work, if possible, would be to have a "column link" that simply runs the insert process by grabbing the issue primary key from "p13_issue_ID" and the course id from the report. Then, the user could simply click on an "Add" link or something similar on the report, which would run the insert statement, and basically create that association. Is this possible?
    Thanks in advance!
    Edited by: 846852 on Mar 23, 2011 3:12 PM
    Edited by: 846852 on Mar 23, 2011 3:14 PM

    Start with adding a checkbox column to the report in page (13 ??)
    select apex_item.checkbox(1,course_id) CHECK
           ,course_name
    FROM courses
    I assumed that course_id is the PK of the courses table , if not change the column names appropriately
    In report attributes of the "CHECK" column, change the column type to "*Standard Report Column*" (important).
    Now you should see a report with courses lists and checkboxes to choose them, You can also do the same with an interactive report(if you want to use it features to filter down records)
    Inorder to process the records create a PLSQL process that loops over the selected records(courses) and creates the relation in the Issue courses table using the hidden item and checked course primary key(course_id above)
    DECLARE
      ln_course_id NUMBER;
    BEGIN
      FOR 1 IN 1..APEX_APPLICATION.G_f01.COUNT
      LOOP
        ln_course_id := APEX_APPLICATION.G_f01(i);
        --Insert new relation using Issue Id and course ID
        INSERT INTO ISSUE_COURSES(course_id,issue_id) VALUES( ln_course_id,:P13_ISSUE_ID);
      END LOOP;
    END;If you have a submit/save button , make the process conditional for that button.

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Inserting blob data into database

    Hello everybody,
    I need insert blob data into database. that data i need to get from form
    can i use request.getParameter(""); for getting that file.
    Plz help how to get data from form to servlet and through callablestatement i need to insert into database.
    regards,
    Anil

    Hi,
    1) first create a form with file element
    first.jsp
    <form action="GetData" enctype="multipart/form-data" method="post">
    <input type="file" name="datafile" size="40">
    <input type="submit" value="Send">
    <input type="reset" name="Reset" value="Cancel">
    </form>
    GetData.java
    // servlet file
    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
    res.setContentType("text/html");
    PrintWriter out = response.getWriter();
    try {
    System.setProperty( "jdbc.drivers", "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
    Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
    con = DriverManager.getConnection( "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=JAVATEAM;SelectMethod=cursor;User=sa;Password=urpassword" );
    PreparedStatement pst = con.prepareStatement("insert into uploads(binaryfile) values(?)");
    FileInputStream fis=new FileInputStream(request.getParameter ( "datafile" ) );
    byte[] b= new byte[fis.available()+1];
    fis.read(b);
    pst.setBytes(1,b);
    pst.executeUpdate();
    pst.close();
    con.close();
    catch(SQLException e)
    out.println ( e);
    catch (ClassNotFoundException e)
    out.println( e );
    }Here in doPost(), i create preparedstatement,
    now you to create one procedure for insert
    and by using callable statement you just call that procedure and pass this byte b as arguments,
    now its in your hands
    my idea is over.

  • A link issue, conflict between hyperlink and textframe

    Hi all,
    I noticed some unpredictable behavior after creating a normal textual hyperlink in a textframe. Although the link appeared ok when previewing (both in Muse preview mode, as in a preview browser (Chrome)) it had suddenly changed its state when I was about to click it. After some puzzled attempts I noticed that the hyperlink changes into the 'hover' state once the mouse is over the textframe which contains the link, and not the link itself. When I click the link the behavior is as predicted, but moving off the textframe, and re-entering gives the same effect. Somehow the textframe catches the mouseover event, in stead of the link. Is there a way to disable this behavior, and target the hyperlink in stead? Many thanks in advance. (I searched for this issue in the forum, and encountered similar issues with menus, but not with textframes, if I overlooked an answer, my apologies in advance.

    Hi Abhishek,
    Yes, you did it again. I checked the states of the text-field (didn't discover this option until now), and found that the field itself somehow had states. Now I understand why the states of the hyperlinks were overruled. Assuming that these field-states can be removed I selected the uppermost state, and clicked the trash-can. The links behave normally now. Following your suggestion I post a couple of screenshots (it doesn't show the mouse position) of the unwanted situation, and of the corrected version:
    Above: this is the default state with the links in the text field defined in 2 distinct styles, and the mouse somewhere off the field.
    Above: this is the unwanted situation where the mouse enters the text-field without rolling over individual links, they jump into 'hover'.
    Above, this is the wanted situation, the text-field has no states anymore, the mouse hovers over the text-field, and over the encircled link, which behaves accordingly.
    Nifty, I now realise that there are many things you can easily overlook here ;-)
    Thanks again Abhishek.
    This thoughtful product support is as good as Adobe's customer support in general.
    Next time I encounter unexpected issues, I will thoroughly check all possibilities.
    Cheers,
    Eelco

  • Something is wrong with the captions if i hover over a link it shows and empty box

    if i hover over a link, etc. i get a blank box under my cursor instead of a description

    Issues with tooltips not working properly have been reported to be caused by the Google Toolbar (Tools > Add-ons > Extensions)
    You can check if there is an update available that fixes that issue.
    You can try to uninstall and reinstall the latest GT, that has been reported to work.
    * http://www.google.com/tools/firefox/toolbar/FT5/intl/en/
    * http://tools.google.com/tools/firefox/toolbar/FT5/intl/en/install.html

  • Fetching LongRAW  over DB link results in ORA-1406 error

    How to FETCH LONG RAW values from remote DB into PLSQL cursor variable.
    Following is my sample code, where in column MESSAGE_xxx_FILE in XXXX table is defined as LONG RAW.
    ++++++++++++++++++++++++
    declare
    CURSOR cur IS SELECT MESSAGE_xxx_FILE FROM xxxx;
    l_MESSAGE_xxx_FILE LONG RAW;
    l_error VARCHAR2(500) := NULL;
    cnt number;
    begin
    open cur;
    loop
    dbms_output.put_line ('befire fetcg ');
    fetch cur into l_MESSAGE_xxx_FILE;
    dbms_output.put_line ('after fetcg ');
    exit when cur_bipi_e2b_ach%notfound;
    cnt := cur_bipi_e2b_ach%ROWCOUNT;
    END LOOP;
    close cur;
    EXCEPTION
    WHEN OTHERS THEN
    l_error := SQLCODE||'-'||SQLERRM;
    dbms_output.put_line ('ERROR AT END '||SUBSTR(l_error,1,475)||' at '||cnt);
    END;
    ++++++++++++++++++++++++
    This is just a sample code. My actual requirement is to get the LONG RAW value over DB LINK, that is, my cursor would be CURSOR cur IS SELECT MESSAGE_xxx_FILE FROM xxxx@db_link;
    Message was edited by:
    vishnuvv

    You can not read/write LONG/LONG RAW columns through DB Link.
    You should consider having CLOB/BLOB instead.

  • URL link issue

    Hi
    I am trying to create a link in my project to one of our
    company intranet pages. I am using a click box and the URL - it
    works fine in the Preview from Slide or next 5 slides, but when I
    Preview in Web Browser it doesn't connect. Any suggestions as to
    what might be the cause?
    Thanks
    Alex

    Hi Alex
    Hmmm, before investigating too deeply, I'm seeing some
    familiarity here. For starters, the first link is to a .PDF. It's
    been my experience that links to .PDF and Word .DOC files is "iffy"
    at best. If you truly copied and pasted the links, I'd first try
    removing the %20 from that first link. That's something the browser
    normally inserts for a space. So instead of:
    http://wlgweb/Corporat/HumanResources/Staff%20Conduct/EmailInternetUsagePolicy.pdf
    Change it to read:
    http://wlgweb/Corporat/HumanResources/Staff
    Conduct/EmailInternetUsagePolicy.pdf
    This may help and it may just be twisting in the wind. But
    I'd try that first. I've often seen linking issues arise from that
    silly %20. If possible, try to avoid that. I'm guessing here that
    it may not be possible to control in your case as someone else may
    be in control of those names. I've personally always opted to
    either use a mix of upper/lower case names ( StaffConduct ) or
    substitution of an underscore where spaces would normally occur (
    Staff_Conduct ).
    Other wierdness I've seen when linking to .PDF content:
    * I personally had a different PDF reader (Foxit) installed
    as my default. When Foxit was my default reader, PDF links refused
    to open.
    * I think this one is IE specific, but I've also seen it
    where if I have a .PDF in the same folder and open that way, even
    though the address is totally correct, the first time through, the
    link fails. With the totally correct address showing in the address
    bar. I simply refresh the page and bingo, the PDF shows! Go figure.
    I really don't believe that this one is related to Captivate and
    the way it calls the links. My gut tells me it's an IE thing. But I
    have nothing to back me up on this.
    I'm not sure what to say or suggest for the second link. I
    tested it myself and it doesn't work, which tells me that either
    the link is simply incorrect, or possibly it's located on an
    intranet site.
    Sincerely... Rick

  • RegisterOutParameter - setBinaryStream - Problems inserting Blob - setRAW

    As posted in metalink (was: "Problems inserting BLOB/InputStream with ojdbc14.jar for 10g - Data size bigger than max size for this type"):
    Using setBinaryStream for large Blobs works as long as I don't register outParameters.
    Query that works: "INSERT INTO blobtest (attachment_id,name,data) VALUES(blobtest_SEQ.nextval,?,?)";
    Query that fails = "BEGIN INSERT INTO blobtest (attachment_id,name,data) VALUES( blobtest_SEQ.nextval,?,?) RETURN attachment_id INTO ? ; END;"
    The necessary tables were created by hand:
    CREATE TABLE blobtest ( NAME CHAR(255), data BLOB, attachment_id NUMBER(38))
    And
    CREATE SEQUENCE TBL_ATTACHMENT_SEQ
    The output was: <<user: SEE
    pw: QD
    instantiating oracle driver
    query: INSERT INTO blobtest (attachment_id,name,data) VALUES(TBL_ATTACHMENT_SEQ.nextval,?,?)
    uploaded no Return Parameter blob of size: 256809
    query: BEGIN INSERT INTO blobtest (attachment_id,name,data) VALUES(TBL_ATTACHMENT_SEQ.nextval,?,?) RETURN attachment_id INTO ? ; END;
    java.sql.SQLException: Datengr÷&#9600;e gr÷&#9600;er als max. Gr÷&#9600;e f³r diesen Typ: 256809
    at
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
    :125)
    at
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
    :162)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setRAW(OraclePreparedState
    ment.java:5342)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setBinaryStreamInternal(Or
    aclePreparedStatement.java:6885)
    at
    oracle.jdbc.driver.OracleCallableStatement.setBinaryStream(OracleCall
    ableStatement.java:4489)
    at BlobTest.writeBlob(BlobTest.java:161)
    at BlobTest.testBlob(BlobTest.java:118)
    at BlobTest.main(BlobTest.java:92)
    error: Datengr÷&#9600;e gr÷&#9600;er als max. Gr÷&#9600;e f³r diesen Typ:
    256809>>
    here the java test case:
    * Created on 25.08.2004 $Id: BlobTest.java,v 1.4 2005/04/22 11:21:11 hauser Exp $
    * as posted in metalink jdbc forum 050405 and responses by
    * [email protected]
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.InputStream;
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.Types;
    public class BlobTest {
    private static String FILE_NAME = "c:/temp/veryLargeFile.pdf";
    public BlobTest() {
    final static int ORACLE = 1;
    final static int MYSQL = 2;
    private String jdbcUrl = "jdbc:mysql://localhost/test?user=monty&password=greatsqldb";
    private int dbType = ORACLE;
    private Driver driver = null;
    private String user = "";
    private String pw = "";
    public static String SCHEME = "";
    public static void main(String[] args) {
    BlobTest bt = new BlobTest();
    if (args[0] != null) {
    System.out.println("dbType: " + args[0]);
    if (args[0].toLowerCase().indexOf("oracle") != -1) {
    bt.dbType = ORACLE;
    if (args[0].toLowerCase().indexOf("mysql") != -1) {
    bt.dbType = MYSQL;
    } else {
    System.out.println("not yet supported db type: " + args[0]);
    System.exit(99);
    if (args[1] != null) {
    System.out.println("jdbcUrl: " + args[1]);
    if (args[1].trim().length() != 0) {
    bt.jdbcUrl = args[1].trim();
    } else {
    System.out.println("not yet supported jdbcUrl : " + args[1]);
    System.exit(99);
    if (args.length > 2 && args[2] != null) {
    System.out.println("user: " + args[2]);
    if (args[2].trim().length() != 0) {
    bt.user = args[2].trim();
    } else {
    System.out.println("invalid user: " + args[2]);
    System.exit(99);
    if (args.length > 3 && args[3] != null) {
    System.out.println("pw: " + args[3].substring(0, 2));
    if (args[3].trim().length() != 0) {
    bt.pw = args[3].trim();
    } else {
    System.out.println("invalid filename: " + args[3]);
    System.exit(99);
    if (args.length > 4 && args[4] != null) {
    System.out.println("filename: " + args[4]);
    if (args[4].trim().length() != 0) {
    FILE_NAME = args[4].trim();
    } else {
    System.out.println("invalid filename: " + args[4]);
    System.exit(99);
    bt.setUp();
    bt.testBlob();
    public void setUp() {
    try {
    if (this.dbType == ORACLE) {
    System.out.println("instantiating oracle driver ");
    this.driver = (Driver) Class.forName(
    "oracle.jdbc.driver.OracleDriver").newInstance();
    } else {
    this.driver = (Driver) Class.forName("com.mysql.jdbc.Driver")
    .newInstance();
    if (this.driver == null) {
    System.out.println("oracle driver is null");
    System.exit(88);
    DriverManager.registerDriver(this.driver);
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println("error: " + e.getMessage());
    public void testBlob() {
    try {
    this.writeBlob();
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println("error: " + e.getMessage());
    * testfunction
    private void writeBlob() throws Exception {
    Connection conn = null;
    PreparedStatement pStmt = null;
    CallableStatement cStmt, cStmt2 = null;
    InputStream in = null;
    try {
    File file = new File(BlobTest.FILE_NAME);
    in = new FileInputStream(file);
    conn = DriverManager.getConnection("jdbc:" + this.jdbcUrl,
    this.user, this.pw);
    conn.setAutoCommit(false);
    String queryWorks = "INSERT INTO " + SCHEME
    + "blobtest (attachment_id,name,data) VALUES(" + SCHEME
    + "TBL_ATTACHMENT_SEQ.nextval,?,?)";
    cStmt = conn.prepareCall(queryWorks);
    System.out.println("query: " + queryWorks);
    cStmt.setString(1, file.getAbsolutePath());
    in = new FileInputStream(file);
    cStmt.setBinaryStream(2, in, (int) file.length());
    cStmt.execute();
    System.out.println("uploaded no Return Parameter blob of size: "
    + file.length());
    conn.commit();
    String queryFails = "BEGIN INSERT INTO " + SCHEME
    + "blobtest (attachment_id,name,data) VALUES(" + SCHEME
    + "TBL_ATTACHMENT_SEQ.nextval,?,?)"
    + " RETURN attachment_id INTO ? ; END;";
    cStmt2 = conn.prepareCall(queryFails);
    System.out.println("query: " + queryFails);
    cStmt2.setString(1, file.getAbsolutePath());
    in = new FileInputStream(file);
    cStmt2.setBinaryStream(2, in, (int) file.length());
    cStmt2.registerOutParameter(3, Types.INTEGER);
    cStmt2.execute();
    System.out.println("uploaded blob of size: " + file.length()
    + " - id: " + cStmt2.getInt(3));
    conn.commit();
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println("error: " + e.getMessage() + "\nname: "
    + BlobTest.FILE_NAME);
    if (conn != null) {
    try {
    conn.rollback();
    } catch (Exception e1) {
    throw e;
    } finally {
    if (in != null) {
    try {
    in.close();
    } catch (Exception e) {
    if (pStmt != null) {
    try {
    pStmt.close();
    } catch (Exception e) {
    if (conn != null) {
    try {
    conn.close();
    } catch (Exception e) {
    and the batch file I use to start:
    @setlocal
    @echo off
    rem $Id: runBlobTest.bat,v 1.2 2005/04/21 15:06:22 hauser Exp $
    set classpath=../WEB-INF/classes;../WEB-INF/lib/ojdbc14.jar;
    echo JAVA_HOME: %JAVA_HOME%
    set JAVA_HOME=C:\PROGRA~1\Java\j2re1.4.1_02\
    echo classpath: %classpath%
    set javaCmd=C:\PROGRA~1\Java\j2re1.4.1_02\bin\java
    %javaCmd% -version
    %javaCmd% BlobTest "oracle" "oracle:thin://@ORADB.yourdomain.COM:1521:t300" "username" "password" "C:\Temp\veryLargeFile.pdf"
    endlocal

    Apparently, this is partially known - with a different stacktrace though:
    <<From: Oracle, Anupama Srinivasan 25-Apr-05 07:15
    Can you please check on Bug:4083226?
    Using the RETURNING Clause is not supported with JDBC. You could embed the statement in PL/SQL Block as in Metalink Note 124268.1 - JDBC Support for DML Returning Clause.
    The Enhancement Request filed on this issue is being considered for Release 10.2
    >>
    And my answer to it.
    Using the RETURNING Clause is not supported with JDBC.This is strange, with just "emptyblob()", it DOES work.
    I guess, our work-around that hopefully is more portable than embedding a "PL/SQL Block" will be to
    1) create the record with an empty blob,
    2) update the blob in a second statement (now, a RETURNING statement is no longer needed)

  • Creating Views over DB links

    I have a requirement to create views in 3 different versions of Oracle 8i, 9i and 10g. All the views will be created over DB links and the source tables reside in an Oracle 10g instance. Other than the performance is anybody aware of any other issues with this approach?
    Thanks
    Martin

    Again, though, you're going to need to be more specific about the database releases...
    Database links between 10.2 and 8.1.7 are supported.
    Database links between 10.2 and 9.2 require that the 9.2 end be on 9.2.0.4 or later
    Database links between 10.1 and 8.1.7 require that the 8.1.7 end be on 8.1.7.4 or later
    Database links between 10.1 and 9.2 are supported
    You'll want to review the Client/Server Interoperability Matrix on Metalink to get more detailed information on what is and is not supported.
    Justin

  • WLC Redundancy over L3 link

    Hi All,
    Is it possible to deploy WLC redundancy over L3 link???
    In our scenario we have 2 controllers located in 2 different sites, the link between the site is L3. AP's are deployed across four other locations, two are coming to site 1 and rest two are coming to site 2 . How can i make redundancy on this setup , Please advice
    Controller is 4404 and AP's are 1231G series .
    Regards
    Aslam ...

    What is your link between each site? Also, I suppose your ap's are running in H-REAP mode? If you don't have enough bandwidth, then you shouldn't try it. You can always try to move the ap's to either wlc and see if users have any issues or not, before you try to deploy redundancy in this matter.

  • Setting "insert signature over the text quote" - not working

    Setting "insert signature over the text quote" - Bug
    Signature is always at the bottom of the quote.
    Today's update did not fix the problem
    Support does not respond

    Further to my previous email, I just discovered that the fault occurs only when the mail is in plain text format, which is my default format. Another issue I found is that if I change an email from Rich Text to Simple Text while composing a reply, the most recent text is deleted, which is rather annoying.

Maybe you are looking for

  • CIN: How to check the material document posted without excise invoice

    Hi Guru, Please advise how to check the material document posted without excise invoice. I have tried tcode J1I7 but it seems start to collect the excise invoice first and then material document. But my case is to find the material document WITHOUT e

  • Impact on renaming a "Group" in Siebel Analytics

    Hi All, I have a requirement to change couple of "Group" name from old one ("ABC Team") to new one ("XYZ Region Team"). All groups are ressembling the actual team names or "Positions" in Siebel Apps. Can anyone tell me what kind of impact will be on

  • Page number problem in Binder

    How can I get the page number to stay at the true bottom of a page (.5 margin) when pages have different numbers of lines? The document looks perfect in the saved PDF, but when it prints the page number is underneath the last line of text, sometimes

  • Correct way of starting compiz fusion on GNOME

    This is actually a really minor issue, but something that has been irritating me for a while. I've experimented with two ways of starting compiz fusion, first adding fusion-icon to the session startup list. However, this results in metacity being loa

  • How access data?

    How do I accss data from the time capsule?