How to convert CLOB to BLOB with SQL Developer migration wizard?

Hi,
According to our requirement, we need to only migrate data from SQL Server 2008 to Oracle 11. I use the SQL Developer 3.0.04 migration wizard to do it.
I do migration from SQL Server (database name: SCDS41P2) to Oracle (User name: HCDS41P2).
My migration steps are as below: (I need to modify the target schema, so I add the steps 2) and step 3) )
1) Do migration by SQL Developer migration wizard;
2) Remove the Converted Database Objects node from migration project;
3) Re-do convert by SQL Developer migration wizard (contains changing the target schema);
When do step 1), the DBO_SCDS41P2 user is created automatically. CLOBTOBLOB_SQLDEVELOPER procedure is also created in this user.
I continued to run step 2) and step 3) with online mode. And find the table data which contains BLOB column can be moved into the target table. But from the Logging Page, I can't see the other detailed error info, so that I can't check which tables don't move data successfully.
Could you please tell me where the detail log file (e.g. contains every table's migration status) is if I use the online mode?
Additional, If I use offline mode to do step 3), I found the CLOB data can't be converted into BLOB automatically. Because in the load script (that is oracle_ctl.bat), only copy the source data to the CLOB column. After copy, it don't deal with the converting from CLOB to BLOB.
So could you please tell me how to convert CLOB to BLOB with offline mode?
Thanks so much.

Hi,
For your first question about logging - after the migration there will be an entry in the right hand panel for the migration project. If you open this there are various fields that give information about the status of each part of the migration. Does this give you the information you need ?
For the second problem about offline moving blob data have a look at the SQL*Developer documentation -
Oracle® SQL Developer User’s Guide Release 3.0
in the section -
2.2.8.1.4 Populating the Destination Database Using the Data Files
which describes the problem and how to get round it.
Regards,
Mike
Edited by: mkirtley on Aug 12, 2011 10:49 AM

