MYSQL to ORACLE  blob migration issue

Hi
I am currently migrating a mysql schema to Oracle. I have used the SQLDeveloper Migration Workbench to generate the scripts to capture the data and to upload the data to oracle.
However I have an issue with one particular table (which contains blob data). Note: Other tables with blob data have been successfully migrated.
This is the command I am using to load the data.
sqlldr cms/cms control=Oracle\cms.user_key.ctl log=cms.user_key.logThis is the sqlfile specifying the table structure.
load data
infile 'user_key.txt'
"str '<EORD>'"
into table cms.user_key
fields terminated by '<EOFD>'
trailing nullcols
USER_KEY_ID  NULLIF USER_KEY_ID = 'NULL' ,
KEY_SIZE  NULLIF KEY_SIZE = 'NULL',
PUBLIC_EXPONENT  NULLIF PUBLIC_EXPONENT = 'NULL' ,
CERTIFICATE_AUTHORITY_ID  NULLIF CERTIFICATE_AUTHORITY_ID = 'NULL',
VALIDITY "TO_DATE(DECODE(:VALIDITY, 'NULL', NULL, :VALIDITY),  'yyyy-mm-dd HH24:mi:ss')" ,
STATUS  NULLIF STATUS = 'NULL' ,
GENERATION_DATE "TO_DATE(DECODE(:GENERATION_DATE, 'NULL', NULL, :GENERATION_DATE),  'yyyy-mm-dd HH24:mi:ss')" ,
CERTIFICATE     char(2000000000) NULLIF CERTIFICATE = 'NULL',
PROFILE_CERT_ID  NULLIF PROFILE_CERT_ID = 'NULL' ,
PERSON_ID  NULLIF PERSON_ID = 'NULL' ,
SUPPORT_ID  NULLIF SUPPORT_ID = 'NULL' ,
SERIAL_NUMBER CHAR(255) "DECODE(:SERIAL_NUMBER, 'NULL', NULL, NULL, ' ', :SERIAL_NUMBER)" ,
REQUEST_ID  NULLIF REQUEST_ID = 'NULL' ,
KEY_USAGE CHAR(255) "DECODE(:KEY_USAGE, 'NULL', NULL, NULL, ' ', :KEY_USAGE)"
)This is the statement to create the table I am migrating into
CREATE TABLE user_key (
  USER_KEY_ID NUMBER(24,0) NOT NULL,
  KEY_SIZE NUMBER(10,0),
  PUBLIC_EXPONENT NUMBER(10,0),
  CERTIFICATE_AUTHORITY_ID NUMBER(24,0),
  VALIDITY DATE,
  STATUS NUMBER(10,0),
  GENERATION_DATE DATE,
  CERTIFICATE BLOB,
  PROFILE_CERT_ID NUMBER(24,0) DEFAULT '0' NOT NULL,
  PERSON_ID NUMBER(24,0),
  SUPPORT_ID NUMBER(24,0),
  SERIAL_NUMBER VARCHAR2(255 CHAR),
  REQUEST_ID NUMBER(10,0),
  KEY_USAGE VARCHAR2(255 CHAR)
);If I change the support_id and request_id into varchar2(255) datatypes the data loads but I can see some data is loaded into the wrong column.
When the datatypes are correct, the data starts to get loaded but exits after 50 errors, and tye log file complains that I am trying to put non-numeric data into a numeric field.
Can any one shed somnme light on this problem

Problem was setting the characterset. Needed to be UTF8 for blobs but for other data needed to be WE8MSWIN1252.
Edited by: Keith Jamieson on Aug 20, 2010 1:25 PM
Edited by: Keith Jamieson on Aug 20, 2010 1:48 PM

