Import backups between MySQL database and Oracle database

Source: Internet
Author: User

Import data exported from an Oracle database into a MySQL database
1. Import to the MySQL database using the default closing symbol:
LOAD DATA LOCAL INFILE ' d:/oracle.txt ' IGNORE into TABLE alarmlog
The Terminator in fields now defaults to the '/t ' tab instead of the '/t ' string.
2. When the set fields terminator is imported into the MySQL database:
LOAD DATA LOCAL INFILE ' d:/oraclea.txt ' IGNORE into TABLE alarmlog fields TERMINATED by ' ~ '

The data files used in both cases oracle.txt and oraclea.txt are exported through the Ociuldr.exe program.

Import data exported from MySQL into an Oracle database
1. Import data from MySQL database into a file by setting the fields Terminator
SELECT * from Alarmlog to outfile ' d:/mysql.txt ' fields TERMINATED by ' ~ '
Import the D:/mysql.txt data file into the Oracle database via SQLLDR. Note that the control file is written, the following is the control file corresponding to the test program.

OPTIONS (bindsize=8388608,readsize=8388608,errors=-1,rows=50000)
LOAD DATA
INFILE ' D:/mysql.txt ' "STR X ' 0A '"
Into TABLE Instantdata
Fields TERMINATED by ' ~ ' TRAILING nullcols
(
FieldID CHAR (20),
Createtime Date ' Yyyy-mm-dd hh24:mi:ss ',
Acktime Date ' Yyyy-mm-dd hh24:mi:ss ',
TYPE CHAR (40),
Quality CHAR (40),
VALUE CHAR (40),
AVG CHAR (40),
MAX CHAR (40),
MIN CHAR (40),
SUM CHAR (40)
)

Import backups between MySQL database and Oracle database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.