Migrating LONG RAW to BLOB and optimizing extent size

Hi all,
I got a quite fragmented table with a LONG RAW column I want to migrate to BLOB and defragment.
DB version is Oracle9i Release 9.2.0.4.0 and this is a production environment.
I know MOVE and/or CTAS are not possible with LONG RAW columns
So, how can I do that? Is ALTER TABLE MODIFY the only possibility to migrate from LOING RAW to BLOB?
Since ALTER TABLE MODIFY will lock the whole table preventing any DML operation, I need at least a rough estimate of the time needed for this operation. How can I do that?
Since this table is quite fragmented, I also want to rebuilt it using a different extent size.
I think I should issue a ALTER TABLE MOVE... after having performed the "ALTER TABLE MODIFY".
Can I do something better to minimize unavailability to DML operations?
thanks,
andrea

Hi,
Is this an OCCI question?
I don't see that "to_blob" is documented anywhere. The "to_lob" function can be used to convert long raw columns, but its use is pretty specific and certainly not for general query use.
Regards,
Mark
EDIT1: Well, my local documentation set does not have "to_blob" in it at all. However, it is in the 11.1 SQL Language Reference on OTN:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions186.htm#sthref2358
Despite the fact that the documentation mentions "long raw" the function appears to only work with "raw" data in my 11.1 tests.
What's your goal here?
Edited by: Mark Williams on Jun 8, 2009 7:15 PM