Similar Messages

  • MYSQL  to Oracle 11g Migration

    dear export,
    I have mysql database witb BLOB objects with 2m records. need to migrate to oracle 11gR1. pl let me know how to do this.
    sample my sql table:
    CREATE TABLE `pms_pr_supporting_doc` (
    `ID` int(10) unsigned NOT NULL auto_increment,
    `NAME` varchar(100) NOT NULL default '',
    `TYPE` varchar(100) NOT NULL default '',
    `SIZE` int(11) unsigned NOT NULL,
    `CONTENT` mediumblob NOT NULL,
    `SEQUENCE_NO` int(11) unsigned NOT NULL,
    `DOC_LEVEL` tinyint(4) unsigned NOT NULL,
    PRIMARY KEY (`ID`),
    KEY `ID_QRY_ALL` (`ID`,`SEQUENCE_NO`,`DOC_LEVEL`),
    KEY `ID` (`ID`),
    KEY `SEQUENCE_NO` (`SEQUENCE_NO`),
    KEY `DOC_LEVEL` (`DOC_LEVEL`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    we have 50 old tables in my mysql DB. Pl support me.
    Regards
    ashwan
    Edited by: ashwan on Sep 16, 2010 4:38 AM

    I found the solution.
    Ones created captured model and coverted model, ontop of converted model there is a option call "generate" . this will generate script. you should manual run in oracle side. once created. using butten in top tools=>migration=> migration data. then give source and desctination DB... very success of mysql t oracle using sqldeveloper.
    Thanks

  • MySQL to Oracle Migration Issue - Unknown character set index for field.

    Hi,
    Looking for help..!!!
    Migrating mySQL - version 4 database to Oracle 10g using oracle migration work bench. It went well until the last step. But, during the data migration, OMWB has given the following error:
    +++++++++++
    Unable to migrate data from source table gets.sales_order_01 to destination table gets_ora.sales_order_oracle10: gets_ora.sales_order_oracle10; Unknown character set index for filed "12596" received from ser.
    +++++++++++
    Log file shows:
    java.sql.SQLException: Unknown character set index for field '12596' received from server.
         at com.mysql.jdbc.Connection.getCharsetNameForIndex(Connection.java:1692)
         at com.mysql.jdbc.Field.<init>(Field.java:161)
         at com.mysql.jdbc.MysqlIO.unpackField(MysqlIO.java:510)
         at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:285)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1326)
         at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1225)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2278)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2225)
         at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
         at oracle.mtg.migrationServer.LoadTableData._migrateTableData(LoadTableData.java:563)
         at oracle.mtg.migrationServer.LoadTableData.run(LoadTableData.java:326)
         at oracle.mtg.migration.WorkerThread.run(Worker.java:268)
    I appreciate your help in this regards.
    Regards,
    K

    Hi K,
    Whats the default character set of you MySQL and Oracle Databases.
    What version of JDBC driver are you using?
    Is there any unicode characters used in your data?
    Have you tried offline data move?
    Thanks
    Dermot.
    Message was edited by:
    dooneill

  • "Default " problem while migrating from mysql to oracle.

    I'm migrating from mysql3.23 to oracle9i via the OMWB tool.While migrating i'm getting an error message "Failed to create default for the table <table>:ora00907 missing right parenthesis".This error is due to the difference in the syntax used for the keyword "default" in mysql and oracle.In mysql we have to give after the Not Null option whereas in oracle we have to give before Not Null.
    The problem is i'm migrating via the OWMB tool.Is is possible to handle this error with the help of tool itself.
    Thanks
    Jai.M

    Jai, I'm having Frank have a look at this for you to see if we can replicate it ans help solve this issue for you. are there any issues logged on the mysql site regarding saving blobs as file?
    thanks
    Barry

  • Problems using Quick Migrate in SQL Developer 1.5 for MySQL to Oracle 10g

    Hi all,
    I am trying to use SQL Developer 1.5 migration tools (Quick Migrate) to perform online capture and build source model to migrate from MySQL 5.x to Oracle 10g on Windows platform. I get these errors and the Quick Migrate process fails:
    oracle.dbtools.metadata.persistence.PersistableObject.doInsert(PersistableObject.java:238)
    I did a search and used the sqldeveloper.cmd script but still fails. Then I created a new database and truncated the repository. I now get the above error plus two new ones listed below:
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    Error loading nls:OALL8 is in an inconsistent state
    Error occurred during capture: Protocol violation
    It fails during the capture process for MySQL 5.1 database
    when it begins to capture the tables from MySQL.
    Does anyone know how to resolve these issues when migrating from MySQL to Oracle 10g using Quick Migrate with SQL Developer 1.5 release?
    Regards,
    Ben Prusinski
    Message was edited by:
    benprusinski
    Message was edited by:
    benprusinski

    Hi all,
    I put the following in my sqldeveloper.cmd file:
    SET ORACLE_HOME=%CD%
    What is very confusing is that with SQL Developer 1.5, there are several levels and several SQL Developer executables! I am really not sure which of these to use:
    I created the SQLDeveloper 1.5 directory called SQLDeveloper1_5 on Windows:
    1) cd C:\sqldeveloper1_5\sqldeveloper-5338
    there exists a sqldeveloper.exe
    2) cd c:\sqldeveloper1_5\sqldeveloper-5338\sqldeveloper\sqldeveloper.exe
    3) cd c:\sqldeveloper1_5\sqldeveloper-5338\sqldeveloper\sqldeveloer\bin\sqldeveloper.exe
    Which SQLDeveloper 1.5 executable should I be using and where should I place the
    sqldeveloper.cmd file?
    Also I did try to use a different database and schema for the repository with Quick Migrate but it appears a bug exists in SQL Developer 1.5 version that causes errors with Quick Migrate for MySQL to Oracle? Is this correct?
    As an update, I ran the following commands:
    cd to
    c:\sqldeveloper1_5\sqldeveloper-5338\sqldeveloper\sqldeveloper\bin
    sqldeveloper.cmd sqldeveloper.exe
    Start sqldeveloper.exe
    Perform standard capture for MySQL using the new mig2 schema as the new repository
    It starts the capture but fails on the errors below:
    Error loading nls:OALL8 is in an inconsistent state
    UPDATE
    ============================
    I tried this again and it worked with the exception of one error message listed below:
    Here are the steps that I followed:
    1. Create a Windows cmd script
    Put the following entries in the script:
    SET ORACLE_HOME=%CD%
    save the command windows script as sqldeveloper.cmd
    Copy this script to the base installation directory for SQLDeveloper
    Example:
    1. cd c:\SQLDeveloper1_5\sqldeveloper-5338\sqldeveloper
    2. Start SQLDeveloper with the command script that you created earlier
    Example:
    Open a Windows shell prompt window and execute the following scripts:
    a) sqldeveloper.cmd sqldeveloper.exe
    b) sqldeveloper.exe
    3) In SQL Developer 1.5
    From the Migrate menu,
    a) Delete current repository and create a new schema in Oracle target database call it mig2.
    b) Then create a new repository in SQL Developer 1.5
    c) Right mouse click on the MySQL 5.x database and choose capture
    It worked with the exception of one error message:
    o.jdbc.driver.OracleDriver     
    Error while registering Oracle JDBC Diagnosability MBean.
    So it looks like something is screwed up with my JDBC drivers and configuration for MySQL. How do I diagnose the JDBC driver issue for MySQL?
    Thanks!!!
    Ben
    Thanks
    Ben

  • DB Migration from MYSQL to ORACLE Using Offline Capture

    Hi
    Am doing a database migration from MySQL to Oracle using SQL Developer (version 2.1.1.64). So far, I've successfully captured the MySQL database and converted it to the Oracle Model. However, when generating offline scripts to create the converted model schema into Oracle DDL scripts it managed to generate SQL to create: 1) User 2) Sequences 3) Tables 4) Triggers and 5) constraints.
    It has created the SQL to add the primary key constraints and index constraints. Although it did the foreign key constraints in the SQL, the foreign key constraints seems to have missed the cascading options for the foreign key constraint. I.e. theres no reference of whether the foreign key constraint will restrict on delete or cascade etc.
    We have a foreign keys in the MySql database that have different cascading options and these have not being ported over into the migration SQL. Therefore, all the foreign keys generated in the SQL by default are cascade to restrict on delete.
    Does 'Generate Oracle DDL' not take into account a foreign key's on delete cascading option?
    Any help or information would be greatly appreciated.
    Thanks

    Hello,
    that reminded me for the following thread:
    Migration Microsoft SQL Sever 2005 to Oracle 11g cascade on delete problem
    That is a similar issue, isn't it?
    I opened a bug for that, and it will be fixed in SQL Developer 3.1 (not in any 3.0 Early Adopter version). If you hit the same issue, there is no other way then using the workaround as used in the mentioned thread.
    Regards
    Wolfgang

  • Problems using the workbench to migrate mysql to Oracle

    Hi.
    I have ran into couple of problems using Oracle workbench
    migration tool.
    I was wondering if anyone out there has any insight.
    1. If a date field in a mysql table has a default (let's say
    9999-12-31) the script for oracle table will also have
    9999-12-31 as a default field. This doesn't seem to work in
    Oracle because Oracle expects to see something like to_date
    ('9999-12-31','yyyy-mm-dd'). I couldn't find a way to modify
    that in the Workbench.
    2. If a numeric field is defined in the mysql database as
    smallint, the workbench creates a corresponding Oracle field
    as num(250), while oracle would expect the presicion no more
    than 38. Again, I couldn't find a way to fix it in the
    workbench.
    3. If I'm attempting to modify a oracle field's parameters in
    the workbench,it won't let me to move to another table
    without asking "do you want to save the changes" and won't
    move on unless I click on "No".
    I would appreciate any comments on these issues
    tia

    Check your trash can on the desktop. The old version is automatically moved to the trashcan. You should be able to move it from the trashcan back to the Apps folder within the iTunes folder. The update that was pushed out was for iBooks to work with iOS 7 not iPhone 5. iOS 7 was released today.

  • Migrating from MySQL to Oracle 11g

    can u tell me the steps to migrating database from MySQL to Oracle using SQL Developer?
    I have installed Oracle 11g(11.1.0.6.0) in server and SQl Developer in my local system.
    I connected to MySQL and Oracle in SQL Developer and tried to MIgrate everything in MySQL to Oracle using Quick Migrate option.
    it took one and half day but didn't work at last...
    is there any pre tasks that i need to do before migrating to oracle from MySQL?
    and also when i export the MySQL data to Oracle using SQL Developer,it is giving data type mismatch errors like (date, boolean etc...).
    please give a reply what i need to do and any refferences also very much appreciated.

    hi Turloch ,
    I followed the steps mentioned above.
    When I right click my MySQL server db Connection and click "Capture MySQL server", it just shows a dialog with "Close" enabled.
    after clicking the close button, it gives following error messages.
    oracle.dbtools.metadata.persistence.PersistableObject.doInsert(PersistableObject.java:238)
    the same error is coming no of times.
    Kindly help me in this regard.

  • Out of memory error in migrating from mysql to oracle

    Hi,
    I'm trying migrate from mysql to oracle9i. The hardware and software requirements are matching or even much higher than mentioned in the documentation. I have installed OMWB is properly(hope so). When I try to migrate the desired database from mysql to oracle, the repository, the Oracle model are created successfully. But while migrating data, say for around 35000 rows insertion everything works pretty fine. But after sometime, the migration stops and no error or anything appears in the screen.And in the Errorlog I get "OutOfMemoryError".
    I tried to migrate single table also. But I still get this problem after sometime. The tables may contain from 10 - 130000 rows...
    I even tried to change the %JRE..% memory value to 64M or 128M in the omwb.bat file and the O/s is Microsoft Windows XP, RAM 256MB.
    Any help is much appreciated.
    Thanks in advance.

    Hi Viji,
    did the message in the error.log provide any extra information? For example, was the OutOfMemory error prefixed with a string
    like "cannot create new native thread" ? My suggestion to workaround the problem would have been to increase the JVM heap size to 128
    but this appears to have been unsuccessful for you. Can you send a mail to the Migration Workbench support services
    ([email protected]) explaining the problem, and attach the full error.log file please ? (please also copy me on the mail).
    In the meantime, you can workaround this by migrating the schema only (there is a switch on step 3 of the migration wizard asking:
    "Do you want to migrate the table data to Oracle?" - just select the "No" option). When the schema has migrated, you can then use the
    offline data loading facility to migrate the data. This uses data extraction scripts and SDQL*Loader to migrate the data to the target
    Oracle database.You can learn more about the offline data loading facility from the plugins referenceguide (from the Help menu in
    the Migration Workbench).
    I hope this helps,
    Tom.

  • How to handle DATE type problems in migrating from mysql to oracle.?

    Hi,
    I'm migrating only the data from mysql to oracle with the help of sql loader.But with this type i cannot able to insert the date values from mysql to oracle.In mysql i have defined date as "DATETIME" type and in oracle it is in TimeStamp.Whenever i'm inserting the values thru CTL file ,i'm getting an error invalid date format entered.How to solve this problem?
    Thanks in Advance
    JAI

    you need to supply a mask to the timestamp entry. see http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#i1006714 for details on datatypes within the ctl file
    B

  • Whether using Oracle after migrating from MySQL be easy or not?

    Though oracle is tough secured one, I don't know exactly the complexity of using Oracle database. Using MySQL 4.1.22 in my website https://www.puntercalls.com/ . Though the site is based on providing share market tips, it deals with a huge amount of stock market data and in much more real time basis hand-to-hand with NSE and BSE info which means a tough security is the utmost demand of the time.
    My question is whether using Oracle after migrating from MySQL be easy or not. You can check my site at https://www.puntercalls.com/ for different real time data updation parts.
    Kind suggestions are greatly appreciated in advance!
    Edited by: 968684 on Oct 31, 2012 7:04 AM

    Hi,
    As you are really asking about how to setup and use securioty features in an Oracle database it woul db ebetter to raise the question in this forum -
    Forum: Database Security - General
    Database Security - General
    They will have more knowledge about Oracle security features and which it would be best for you to use.
    Regards,
    Mike

  • Migrating BO CMS Repository form MYSQL to ORACLE 9i

    Post Author: help_eachother
    CA Forum: Administration
    Hi,
    How can i migrate BO CMS repository from MYSQL to ORACLE 9i.
    Thanks

    Post Author: amr_foci
    CA Forum: Administration
    first verfiy the connection between your business objects server and you oracle server
    then go to the Centeral Configuration Manager and stop the CMS (Centeral Managment Server) and righ click - properties - configuration - go to the CMS data Source and click Specify - you will select your new data souce,, and once more you will copy the data source from ur previous one
    i didnt try it before,, but i think it can help
    good luck

  • Best practice for loading from mysql into oracle?

    Hi!
    We're planning migrating our software from mysql to oracle. Therefore we need a migration path for moving the customer's data from mysql to oracle. The installation and the data migration/transfer have to run onto different customer's enviroments. So migration ways like installing the oracle gateway and connect for example via ODBC to mysql are no option because the installation process gets more complicated... Also the installation with preconfigured oracle database has to fit on a 4,6 GB dvd...
    I would prefer the following:
    - spool mysql table data into flat files
    - create oracle external tables on the flat files
    - load data with insert into from external tables
    Are there other "easy" ways of doing migrations or what do you think about the prefered way above?
    Thanks
    Markus

    Hi!
    Didn't anyone have this requirement for migrations? I have tested with the mysql select into file clause. Seems to work for simple data types - we're now testing with blobs...
    Markus

  • Oracle BLOB value to a LC variable

    Hello,
    Is it possible in LC ES2 to coerce oracle blob value to some livecycle variable ?
    When mapping sql query result (column of type BLOB) to a LC variable (of type Document), we receive:
    com.adobe.workflow.datatype.InvalidCoercionException: Cannot coerce object: oracle.sql.BLOB@27e7d6 of type: oracle.sql.BLOB to type: com.adobe.idp.Document
    We have tried mapping to string, binary, Document (, we even desperately hardcoded sql.oracle.BLOB to process XML), but none of this works.
    Is it possible to solve this other way, then following ?
    http://groups.google.com/group/livecycle/browse_thread/thread/6c4b9156b52b71a7
    Thanks.

    My idea is to fetch the BLOB column data as UTF8 (base64) encoded string and then use getDocumentFromBase64 available in ES2.
    I am not sure what syntax is to fetch from ORACLE.
    I have used MySql database and the query is:
    SELECT CONVERT(Blob_Column USING UTF8) as MyBlobDataAsBase64Str FROM myTableName;
    Now using SetValue activity to look like:   myXMLvariable = getDocumentFromBase64(strVariableHoldingBase64Data)
    This case works perfectly without any issues.
    The problems is you should find out the appropriate syntax for ORACLE.
    I was searching about CONVERT() & UNISTR() functions. But i'm unable to evaluate.
    Try by yourself..
    Nith

  • 10g Migration issue in forms related to graphics

    Hi..
    I am facing a 10G migration issue realted to graphics in Forms.
    A form got migrated from 6i to 10g and it has Graphics in it but it is not displaying the graphics in Runtime after
    migration.can anyone help me reagrding how to resolve this Graphics issue in 10g.
    Thanks,
    Venkat

    Graphics no longer exists in Developer Suite 10G. You have to replace the functionality , e.g. by using BI Beans. Have a look at the samples page http://www.oracle.com/technology/sample_code/products/forms/index.html

