Import backup between mysql database and oracle database

Import backup between mysql database and oracle database

Import the data exported from the Oracle database into the MySql database

1. Import into the MySql database using the default end symbol:

LOAD DATA LOCAL INFILE 'd:/oracle.txt' IGNORE INTO TABLE alarmLog

At this time, the default terminator of Fields is the '/t' tab character, not the "/t" string.

2. When setting the Fields terminator to import into the MySql database:

LOAD DATA LOCAL INFILE 'd:/oraclea.txt' IGNORE INTO TABLE alarmLog FIELDS TERMINATED BY '~'

The data files oracle.txt and oraclea.txt used in the above two cases are exported by the ociuldr.exe program.

Import the data exported from MySql into the Oracle database

1. Import data from the MySql database into a file by setting the Fields terminator

select * from alarmLog into outfile 'd:/mysql.txt' FIELDS TERMINATED BY '~'

Import the d:/mysql.txt data file into the Oracle database through sqlldr. Pay attention to the writing of the control file. 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)
)

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • MySQL import and export command usage for backup and restore
  • How to import and export MySQL database (backup and restore)
  • MySQL import and export backup details

<<:  Detailed usage of Vue timer

>>:  Build nginx virtual host based on domain name, port and IP

Recommend

How to introduce scss into react project

First download the dependencies yarn add sass-loa...

The grid is your layout plan for the page

<br /> English original: http://desktoppub.a...

The process of installing and configuring nginx in win10

1. Introduction Nginx is a free, open source, hig...

The difference between html form submission action and url jump to actiond

The action of the form is different from the URL j...

Build a server virtual machine in VMware Workstation Pro (graphic tutorial)

The VMware Workstation Pro version I use is: 1. F...

Solve the abnormal error when building vue environment with webpack

Table of contents First, configure package.json T...

Summary of the three stages of visual designer growth

Many people have read this book: "Grow as a ...

How to dynamically modify the replication filter in mysql

MySQL dynamically modify replication filters Let ...

Detailed example of Linux all-round system monitoring tool dstat

All-round system monitoring tool dstat dstat is a...