Import MYSQL to Oracle Blob
Our team is planning to migrate from mysql to oracle. They provided a file in text format which produce using the mysqldump utility, and I can find the sql statement in this file. But I do not see file contain some raw data associated with characters of blob. Can I import data from text/number, but how can I import data blob in oracle using the sql statement or tool. Any idea
Use SQL * Developer.
Here is a nice HOWTO move data from MySQL to ORACLE.
MK
Tags: Database
Similar Questions
-
How to import the selected tables from MySQL to Oracle
Hello world:
How can I import tables from MySQL to Oracle? I have more than 180 tables in my DB (MySQL), but I copy only 12 of them to ORACLE... rigth now I do it manually, using SQL Developer (rigth clicking on the picture icon and copy to Oracle) but now I need to do this automatically every 4 hours...
I read on the dblink option, but I don't know if this is the best for this case...
I appreciate all help.
Best regards
JackHi Jack,
I think that with a db-link you can define an automated task (PL/SQL + programmer).
We use a db-link to Oracle's RDBMS to MySQL. So we have no experience.
We have created the db-link like http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/Heike cordially
-
MySQL to Oracle using LKM SQL to Oracle, poor performance
Hello
I'm on the underside of technology.
I'm try to use ODI to import data from MySQL to Oracle using the LKM SQL to Oracle, it works well for small amounts of documents but once volumes go higher it performs very badly.
I'm replacing an integration of existing HS dblink to 44 seconds and ODI is 9 minutes.
The MySQL and Oracle DB are on the same host with an autonomous ODI agent on the same host.
MySQL 5.6.21
Oracle 11.2.0.4
Oracle Data Integrator 12.1.3
I may try a different approach to dumping the MySQL table to a flat file and import from external table or sqlldr but y at - it a way to make the LKM SQL for Oracle perform better?
Hello
This problem has been resolved.
I was setting the table sizes in batches on the data source server, after you set the values on the target data server is it now works as expected.
Using a value of 5,000 for the two tables has reduced the operating time of 9 minutes to about 40 seconds.
-
Oracle BLOB value to a variable of LC
Hello
Is it possible to LC ES2 to force oracle blob value to a variable in livecycle?
During the mapping of results of the sql query (type BLOB columns) to a variable of LC (of type of Document), we get:
com.adobe.workflow.datatype.InvalidCoercionException: can not compel object: type oracle.sql.BLOB@27e7d6: oracle.sql.BLOB type: com.adobe.idp.Document
We tried mapping string, binary, Document (we even desperately sql.oracle.BLOB hardcoded in the XML process), but none of it works.
It is possible to solve this another way, then follows?
http://groups.Google.com/group/LiveCycle/browse_thread/thread/6c4b9156b52b71a7
Thank you.
My idea is to recover data from BLOB column as UTF8 (base64) string encoded and then use getDocumentFromBase64 available in the ES2.
I don't know what syntax is to retrieve Oracle.
I used the MySql database and run the query:
SELECT CONVERT (with the HELP of tbl_nameSET UTF8) as MyBlobDataAsBase64Str myTableName;
Now, using SetValue activity to look like: myXMLvariable = getDocumentFromBase64 (strVariableHoldingBase64Data)
This case works perfectly without any problems.
---------------
The problem is you should find the appropriate for ORACLE syntax.
I was searching on the functions of CONVERT() & UNISTR() . But I'm unable to assess.
Try for yourself...
Nith
-
How to migrate from MySQL to Oracle stored procedure
Hi all
I've migrated mysql 5.1.42 - enterprise-gpl-advanced DB for oracle sqldeveloper 3.1.07 tool.
DB objects migrate successfully except stored procedures.
I checked .sql and files... Capture process not captured SQL stored procedures.
Could you please suggest where I can check correct error or how to fix this.
Thanks in advance.
Hello
SQL * Developer version you use is an old and you must use the latest version available from this link.
However, even the v4 version does not support the migration of procedures stored as stated in this link - MySQL
http://www.Oracle.com/technetwork/developer-tools/SQL-Developer/supportedmigplatforms-086703.html
You will need to manually convert the MySQL in Oracle format, stored procedures since even the "Scratch Editor" under "tools - migration '-doesn't have an option for MySQL conversion.
The documentation includes details of the difference between MySQL and Oracle stored procedures-
Oracle SQL Developer information for the migration of MySQL®
in chapter Triggers and procedures stored
Kind regards
Mike
-
UNIX_TIMESTAMP and FROM_UNIXTIME from MySQL to ORACLE functions
Hi all
I'm migrating some functions and stored procedures in MySQL to ORACLE, and I the next instruction
Set valuedat = FROM_UNIXTIME (valor + UNIX_TIMESTAMP ('2000-1-01 00:00:00 '));
Since MySQL.
Look, I found that:
UNIX_TIMESTAMP ('2000-1-01 00:00:00 ')
can be equivalent to the following query:
SELECT (to_date (January 1, 2000 "," MON-DD-YYYY')-to_date('01-jan-1970','DD-MON-YYYY')) * (86400) as dt FROM dual;
but testing the numbers is not the same
Please can someone help me!
Specifically, I need to know how to build the equivalent in oracle for FROM_UNIXTIME and UNIX_TIMESTAMP functions
Thank you and best regards!
CRGM
Hello
These are functions that I built to solve the original requirement, thanks for all your comments.
************************************************************************************************************************************
CREATE OR REPLACE FUNCTION FROM_UNIXTIME
(
TIMESTAMP_ NUMBER
) AS OF DATE OF RETURN
NUMBER OF SECONDS_PER_DAY: = 86400;
MASK (50 CHAR) VARCHAR2: = 'DD-Mon-YYYY HH24:MI:SS ";
DATE OF REF_DATE;
BEGIN
REF_DATE: = TO_DATE ('01 - ENE - 1970 00:00:00 ', MASK);
RETURN REF_DATE + (TIMESTAMP_/SECONDS_PER_DAY);
END FROM_UNIXTIME;
**********************************************************************************************************************************
CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP
(
DATE_ IN DATE
) RETURN AS NUMBER
NUMBER OF SECONDS_PER_DAY: = 86400;
NUMBER OF DIFF_BETWEEN_DATES;
MASK (50 CHAR) VARCHAR2: = 'DD-Mon-YYYY HH24:MI:SS ";
DATE OF REF_DATE;
BEGIN
REF_DATE: = TO_DATE ('01 - ENE - 1970 00:00:00 ', MASK);
DIFF_BETWEEN_DATES: = TO_DATE (TO_CHAR (SYS_EXTRACT_UTC (DATE_), MASK), MASK)
-REF_DATE;
RETURN DIFF_BETWEEN_DATES * SECONDS_PER_DAY;
END UNIX_TIMESTAMP;
******************************************************************************************************************************
Concerning
-
Insert and update records to MySQL from Oracle
Hello
Our application will be insert/update new records in the Oracle database, but I need to insert/update new records in the MySQL database. Oracle and MySQL tables have the same columns.
Right now, we intend to create DBLink between Oracle and MySQL. The question is to know how to write code to insert/update new records to MySQL from Oracle. I'm a new guy in this area.
Please give us some examples of code, thanks!
With Oracle, you should be able to just write the same thing as usual, except for the include link database when you reference the table for example your SQL
insert into tablename@mysqldblink...
updating of the game tablename@mysqldblink...
Services gateway through the database link (odbc drivers or anything else that is used) must make the most of the necessary conversions for you.
-
Migration from MySQL to Oracle SQL does not
Hello everyone,
I am new to Oracle SQL, but since our MySQL database is more and get more slowly, I would like to test the performance of Oracle SQL.
So, I downloaded the current Oracle Linux distro and installed Oracle Database 11 g Express Edition.
I connected with Oracle SQL Developer and started to migrate the MySQL database by following each step of this tutorial.
I had to abandon all the privileges of the user migration (otherwise the creation and the deleteion of the migration repository did not) and I have disabled the migration of constraints to make migration work.
Then I proceeded through all of the steps of the tutorial and ended with a "successful migration.
The last step of the tutorial, it was to connect to the db migrated (using a combination of username/password generated name), it was not possible.
What do I already checked?
- Logged on as user system, I see that there is no new user created for the migrated db
- Looking at the overview in the migration repository I see 3 phases, not knowing if the third displays an error or if it is not necessary at all (I got 58 tables in the db of the source)
- Capture of 58/58
- Convert 58/58
- Compile 0/58
From here, I don't know where to look for additional errors.
I still can't use the migrated db and so I can't go forward with my tests.
I missed something?
I would appreciate your help.
Astaldo
Astaldo salvation,
First, you must use SQL Developer 4.0.2 If you aren't already. It is available for free on OTN
http://www.Oracle.com/technetwork/developer-tools/SQL-Developer/downloads/index-098778.html
There are two ways to convert tables from MySQL to Oracle.
1) copy to Oracle
(2) migration to Oracle.
Copy to Oracle is the simplest method. It does not imply the creation of a repository of migration. But it only migrates data without constraints or default values or indexes and tables. The set of data to move should be reasonably low as it is moved on JDBC.
It may suit your purpose to try to Oracle.
http://dermotoneill.blogspot.co.UK/2010/11/copy-to-Oracle.html
Migrate Oracle requires the implementation of a migration repository. But he migrate the default settings, constraints, and indexes and can also provide scripts offline data move that can manage the circulation of large data sets.
Here is a small script to create a new MIGRATIONREPO user, and grant the correct privileges.
CREATE USER MIGRATIONREPO IDENTIFIED BY oracle.
ALTER USER MIGRATIONREPO QUOTA UNLIMITED ON USERS;
GRANT CONNECT, RESOURCE, CREATE VIEW, CREATE MATERIALIZED VIEW to MIGRATIONREPO;
Then using SQL Developer, create a connection to MIGRATIONREPO, right-click on the connection and choose "associate the Migration repository.
I hope you have success best creation of migration with the privileges of theses repository.
Migration Wizard step 8: target database
Choose Offline Mode.
This will present you with a build script that you can inspect before the race.
The build script must be run using the SQL Developer worksheet and choose free user sufficiently privileged in Oracle generally SYSTEM.
Note that if you would rather work with the repository you must currently you can browse your browser of Migration.
Access converted database objects, right-click and select "generate the target".
This will again open the Migration Wizard in step 8. Allowing you to choose Offline Mode so that you can review the build script.
Hope this helps,
Kind regards
Dermot.
SQL development team.
-
MY SQL-(5.1.61) version
Oracle (11.2.0.2.0 - 64 bit)
Must read a view in Oracle's MYSQL and flush the data in the table from Oracle scene.
Please provide the steps in detail.
Thank you.
Best regards
Franck GiriHello
You can use the database for ODBC (DG4ODBC) gateway to establish a connection to the MySQL database, and then use the copy, "create table as select... "or select / insert commands to move the data from MySQL in Oracle tables.
You will need access to My Oracle Support, but the following notes have details on setting up Dg4ODBC on variosu - platformsHow to set up DG4ODBC on x 86 32 bit Linux or HP - UX RISC (11.1 DG4ODBC only) to connect to databases Non-Oracle post installation (Doc ID 466228.1)
How to set up DG4ODBC on 64 bit OS Unix (Linux, Solaris, AIX, HP - UX Itanium) to connect to Oracle databases Post Install (Doc ID 561033.1)
How the installer DG4ODBC (gateway for ODBC Oracle database) on Windows 32 bits (Doc ID 466225.1)
How to set up DG4ODBC (gateway for ODBC Oracle database) on 64-bit Windows operating systems to connect to Oracle databases Post Install (Doc ID 1266572.1)Then this note contains information on the data - transfer
Copying data between Oracle database and non-Oracle foreign databases or data banks using gateways (Doc ID 171790.1)
You can also use GoldenGate which allows the replication of data between Oracle and non-Oracle databases in real-time.
Kind regards
Mike -
MySQL to Oracle Migration offline: scripts incorrectly generated for tables
Hello
I used SQL Developer 3.0.4 to migrate Mysql to Oracle databases.
I have the following errors on the charger (oracle_ctl.sh) scripts to run:
SQL * Loader-2026: the charge was dropped because SQL Loader cannot continue.
SQL * Loader-500: could not open the file (data / framework_perdadepacotes_diari.txt)
The "framework_perdadepacotes_horario.txt" dump file is generated by mysqlsdump with the original mysql table name and ".txt" sufix:
-excerpt from unload_script.sh
mysqldump-u $username - p $server h $ t socket=/u01/mysqlmulti/mysql2/mysqld2.sock port password data = 3312 fields terminated by = "< EOFD >" fields escaped by = ""-lines terminated by = "< EORD >" "dxdb" "framework_perdadepacotes_horario" "
but sql loader controlfile makes reference to the file by using the new name of the oracle table (in this case, that the new name is truncated to 30 characters):
--
load data
INFILE ' data / framework_perdadepacotes_diari.txt ".
"str"< EORD >"
in the dxdb.framework_perdadepacotes_diari table
Another instance of the same problem, but in this case the table name starts wth "_":
-of unload_script.sh
mysqldump-h $server u $username - p$ password t data fields terminated by = "< EOFD >" fields escaped by = ""-lines terminated by = "< EORD >" "netdb" "_Clientes" "
file name generated by mysqldump: "_Clientes.txt."
CTL file:
load data
INFILE ' data / CLIENTES_1.txt ".
"str"< EORD >"
in the CLIENTES_1 table
Is this a bug, or are we supposed to manually fix the scripts for these cases?
Thank you
Edited by: user12099785 11/10/2011 06:11Currently, you have to fix manually because there was no bug recorded for this question. I have now filed the bug and it will be if all goes well fixed in one of the next versions to come.
-
Creating a DB link between mySQL and Oracle
How can I create a dblink in mySQL to display the data in a table in Oracle 10g?
Thank you
RoaldWhat is the OS of Oracle and MYSQL database?
You can check the following link
http://www.Pythian.com/news/1554/how-to-access-MySQL-from-Oracle-with-ODBC-and-SQL/ -
Migration - MySQL to Oracle - do not generate data files
Hello
I have been using the SQL Developer migration Assistant to move data from a MySQL 5 database to an Oracle 11 g server.
I used it successfully a couple of times and its has all worked.
However, I am currently having a problem whereby there is no offline data file generated. Control files and all other scripts generated don't... just no data file.
It worked before, so I'm a bit puzzled as to why no logner work.
I looked at newspapers of migration information and there is no errors shown - datamove is marked as success.
I tried deleting and recreating rhe repository migration and checked all grants and privs.
Is there an error message then it would be something to continue but have tried several times and checked everything I can think.
I also tried the approach of migration command-line... same thing. Everything works fine... no errors... but only the table creation and control script files are generated.
The schema of the source is very simple and there is only the tables to migrate... no procedure or anything else.
Can anyone suggest anything?
Thank you very much
MikeHi Mike,.
I'm so clear.
You use SQL Developer 3.0?
You walked through the migration wizard and choose Move Offline mode data.
The generation of DDL files are created as are the scripts to move data.
But no data (DAT) file is created and no data has been entered in the Oracle target tables.With offline data move, Developer SQL generates (saved in your project, under the DataMove dir directory) 2 sets of scripts.
(a) a set of scripts to unload data from MySQL to DAT files.
(b) a set of scripts to load data from the DAT files in the Oracle target tables.
These scripts must be run by hand, specifying the details for the source databases MySQL and Oracle target."no offline data file generated. Control files and all other scripts generated don't... just no data file. »
«.. . but only the creation and control file table scripts are generated. »What you mean
(1) the DAT files are not generated automatically. This should, if we need to run the scripts yourself
(2) after manually running the scripts that the DAT are not present, or that the DAT files are present, but the data does not load in Oracle tables.
(3) the scripts to move data in offline mode does not get generatedKind regards
Dermot
SQL development team. -
Golden Gate 11 g replicate from MySQL to Oracle
Golden Gate 11 g for MySQL can read mysql binlog. I have a question, can I use GG11g for MySQL to replicate from MySQL to Oracle?
Thank and regardOK, here's the official word from Oracle on it.
Oracle GoldenGate now supports MySQL 5.1.15 and later capture and oracle can be a target. Therefore, if you use MySQL 5.1.15 or later, you can indeed use Golden Gate to replicate from MySQL to Oracle when you use GoldenGate 11 g.
-
Conversion of a query GROUP_CONCAT of MySQL to Oracle
Hi all
We migrated our MySQL to Oracle database and we are facing the GROUP_CONCAT in MySQL built-in function.
I went through the WM CONCAT, COLLECT AND other built-in aggregates Oracle packages. Our problem is the following:
Table A (emp_number, emp_firstname, emp_lastname, Emp_status) and table B (emp_reporting_mode, emp_sub_mode, emp_sup_mode); Emp_sup_mode here is the employee
These tables are not related, and we have these data
Table A
emp_number emp_firstname emp_lastname Emp_status
5 BEN STA000 Raoul
Nadine 6 YAYA NULL
1 Hermann LONDJI STA001
STAT00 ONANA honors 14
Table B
emp_reporting_mode emp_sup_mode emp_sub_mode
1-6-1
1-14-5
The emp_sup_mode represents the emp_number and emp_sub_mode the emp_number subordinate supervisor. MySQl was able to use the GROUP_CONCAT to concatenate this.
as such and should exit the emp_firstname and the emp_lastname of the contractor where the supervisor code is equivalent to the number of the employee. Here, we can see Nadine YAYA (emp_number 6) is the prime contractor to Hermann LONDJI (emp_number 1) and Honoré ONANA (emp_number 14) is the architect of Raoul ESSOME (emp_number 5).
Thanks for any input. Other methods and rather global functions of similar id and cos.with a as ( select 5 emp_number,'Raoul' emp_firstname,'ESSOME' emp_lastname,'STA000' emp_status from dual union all select 6,'Nadine','YAYA',NULL from dual union all select 1,'Hermann','LONDJI','STA001' from dual union all select 14,'Honore','ONANA','STAT00' from dual ), b as ( select 1 emp_reporting_mode,6 emp_sup_mode,1 emp_sub_mode from dual union all select 1,14,5 from dual ) select a1.emp_number, a1.emp_firstname, a1.emp_lastname, a2.emp_firstname || ' ' || a2.emp_lastname supervisor from b, a a1, a a2 where a1.emp_number = b.emp_sub_mode(+) and a2.emp_number(+) = b.emp_sup_mode / EMP_NUMBER EMP_FIR EMP_LA SUPERVISOR ---------- ------- ------ -------------- 1 Hermann LONDJI Nadine YAYA 5 Raoul ESSOME Honore ONANA 14 Honore ONANA 6 Nadine YAYA SQL>
SY.
-
Hello!!
I know it is posible to create a dblink Oracle to MySQL, but the question is, is posible to create a link between MySQL to ORACLE Db?
I hope that this question as soon as posible.
Regads!Ion user11925786 wrote:
Hello!!I know it is posible to create a dblink Oracle to MySQL, but the question is, is posible to create a link between MySQL to ORACLE Db?
I hope that this question as soon as posible.
Regads!
And why do you think that the answer would come ASAP?
As far as I KNOW, mysql doesn't a link db support.
Aman...
Maybe you are looking for
-
LaserJet m1132 mfp: what is the best fully functional LASER JET MFP with YOSEMITE
Hello I have a hp laserjet m1132 MFP print and copy works fine but scanning produce a white sheet looked all over the web, but it seems that this function is not supported by the mac os x 10.10.3 yosemite so I need to buy a new printer (all-in-one) c
-
I m unable to turn on windows Defender. It displays error 0 * 800106ba. I m using microsoft security databases since then I m having this problem
-
After downloading vista service pack 2, there has been no noise. Followed all advice found, software audit, software from the Device Manager. I have an IDT High Definition Audio CODEC and NVIDIA High Definition Audio on an HP laptop. I'm at my wits e
-
Afraid I messed up my network connection settings
So this is the problem. I usually use a WiFi connection when I'm at home. I don't have my own wireless connection so I connect to one that is available. Well yesterday I used my internet friends home. When I plugged the Ethernet cable to my laptop, t
-
OfficeJet 6500 - switch from USB to wireless connection?
Got a new MacBook Pro (OS 10.6 Snow Leopard) and new Officejet 6500 Wireless, installation on old wired eMac (OS x 10.4.11) seemed to go smoothly. Fine prints of eMac/USB connection, but I can't figure out how to go wireless to print from MacBook. (U