Maybe you are looking for

  • Camera Raw stopped working in Bridge

    I installed CS4 in my new pc last week. Everything worked ok. However yesterday I could not see thumbnails for raw images. The same thumbnails were ok the day before, AND I DO NOT REMEMBER CHANGING ANYTHING. I browsed several discussion forums and th

  • Internal power - what kind of molex plug do I have/need?

    Hi all! A quick question that I haven't been able to find the answer to: Like so many others, I recently lost the 1900XT graphics card in my 1st gen Mac Pro (it's toast). I replaced it with a flashed PC card - the 4870 (1 Gig). Since I have a flashed

  • Cannot find an option in Logic to bounce a video with audio.

    Hi I've just finished a college project, where I had to do a soundtrack for film. The problem is that I cannot find an option to export the project as a move file. I went through bunch of different forums and everyone says 'go to - Options/Movie/Expo

  • Receiving files from site using oracle service bus

    Hi, I need to create a solution, using oracle service bus to access a webpage, make authentication, and then receive a zip file. This is possible using osb? Regars!

  • Do LR3 and PS CS5 use the same print engine?

    I use both of these programs but, after finishing whatever work I have to do in PS, I take the image back into LR for printing. I like the layout there and I certainly seemed to get better results there back when I was using LR2.7 and CS4. With the n