Similar Messages

  • Limitation of converting from Long Raw to Blob

    Hi All,
    DB:11g
    Oracle Apps:R12
    Is there a limitation of converting from Long Raw to Blob?
    Please share your experience on this subject in case anyone has faced it before.
    Thanks for your time!
    Regards,

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:510622111991

  • Insert from Long Raw to Blob

    Hi all,
    I'm presently working on oracle 8.1.7,im having a table with Long Raw as a field.
    I want to insert the image into another table which containing a Blob as field.I wanted it to take place either by Database trigger or Procedure or any other way..
    Please can anybody provide me the script. I've already tried the procedure..select long raw to blob..I'm getting Numeric or Value error...i think the size of the image in the long raw table might be > 32767...
    Urgent please...
    thanks in advance
    rgds,
    John

    Hi John,
    Post this question in Database forum for quick help.
    The forum is present at this location.
    General Database Discussions
    Regards,
    Anupama

  • Modify long raw to blob column

    Hello,
    I would like to know if it is possible to modify a long raw column into a blob column, without having to drop and recreate my table.
    There is already data inserted in the long raw column.
    Thanks in advance,
    Cindy

    'Fraid not.
    A LOB is stored "out-of-line", which means the actual "raw" data is held separately from the table. A long raw stores the data in-line. This means that you'll have to write some code to extract the "raw" data and write it to the LOB. Methinks you won't be able to add a LOB-type column to the table if you have a long raw existing in it already.

  • PL/SQL Help...Long Raw to BLOB

    Hello All,
    I have a PL/SQL Package and Function that does a search for text in a blob field. Below is the Package and the Function.
    Here the statement that executes the function
    Select *
               FROM PROGTXT
              WHERE pcode.str_loc_in_blob
                                        (pcode.blob_to_new_blob (progtxt),
                                         '<search string>'
                                        ) <> 0
           ORDER BY objectvalue1, objectvaluesCurrently the above mentioned sql works where the progtxt is a blob datatype.
    We have a database where the progtxt is of Long Raw datatype. I want to utilize the same sql exactly but change the function where i can copy the table structure to a global temporary table each time the function is executed using the dbms_lob funtion and delete the temp table once the function is executed after the results are posted/retrieved. The reason why i want to use the same application is because it is part of a .net program and the only thing i change is the function. I am not great with PL/SQL. If anyone can help that will be a great help!!!!!
    Below is the code for the package and the function
    CREATE OR REPLACE PACKAGE PCODE AS
    FUNCTION to_base (p_dec IN NUMBER, p_base IN NUMBER)
       RETURN VARCHAR2
    FUNCTION to_dec (
       p_str         IN   VARCHAR2,
       p_from_base   IN   NUMBER DEFAULT 16
       RETURN NUMBER
    FUNCTION to_hex (p_dec IN NUMBER)
       RETURN VARCHAR2
    FUNCTION to_bin (p_dec IN NUMBER)
       RETURN VARCHAR2
    FUNCTION to_oct (p_dec IN NUMBER)
       RETURN VARCHAR2
    FUNCTION str_to_hex(p_str IN VARCHAR2)
    RETURN VARCHAR2
    FUNCTION str_loc_in_blob(
      l_blob IN BLOB
    , l_str  IN VARCHAR2)
    RETURN NUMBER
    FUNCTION blob_to_new_blob(
      p_blob IN BLOB)
    RETURN BLOB
    END PCODE;
    CREATE OR REPLACE PACKAGE BODY PCODE AS
    FUNCTION to_base (p_dec IN NUMBER, p_base IN NUMBER)
       RETURN VARCHAR2
    IS
       l_str   VARCHAR2 (255) DEFAULT NULL;
       l_num   NUMBER         DEFAULT p_dec;
       l_hex   VARCHAR2 (16)  DEFAULT '0123456789abcdef';
    BEGIN
       IF (p_dec IS NULL OR p_base IS NULL)
       THEN
          RETURN NULL;
       END IF;
       IF (TRUNC (p_dec) <> p_dec OR p_dec < 0)
       THEN
          RAISE PROGRAM_ERROR;
       END IF;
       LOOP
          l_str := SUBSTR (l_hex, MOD (l_num, p_base) + 1, 1) || l_str;
          l_num := TRUNC (l_num / p_base);
          EXIT WHEN (l_num = 0);
       END LOOP;
       RETURN l_str;
    END to_base;
    FUNCTION to_dec (
       p_str         IN   VARCHAR2,
       p_from_base   IN   NUMBER DEFAULT 16
       RETURN NUMBER
    IS
       l_num   NUMBER        DEFAULT 0;
       l_hex   VARCHAR2 (16) DEFAULT '0123456789abcdef';
    BEGIN
       IF (p_str IS NULL OR p_from_base IS NULL)
       THEN
          RETURN NULL;
       END IF;
       FOR i IN 1 .. LENGTH (p_str)
       LOOP
          l_num :=
             l_num * p_from_base + INSTR (l_hex, UPPER (SUBSTR (p_str, i, 1)))
             - 1;
       END LOOP;
       RETURN l_num;
    END to_dec;
    FUNCTION to_hex (p_dec IN NUMBER)
       RETURN VARCHAR2
    IS
    BEGIN
       RETURN to_base (p_dec, 16);
    END to_hex;
    FUNCTION to_bin (p_dec IN NUMBER)
       RETURN VARCHAR2
    IS
    BEGIN
       RETURN to_base (p_dec, 2);
    END to_bin;
    FUNCTION to_oct (p_dec IN NUMBER)
       RETURN VARCHAR2
    IS
    BEGIN
       RETURN to_base (p_dec, 8);
    END to_oct;
    FUNCTION str_to_hex(p_str IN VARCHAR2)
    RETURN VARCHAR2 IS
    l_val VARCHAR2(2000) := NULL;
    BEGIN
       FOR i IN 1 .. LENGTH (p_str)
       LOOP
          l_val := l_val || to_hex(ASCII(SUBSTR (p_str, i, 1))) || case when i = LENGTH (p_str) then null else '00' end;
       END LOOP;
       RETURN UPPER(l_val);
    END str_to_hex;
    FUNCTION str_loc_in_blob(
      l_blob IN BLOB
    , l_str  IN VARCHAR2)
    RETURN NUMBER IS
    blob_len NUMBER;
    l_pos number := 0;
    BEGIN
    blob_len := dbms_lob.getlength(l_blob);
    l_pos := 0;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex((l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex(upper(l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    l_pos := 0;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex(lower(l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    l_pos := 0;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex(initcap(l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    RETURN 0;
    END str_loc_in_blob;
    FUNCTION blob_to_new_blob(p_blob BLOB)
       RETURN BLOB IS
    v_file_blob     BLOB;  
    v_file_blob_new BLOB := NULL;
    v_file_clob     CLOB;  
    v_file_size     INTEGER := dbms_lob.lobmaxsize;
    v_dest_offset   INTEGER := 1;
    v_src_offset    INTEGER := 1;
    v_blob_csid     NUMBER := dbms_lob.default_csid;
    v_lang_context  NUMBER := dbms_lob.default_lang_ctx;
    v_warning       INTEGER;
    BEGIN
    DBMS_LOB.CREATETEMPORARY(v_file_clob, TRUE);
            dbms_lob.convertToClob(
                            v_file_clob,
                            p_blob,
                            v_file_size,
                            v_dest_offset,
                            v_src_offset,
                            v_blob_csid,
                            v_lang_context,
                            v_warning);
            v_file_clob:=upper(v_file_clob);
            IF v_warning = 0 THEN
                    v_file_size     := dbms_lob.lobmaxsize;
                    v_dest_offset   := 1;
                    v_src_offset    := 1;
                    v_blob_csid     := dbms_lob.default_csid;
                    v_lang_context  := dbms_lob.default_lang_ctx;
                    v_warning       := null;
                    DBMS_LOB.CREATETEMPORARY(v_file_blob_new,true);
                    dbms_lob.convertToBlob(
                            v_file_blob_new,
                            v_file_clob,
                            v_file_size,
                            v_dest_offset,
                            v_src_offset,
                            v_blob_csid,
                            v_lang_context,
                            v_warning);
                    IF v_warning = 0 THEN
                       RETURN v_file_blob_new;
                    END IF;  
            END IF;
    END;
    END PCODE;
    /Thanks
    Nitin
    Edited by: user13048604 on Jan 12, 2011 10:18 PM

    First you may need to convert 'BLOB' which is of 'RAW' type to 'VARCHAR2'
    using
    utl_raw.cast_to_varchar2(urblob)Then you can make use of dbms_lob.instr,dbms_lob.substr etc...

  • Jdbc session - LONG RAW or BLOB ?

    Hello,
              My over-large session data cannot use the LONG RAW data type, for session data field. I think that is a jdbc driver limitation.
              Session data does not appear to be saved at all if I use a 'BLOB' instead of LONG RAW. Does anyone know if this usually works ?
              The drivers I have tried are -
              oracle.jdbc.driver.OracleDriver
              weblogic.jdbc.oci.Driver
              Oracle 817
              Weblogic 6.1 sp 3
              thanks in advance,
              John
              

    Kiran,
    A long raw column can store up to 2 Go and you can have only one by table.
    With 9i, BLOB column can store up to 4Go and you can have as so many you want.
    With 10g, BLOB column can store up to 8To
    I suggest you to use BLOB columns.
    Francois

  • Long Raw vs Blob

    We have a table in our database which contains the following field types:
    CREATE TABLE TESTBLOB (
    A NUMBER ( 10 ) NOT NULL ,
    B VARCHAR2 ( 765 ) DEFAULT '' ,
    C NUMBER ( 10 ) DEFAULT 0 ,
    D NUMBER ( 10 ) DEFAULT 0 ,
    E NUMBER ( 10 ) DEFAULT 0 ,
    F NUMBER ( 10 ) DEFAULT 0 ,
    G NUMBER ( 5 ) NOT NULL ,
    H NUMBER ( 5 ) NOT NULL ,
    I NUMBER ( 5 ) NOT NULL ,
    J NUMBER ( 5 ) NOT NULL ,
    K NUMBER ( 10 ) DEFAULT 0 ,
    L LONG RAW DEFAULT NULL ,
    CONSTRAINT PK_TESTBLOB PRIMARY KEY ( A )
    We recently changed B to VARCHAR2 (2000). After that change, the bitmap images we were saving as A LONG RAW would be loaded back into our application with the right half on the left side and the left side on the right. When we changed L to be a BLOB, the bitmap images are being loaded back into the application correctly and this issue has been corrected.
    I guess my questions are, can anyone tell me what making these changes did to the database and why does changing the LONG RAW to a BLOB resolve the issue?
    Thanks in advance.

    The misdisplay of the data when it was stored as a long raw sounds like an application issue. Either the data was being stored or retrieved wrong (or both).
    Changing the code to work with a BLOB corrected the error.
    Long raws are an obsolete data type provided for backward compatibility only so using a BLOB is a better choice for future maintainability of your code.
    Note the BLOB will be stored out of line, that is, in a separate LOB table and an object id will be stored in the base table row that points to the the LOB row.
    You can find more information of the datatype in the Concepts manual chapter on data types or the Application Developers Fundamentals Guide.
    HTH -- Mark D Powell --

  • Converstion Long raw to BLOB

    Hello All,
    I am using Oracle 10g,
    I need to alter a table which have a Long row data type column, i want to modify the data type of this column to BLOB.
    This table contains data, does this alteration affect the data of the table in any way?
    Regards,

    Any information ? if the alteration of the LONG RAW data type to BLOB affect the existing data ?
    Thanks in advance ,

  • Long raw to blob

    Hi
    I am working on Pl/Sql scrpit to transfer data/images from one Oracle 8i DB to another.
    The images to be transfered are in Long Raw but need to populate a column in BLOB.
    Any ideas how to convert?

    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:13213885403654

  • Space utilization and optimal row size in Data Blocks in Oracle 11g

    Hi,
    My main concern till now is to find the Optimal no. of rows/tuples per one oracle data block of size 8192. For that purpose i'm doing different kind of testing.
    I created one table:
    SQL> create table t5
    2 (x char(2000));
    Table created.
    Inserted 4 rows in it.
    Queried to check in which block no's these 4 rows exist.
    SQL> SELECT x,DBMS_ROWID.ROWID_BLOCK_NUMBER(rowid) "Block No."
    2 from t5;
    x Block No.
    A 422
    B 422
    C 422
    D 423
    SQL> analyze table t5 compute statistics;
    Table analyzed.
    SQL> select LOGGING,BACKED_UP,NUM_ROWS,BLOCKS,EMPTY_BLOCKS, AVG_SPACE,CHAIN_CNT, AVG_ROW_LEN
    2 from user_tables
    3 where table_name = 'T5';
    LOG B NUM_ROWS BLOCKS EMPTY_BLOCKS AVG_SPACE CHAIN_CNT AVG_ROW_LEN . YES N 4 5 3 6466 0 2006 .
    8 data blocks are initially allocated. but my question is that while creating table of even small sizes, every time i'm seeing that it shows BLOCKS (used) are 5.
    why 3 block are EMPTY_BLOCKS allocated all the time?
    AVG_SPACE is the FREE space in every BLOCK that is used if i'm not wrong?
    In this scenerio 3 rows (each of around 2006 bytes) are inserted into into one BLOCK of 8192 i.e. 8192-6006=2186. 2186 is the PCTFREE or what?
    How can I see this CHAIN_CNT column value other than 0?
    How can actually I find the optimal no. of rows/tuples in 1 data block that will not increase OVERHEAD on the system.
    I'll highly appreciate the genuine help and solid suggestions.
    Thanks in Advance.
    Best Regards,
    Kam

    kamy555 wrote:
    If you want to suggest something it'll be nice of yo.I can't disclose my main concern :)If you can't disclose what you mean by "optimal" and you can't disclose what "overhead" you are concerned about, I'm not sure that anyone could answer your question.
    In this scenerio 3 rows (each of around 2006 bytes) are inserted into into one BLOCK of 8192 i.e. 8192-6006=2186. 2186 is the PCTFREE or
    what?PCTFREE is a percentage. You haven't specified what you set it to, but that decreases the space in a block available for inserts to 8192 * (1 - PCTFREE/100).
    How can I see this CHAIN_CNT column value other than 0?Why do you believe there would be chained rows? You would need to use the ANALYZE command to populate the CHAIN_CNT column.
    How can actually I find the optimal no. of rows/tuples in 1 data block that will not increase OVERHEAD on the system.Since you can't disclose what "optimal" means or what "overhead" you're concerned with, I don't see how this question could be answered.
    Justin

  • Long Raw to file

    Hi, i have a oracle database 10.2 and in a table i have a long raw column,
    In that column i am storing images and pdf's but i want to get the files from the database to my hard disk
    i know that before 10r2 does exist a pl/sql procedure but a 32k limit, and my files are higher than 32k, does anyone know a way to do that?
    thnx in advance

    Easy. Your problem is that you are using LONG RAWS and not BLOBS and there is no way of accesing piecewise LONG RAWs inside PL/SQL so you are stuck with trying to convert to a PL/SQL LONG RAW which has a maximum length of 32k.
    So short term solution: use the to_lob function to convert the LONG RAW into a BLOB in a temp table, then use dbms_lob to loop through, using the utl_file raw API to pump it to a file.
    Long term: migrate LONG RAWS to BLOBs.
    HTH
    Chris
    [email protected]
    [email protected]

  • Issue with Oracle LONG RAW data type

    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /

    Maddy wrote:
    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /below might work
    12:06:23 SQL> help copy
    COPY
    Copies data from a query to a table in the same or another
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                {APPEND|CREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[/password]@connect_identifier

  • Xmlgen.getxml Nested Cursors with LONG RAW and BLOB Data Types

    I am trying to use a nested cursor with xmlgen.getxml that has a long raw or blob column. In either case, it will not return to me any data in the xml document pertaining to that LONG RAW or BLOB column. If I do not use a nested cursor, it works fine.
    Example:
    SELECT xmlgen.getxml('SELECT x, CURSOR(SELECT y FROM y_tab WHERE y_tab.x_id = x_tab.x_id) y FROM x_tab') FROM dual;
    This will not produce the information I am after.
    However, simply running:
    SELECT xmlgen.getxml('SELECT y FROM y_tab WHERE y_tab.x_id = <somevalue>') FROM dual;
    Works???
    Any ideas out there? Does anyone know if DBMS_XMLQUERY has this limitation?
    Thanks,
    Brad

    It doesn't appear that I am able to attach the PDF files.  Can you supply your email (or I can supply mine) so I can send you the three files:
    1.)  A good PDF (manually extracted from our old application)
    2.)  Dump of the same PDF file (includes header/footer info)
    3.)  A partially fixed PDF file (but some of the pictures / pages are cut off - specifically pages 3,5,9,10,12,14)
    The way that we have tried to fix the file (in example 3 above) is the following:
    a.)  Find the First Occurrence of "%PDF-"
    b.)  Find the Last Occurrence of "%%EOF"
    c.)  if the first "%PDF-" is found AND the last "%%EOF" is found, then
       i.)  Remove all data before the first %PDF-
       ii.)  Remove all data after the last %%EOF
    Let me know if you need any other information.
    Thanks,
    Mike

  • Sql Developer MSSql Migration, Online data move, image to long raw mapping

    Hello,
    my task is to migrate a MSSql Server Database to Oracle 10.2.0.4 with SQL Developer Version 2.1.1.64
    and JTDS JDBC Driver oracle.sqldeveloper.thirdparty.drivers.sqlserver 11.1.1.58.17.
    Capture, convert and online data move works except data mapping from MSSql image to Oracle long raw dataype.
    I need to map MsSql image to oracle blob, to achieve online data move!
    is Sql Developer online migration MsSql image to oracle long raw possible?
    I know that long raw is outdated, but i'm dba and not responsible for the software part.
    What options should i try? offline data move? can MS Bulk Copy Program export image data and SQL*Loader import into long raw?
    Any experience or tipp?
    Thanks
    Michael

    Hi user12132314 ,
    I do not see any 'long raw' options on our current SQLServer 2005 data type mapping. (Raw is a separate 2000 byte data type).
    The usual route for SQLDeveloper is to go to Blob.
    Online - this is simple & automated.
    Offline - this actually goes via hex output in bcp to sqlldr, read in as CLOB which is then encoded to blob. (This is automated)
    (Online 'Copy to Oracle' option, right click on table, may be of use if advanced features not included in the select such as defaults are not required, it copies over a select * from table, including blobs)
    To move you from blob to long raw after migration can be done (easily enough if Oracle database >=10g so the stream does not have to be in smaller 'chunks')
    http://asktom.oracle.com/pls/asktom/f?p=100:11:3938270166267830::::P11_QUESTION_ID:702825000306
    I can look into this if you want to go down this route.
    Note however that long raw has drawbacks and blob is preferred, see
    Oracle® Database SQL Language Reference
    11g Release 2 (11.2)
    Part Number E17118-04
    Data Types
    LONG Data Type
    for example one restriction is:
    A table can contain only one LONG column.
    -Turloch
    SQLDeveloper Team

  • Oracle & BLOB/LONG RAW

    Hi everybody,
    I need to store binary data (> 32K) in an oracle BLOB field, respectivly commit the data to an oracle PL/SQL stored procedure.
    First I tried to use LONG RAW, but failed to commit more than 32K of data. This seems to be a documented problem, you can store 2GBs in an LONG RAW field, but PL/SQL can only store 32K in an LONG RAW variable.
    Then I tried to switch from LONG RAW to BLOB (both the field in the table and the in variable in the stored procedure) but it seems to be very complicated to use BLOB fields with JDBC.
    I've found example for a plain INSERT. First execute an INSERT with an empty BLOB, then make an SELECT FOR UPDATE on the row, obtain the reference to the BLOB-Object, alter the BLOB-Object and create an UPDATE-Statement with it.
    I've not tried this yet, but according to various web sites it should work.
    The problem is, that it does not solves the problem how to commit a BLOB value to a PL/SQL stored procedure.
    Does anyone knows a solution?
    Thx and regards,
    Robert

    Hi,
    thx for your answer.
    That's the solution I described (INSERT, SELECT, UPDATE) and only works with Statements.
    But I think I've already found a mistake of mine, I have to try this today.
    I already succeeded in creating a BLOB-Object without obtaining it from a resultset, the constructor is not documented but it exists, it looks like BLOB( OracleConnection, byte[] ).
    I think I can commit the BLOB to the stored procedure but it won't be a valid BLOB locator.
    What I've not tried yet and what I think migth be the solution is creating the valid BLOB locator inside the stored procedure using the PL/SQL BLOB methods.
    Sounds simple but for some reasons I have not thougth about it yet. :-)
    I'll report the result here if somebody else is interested in the issue. :o)
    Thx and regards,
    Robert

Maybe you are looking for

  • Itunes store error 3259

    i purchased a movie to download onto my ipod but i am receiving this error. the last movie i downloaded took a really long time, but this movie received this error after downloading 183.2 MB of 1.29 GB. Please Advise... Thank you 30GB   Windows Vista

  • Acer Aspire V17 Nitro Black Number Lock

    I know this has been asked before but the answers given have not worked.1.  Edit the registery.2.  Disable fast startup.I have an Acer Aspire V17 Nitro Black (VN7-791G) with Windows 8.1.  I want Num Lock on always.  When I boot the machine in the mor

  • Audio and DVI to HDMI on my G5?

    I have my G5 dual 1.8 GHz wired to my Vizio 32" HDTV as the primary display with a DVI to HDMI adapter and then an HDMI cable going to my TV. I get good 720p video out of it with the original Radeon 9600 graphics card but of course no sound as DVI do

  • Trouble with FP 10.3.183.7 upgrade - wasn't working and now doesn't download

    Current system info: Windows 7 (64 bit) Internet Explorer 9 (using 32 bit for downloading FP) I upgraded to 10.3.183.7 and immediately noticed my laptop unable to display/use Flash features (facebook games, online flyers, video, etc) I uninstalled an

  • Please help Unicode!!! thanks

    Hi all! I copied two files from java.sun.com and run it. But the program didn't show the Font correctly(Unicode). I've been told by the instruction of how to run this program is: I have to do something like"Before trying it out, verify that the appro