Similar Messages

  • DB2 to Oracle conversion using SQL Developer Migration Wizard - different schemas

    I am performing a conversion between DB2  to Oracle 11 XE, using the SQL Developer Migration Wizard. Specifically I am trying to migrate the DB2User schema over to Oracle.
    Using the migration wizard, when I pick the Oracle target connection to be the same schema ( DB2User schema ) the migration is successful and all data is converted.
    However if I pick a different Oracle target connection ( say OracleUser ) , I run into issues.
    Firstly , the table schema is not created. When I check the project output directory, the .out file has the following errors:
       CREATE USER DB2User IDENTIFIED BY DB2User DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP
            SQL Error: ORA-01031: insufficient privileges
            01031. 00000 -  "insufficient privileges"
        connect DB2User/DB2User
        Error report:
        Connection Failed
        Commit
        Connection created by CONNECT script command disconnected
    I worked around this by manually executing the .sql in the project output directory using the OracleUser id  in the new DB.
    Then I continue with the migration wizard and perform the Move Data step.
    Now - the message appears as succuessful, however, when I review the Migrationlog.xml file, i see errors as follows:
    <level>SEVERE</level>
      <class>oracle.dbtools.migration.workbench.core.logging.MigrationLogUtil</class>
      <message>Failed to disable constraints: Data Move</message>
      <key>DataMove.DISABLE_CONSTRAINTS_FAILED</key>
      <catalog>&lt;null&gt;</catalog>
      <param>Data Move</param>
      <param>oracle.dbtools.migration.workbench.core.logging.LogInfo@753f827a</param>
      <exception>
        <message>java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist</message>
      <level>WARNING</level>
      <class>oracle.dbtools.migration.datamove.online.TriggerHandler</class>
      <message>ORA-01031: insufficient privileges
    </message>
    I think what is happening is that the wizard is attempting to perform the 'move data' process using the DB2User id.
    How do I tell the wizard that the target schema is different than my source schema.
    My requirement is that I need to be able to migrate the DB2User schema to different schemas in the same Oracle database
    ( since we will have multiple test environments under the same database ) .
    Thanks in advance .
    K.

    Perhaps the following from the SQL Developer documentation is helpful for you:
    Command-Line Interface for Migration
    As an alternative to using the SQL Developer graphical interface for migration operations, you can use the migration batch file (Windows) or shell script (Linux) on the operating system command line. These files are located in the sqldeveloper\sqldeveloper\bin folder or sqldeveloper/sqldeveloper/bin directory under the location where you installed SQL Developer.
    migration.bat or migration.sh accepts these commands: capture, convert, datamove, delcaptured, delconn, delconverted, driver, generate, guide, help, idmap, info, init, lscaptured, lsconn, lsconverted, mkconn, qm, runsql, and scan. For information about the syntax and options, start by running migration without any parameters at the system command prompt. For example:
    C:\Program Files\sqldeveloper\sqldeveloper\bin>migration
    You can use the -help option for information about one or more actions. For the most detailed information, including some examples, use the -help=guide option. For example:
    C:\Program Files\sqldeveloper\sqldeveloper\bin>migration -help=guide
    Regards
    Wolfgang

  • How to convert clob to blob

    hi
    tell me some thong how we can convert clob to blob

    You can use my procedure
    create or replace procedure CLOB2BLOB (p_clob in out nocopy clob, p_blob in out nocopy blob) is
    -- transforming CLOB &#226; BLOB
    l_off number default 1;
    l_amt number default 4096;
    l_offWrite number default 1;
    l_amtWrite number;
    l_str varchar2(4096 char);
    begin
    begin
    loop
    dbms_lob.read ( p_clob, l_amt, l_off, l_str );
    l_amtWrite := utl_raw.length ( utl_raw.cast_to_raw( l_str) );
    dbms_lob.write( p_blob, l_amtWrite, l_offWrite,
    utl_raw.cast_to_raw( l_str ) );
    l_offWrite := l_offWrite + l_amtWrite;
    l_off := l_off + l_amt;
    l_amt := 4096;
    end loop;
    exception
    when no_data_found then
    NULL;
    end;
    end;
    Best regards, Victor

  • How to convert clobs to blobs?

    What is the easiest way to go if I want to copy the content of a CLOB to a BLOB(Other than reading the contents of the CLOB out into a buffer and then apply UTL_RAW.CAST_TO_RAW)? How about from blobs to clobs?
    null

    Hi,
    create table myblob(x blob);
    create table myblob1(x clob);
    create or replace procedure blob_to_clob as
    b_lob blob;
    buffer VARCHAR2(32000);
    g_length number;
    begin
    select x into b_lob from myblob;
    g_length := dbms_lob.getlength(b_lob);
    dbms_lob.read(b_lob,g_length,1,buffer);
    insert into myblob1 values(buffer);
    commit;
    end;
    null

  • Migrate MySQL db to Oracle with SQL Developer / Migration Workbench

    I'm having a problem migrating a MySQL database to an Oracle database. I can make the connection to the MySQL database and query the data, but I can't do the migration.
    When I right-click on the MySQL schema, "Capture Schema" is greyed out. Same problem with clicking on an individual table. Also, the menu item "Migration --> Migrate" is greyed out.
    Can you help?

    Yes, I created a repository. And after your question, I clicked on the repository and was able to get the Migrate Data option for the first time. Thank you!
    Before I had been choosing the source database, which wouldn't allow me to choosse the Migrate Data option no matter what I did.
    Thanks for pointing out the obvious!
    BJ

  • Converting CLOB to BLOB at once

    Hello all!
    I have to convert CLOB to BLOB in my application. My CLOB contains XML document built with dbms_xmldom, an I need to put it into column of type BLOB. Knowing several ways to do it, I'm searching for the best one. So I considered the folowing:
    - Size of XML data can be more then 4000 bytes.
    - I can convert it "piecewise", copying through varchar2 and raw buffers by chunks. But this is not efficient for me.
    - I can write CLOB to file, then read it into BLOB. But it is not efficient too.
    - I can not change column type to CLOB since it may contain other BLOB data, not XML.
    Actually, I need a way to "cast" CLOB data as binary data when inserting into table. I believe Oracle must have it, but where?
    I'll be very grateful for help from anyone.
    P.S. Using Oracle 9.2

    You could use UTL_RAW.CAST_TO_RAWhttp://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_raw2.htm#998330
    The XML data can be 32k (the varchar2 limit in PLSQL is 32k, not 4000 bytes)
    If your documents exceeds 32k you need process chunks

  • How to convert rows to columns in sql server 2008

    How to convert rows to columns in sql server 2008 using the GROUP BY function? (only one query allowed)

    Lookup the Pivot transformation. From BOL:
    The Pivot transformation makes a normalized data set into a less normalized
    but more compact version by pivoting the input data on a column value. For
    example, a normalized Orders data set that lists customer name, product, and quantity purchased typically has multiple rows for any customer who purchased multiple products, with each row for that customer showing order
    details for a different product. By pivoting the data set on the product column, the Pivot transformation can output a data set with a
    single row per customer. That single row lists all the purchases by the customer, with the product names shown as column names, and the quantity shown as a value in the product column. Because not every customer purchases every product, many columns may contain
    null values.
    When a dataset is pivoted, input columns perform different roles in the pivoting process. A column can participate in the following ways:
    The column is passed through unchanged to the output. Because many input rows
    can result only in one output row, the transformation copies only the first
    input value for the column.
    The column acts as the key or part of the key that identifies a set of
    records.
    The column defines the pivot. The values in this column are associated with
    columns in the pivoted dataset.
    The column contains values that are placed in the columns that the pivot
    creates.
    Paul

  • How to convert a pdf file with hand-written signature?

    How to convert a pdf file with hand-written signature?

    Hi Lotus1215,
    Once the document is signed we cannot edit that document, hence convertion is not possible
    Please see the article mentioned below
    http://forums.adobe.com/docs/DOC-1515
    Let me know if you have any other question.
    Regards,
    ~Pranav

  • How to use clob or blob data type in OWB

    how to use clob or blob data type in OWB?
    if OWB not surport these data type,how can i extract the large data type from data source

    The same question was asked just two days ago No Data Found: ORA-22992
    Nikolai Rochnik

  • How to convert rows into columns with decode function

    Hi,
    How to convert rows into columns with the help of decode function in oracle.
    thanks and regards
    P Prakash

    say
    col1 col2
    1 10
    2 20
    3 30
    then use
    select col1,
    sum(decode(col2,10,10)) "new1"
    sum(decode(col2,20,20))"new2"
    sum(decode(col2,30,30))"new3"
    from table_name
    group by col1;
    we used sum u can use ny function if wont u have to give the column name i.e col2 name also
    so i think u got it nw
    regards

  • Converting CLOB to BLOB

    I am trying to convert clob into blob through following code.
    CREATE OR REPLACE FUNCTION clob_to_blob (clob_in IN CLOB)
    RETURN BLOB
    AS
    v_blob BLOB;
    v_varchar RAW(32767);
    v_start BINARY_INTEGER := 1;
    v_buffer BINARY_INTEGER := 32767;
    BEGIN
    FOR i IN 1..CEIL(DBMS_LOB.GETLENGTH(clob_in) / v_buffer)
    LOOP
    v_varchar := UTL_RAW.CAST_TO_RAW(DBMS_LOB.SUBSTR(clob_in, v_buffer, v_start)) ;
    DBMS_OUTPUT.PUT_LINE('DATA :' ||DBMS_LOB.SUBSTR(clob_in, v_buffer, v_start));
    DBMS_OUTPUT.PUT_LINE(' V_VARCHAR :'|| v_VARCHAR);
    DBMS_OUTPUT.PUT_LINE(' V_VARCHAR LENGTH :'|| LENGTH(v_VARCHAR));
    DBMS_LOB.WRITEAPPEND(v_blob, LENGTH(v_VARCHAR), v_varchar);
    DBMS_OUTPUT.PUT_LINE('after append');
    v_start := v_start + v_buffer;
    END LOOP;
    RETURN v_blob;
    END clob_to_blob;
    calling code:
    declare
    var clob;
    begin
    var:='3433534534de';
    testblob(var);
    end;
    It gives me following error:
    declare
    ERROR at line 1:
    ORA-21560: argument 2 is null, invalid, or out of range
    i don't know whats the prob?
    thanx

    dbms_lob.writeappend expects a real lob locator, which you can only get by selecting from a lob column.
    create table blobtab (b blob);
    insert into blobtab values (empty_blob());
    CREATE OR REPLACE FUNCTION clob_to_blob (clob_in IN CLOB)
    RETURN BLOB
    AS
    v_blob blob;
    v_varchar RAW(32767);
    v_start BINARY_INTEGER := 1;
    v_buffer BINARY_INTEGER := 32767;
    BEGIN
    select b into v_blob from blobtab;
    FOR i IN 1..CEIL(DBMS_LOB.GETLENGTH(clob_in) / v_buffer)
    LOOP
    v_varchar := UTL_RAW.CAST_TO_RAW(DBMS_LOB.SUBSTR(clob_in, v_buffer, v_start)) ;
    DBMS_OUTPUT.PUT_LINE(' DATA :' || DBMS_LOB.SUBSTR(clob_in, v_buffer, v_start));
    DBMS_OUTPUT.PUT_LINE(' V_VARCHAR :' || v_VARCHAR);
    DBMS_OUTPUT.PUT_LINE(' V_VARCHAR LENGTH :' || utl_raw.LENGTH(v_VARCHAR));
    DBMS_LOB.WRITEAPPEND(v_blob, utl_raw.LENGTH(v_VARCHAR), v_varchar);
    DBMS_OUTPUT.PUT_LINE('after append');
    v_start := v_start + v_buffer;
    END LOOP;
    RETURN v_blob;
    END clob_to_blob;
    declare
    blobvar blob;
    begin
    blobvar := clob_to_blob(dbms_xmlgen.getXML('select 1 from dual'));
    end;
    /

  • How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)

    Hello.
    How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)
    I have text field which has a databind to a date field. When I click on it, we can select the date, it is added on the format (dd,mm,yyyy). When I want to insert this date field to a database It doesnu2019t allow me to do it because it will only accept date field on the format (mm,dd,yyyy)
    I tried to store this format on a date variable and I get a message saying that is impossible to convert a string into a date.
    Regards,
    Jose

    Hi Jose,
    usually you format strings in c# like
    string.Format("{0:yyyyMMdd}", insertyourstring);
    in your case
    string.Format("{0:MM/dd/yyyy}", insertyourstring);
    [look here|http://idunno.org/archive/2004/14/01/122.aspx]
    there are more details
    if everything fails split the string with Mid()
    or ask me
    lg David

  • How to convert CLOB data (now it is in html format) to Normal text format

    Hi,
    Can anybody let me know the solution for how to convert CLOB data into normal Text.In my case the table column having CLOB datatype and the data is in html format.when i run the report the column is displaying html tags .Now i need to convert that html tags into normal text.
    Pl. let me know if any one know the solution.
    Regards,
    Thulasi.K

    LONG has been depricated since 8i so I don't believe there is a general solution to go backwards short of reloading the data.
    Justin

  • How to send/receive e-mails with sql or pl/sql

    Hello,
    I must send and receive e-mail (something like e-mail client) done with oracle database and oracle forms.
    How can I receive e-mails with SQL? Is there any way?
    I read threads about using utl_smtp but i could not send an e-mail. May be I need to use servers without password?
    Best regards
    P.S. I'm using Forms 10g R2 and database 9i

    Hi,
    try below code.
    change mailhost ip to u r mail server ip.
    CREATE or REPLACE PROCEDURE SimpleTextMessage IS
    mailHOST VARCHAR2(64) := '192.168.0.21';
    mailFROM VARCHAR2(64);
    mailTO VARCHAR2(64);
    mailCONN utl_smtp.connection;
    mailDATE VARCHAR2(20);
    vreply utl_smtp.reply;
    vreplies utl_smtp.replies;
    i number;
    BEGIN
    mailFROM := '[email protected]';
    mailTO := '[email protected]';
    SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS') INTO mailDATE FROM dual;
    vreply := utl_smtp.open_connection(mailHOST, 25, mailCONN);
    vreplies := utl_smtp.help(mailCONN, 'HELP');
    for i in 1..vreplies.count loop
    dbms_output.put_line( 'text = ' || vreplies(i).text );
    end loop;
    vreplies := utl_smtp.ehlo(mailCONN, mailHOST);
    for i in 1..vreplies.count loop
    dbms_output.put_line( 'text = ' || vreplies(i).text );
    end loop;
    vreply := utl_smtp.mail(mailCONN, mailFROM);
    vreply := utl_smtp.rcpt(mailCONN, mailTO);
    vreply := utl_smtp.open_data(mailCONN);
    utl_smtp.write_data(mailCONN, 'Subject: '|| 'Hi' || chr(13));
    utl_smtp.write_data(mailCONN, 'From: '||mailFROM || chr(13));
    utl_smtp.write_data(mailCONN, 'Date: '||mailDATE || chr(13));
    utl_smtp.write_data(mailCONN, 'To: '||mailTO || chr(13));
    utl_smtp.write_data(mailCONN, 'CC: '||mailFROM || chr(13));
    utl_smtp.write_data(mailCONN, chr(13));
    utl_smtp.write_data(mailCONN, 'Hello Friend how r u.' || chr(13));
    vreply := utl_smtp.close_data(mailCONN);
    END;
    /

  • Issue with SQL Developer connect to SQL server

    I'm using "SQL Developer 2.1.1.64.45" to work on a migration project which needs to convert a SQL server database to a Oracle 11g database. But I got an issue when I setup the SQL server connection. The SQL Developer let me connect by selecting a SQL server database name (For example: Northwind), but once connected, it always connected to "master" database instead. The "SQL Developer" is running on Windows 7 Professional (x64) platform. My Oracle database is 11g, and SQL server database is SQL 2005. And my SQL server instance name is "SQL2005". Anyone have ever experienced this problem? Thanks in advance.
    Edited by: user8276338 on Feb 8, 2011 1:05 PM

    Hi Bob,
    Thanks for the feedback, lets stick with SQL Developer 3.
    Correct me if I'm wrong,
    You attempted to migrate from SQL Server to Oracle including target generation and datamove in one go, by filling in each step of the migration wizard to the end.
    During the datamove you got
    ORA-01000:maximum open cursor exceeded
    So it looks like SQL Developer during the migration is not closing cursors fast enough and hits the maximum number of open cursors in your Oracle database.
    I think the default max open cursors is 300 in Oracle.
    There are a few things we can do here.
    You should be able to see the new migration project in your Migration Projects navigator.
    By navigating down the project tree to "Converted Database Objects" we can attempt the data move again by right clicking and choosing "Data Move".
    But first I would restart SQL Developer so as to free up any lingering open cursors.
    That may allow you to complete the data move, as the only cursors being open are being used in the data move and not some cursors which may have been left open from previous steps in the migration.
    Now from my perspective I would like to identify where are we leaving open the cursors, so I'm going to setup some testcases my end to see if I can replicate.
    From your perspective Id presume you just want to move on with the migration.
    So if the above (shutdown and attempt just the data move) doesnt workyou could
    A) Increase the MAX OPEN CURSORs on your Oracle databases so it complete the data move
    or
    B) Use the offline data move technique.
    A) Increase MAX OPEN CURSORs
    This wiki explains how to do that, looks like 1000 is fairly common, but even a much larger number is not a problem
    http://wiki.oracle.com/page/OPEN_CURSORS
    ALTER SYSTEM SET OPEN_CURSORS = 10000;
    OR
    B) Offline Data Move
    If you are moving large amounts of data (say > 1GB), then the standard data move (we call it online), which just uses JDBC to SELECT * FROM and INSERT INTO may not cut the mustard.
    In this case you can try using our offline technique. SQL Developer will generate a set of scripts for you.
    unload_script.bat will use SQL Servers BCP tool to dump out the table data into DAT files.
    oracle_ctl.bat will load the data in the DAT files into Oracle.
    As we know the names of all the tables, columns ,both SQL Server and Oracle, we can generate fairly good scripts.
    The benefit of this technique is large amounts of data can be migrated and you get to use tools designed to dump data and load in data, so you have better error logging and tweaking.
    To attempt this in the Migration Wizard , Data Move page, select offline.
    If you can describe your database a bit (number of tables, number of procedures, amount of data to migrate) I may be able to define my testcase better so I can replicate the issue.
    Thanks
    Dermot
    SQL Developer Team.

Maybe you are looking for

  • K9N Platinum: upgrade to X2 5600+ or X2 6400+?

    Hi.  This is my first post.  I would like to upgrade my CPU on my K9N Platinum and I have a couple of questions: 1.  I have narrowed down to two:  X2 5600+ (89w)  or X2 6400+ (125w)?      - both have the same L2 cache, but the speed and wattage diffe

  • SA520W Bridging between to private Lans

    I am looking for some help connecting to separate private lans: A) 192.168.1.x B) 192.168.0.x A is behind a Watchguard XTM25 11.5.3 B is behind a CISCO SA520W Both have static public facing IP's. B only has a IP based PBX system attached to it over a

  • Iphone with bumper case and connector cable

    I recently purchased the iPhone 4 and gave my wife my 3G. I had a couple of cables that I use on the 3G for my car and at the desk. I attempted today to charge the iPhone 4 while on a trip only find that the cables that I have for the 3G will not fit

  • Unable to export Webforms

    Hi All, I am trying to export Webforms from Planning App. Hyperion Planning is installed on Linux. The command that I am trying to execute is: FormDefUtil export -all servername username password app_name I am trying this from the same directory wher

  • N79 all messages disappeared (SW V12.0.24)

    Hi all, I have a problem that I hope some one can help me with. While sending an SMS my N79 battery died and turned off. When I turned it on all the SMS messages in my inbox disappeared!  I lost more than 700 important messages. I check both the C: p