The program implements the transfer of data from MySQL to Oracle

Updated on technology 2024-04-10
9 answers
  1. Anonymous users2024-02-07

    If you don't understand C, I'll give you an idea.

    First, call the mysql command through the c program, export the data in the mysql table to a file, select * into outfile 'home mysql

    fields terminated by ’,'

    lines escaped by ’'

    from tbname

    - Import the mysql table into a file, separate columns with commas, and divide rows between rows.

    Next, you need to parse the file through C, parse the content of the file into a line of insert into tbname values statement, values is the value of the column, a row of insert statements, and finally C to call these SQL statements to execute in Oracle, the idea is like this, because you don't know C and Oracle, so, some details need you to consider.

  2. Anonymous users2024-02-06

    Then @王雄辉拉 added,The data type on the oracle side is different from mysql,In addition, the tablespace,There are also some basic SQL syntax differences,You can post the sql,Let everyone see I hope it will help you。

  3. Anonymous users2024-02-05

    This is really not done by people, there are some tools and case tools that can do this at every turn.

    If you're doing a one-time conversion, just export the imported data.

    If you really write a tool, you can connect two different libraries, and read out the data from the O library, one by one to write to the M library, but oracel has a corresponding transparent gateway service, which can be directly connected to MySQL, and then one of your jobs, let him do it regularly, you can't tell you clearly, I don't know what you want to achieve. That's all I can say.

  4. Anonymous users2024-02-04

    We'll be happy to answer for you.

    1. Import the data in the table into a text file for saving.

    I did it in command line mode under win.

    mysql>select * from my_mysql_table into outfile 'c: /my_';

    2. Write control files.

    Use Notepad to open a document and change the extension name after writing. CTL, the following is the specific content load data

    infile 'c:/my_'

    into table my_ora_tablereplace

    fields terminated by x'09'

    Field 1, Field 2, Field 3 ,..Field n) Field 1 n is the table field data of MySQL that you want to import, and the fields that are not needed can not be written.

    3. Use sqlLDR to import text.

    c:\>sqlldr ora_usr

    After entering, enter the path and password of the control file, and then load the control file and import it automatically. After the import is complete, a copy will be generated. log file, you can check whether your import is successful, and find the reason according to the error prompted.

    Note: Before importing text, you should build a table in the oracle database to write data in advance, and it should be consistent with the data field to be imported, if you don't know the table structure of mysql, you can show create table my mysql table > mysql; View the SQL statement that creates the table and convert it to an executable SQL statement in Oracle

    If you are satisfied, please click [Accept Answer] on the right, and if you still have questions, please click [Follow-up].

  5. Anonymous users2024-02-03

    This is going to use the ETL tool, after all, you have to do field processing!

  6. Anonymous users2024-02-02

    Right-click == >> to rename and enter oracle.

  7. Anonymous users2024-02-01

    SQL must be adjusted, data migration is not a problem, same as above.

  8. Anonymous users2024-01-31

    You may not be able to do this way, but the oracle data is backed up. DMP file, I think you use oracle will generally use TOAD or PLSQL external tools, you can export all the data to Excel, and then pour it into MySQL on it, it may be problematic to pour it directly Follow-up question: You said that this method is a table by table, come on, I have thousands of tables in my database......Answer:

    That might be a little more troublesome, 1You can write the data as a txt file, and mysql will read it in the file Follow-up question: I have now used a third-party tool to match the oracle table structure to mysql, and I am waiting to insert the data.

    Answer: Write a program that reads all tables and all table data under the oracle user, stores them in the dataset, and then inserts them into mysql in batches, can you understand this or you will guide them one by one Follow-up question: I just asked a master, you can import from oracle to sqlserver, and then from sqlserver to mysql.

    I don't know if it's feasible ......Answer: You can connect to the data source (connect to the Oracle database) directly in SQL Server and directly use the data import function of SQL Server. Zhang Fei's testimonials:

    Thanks, Master 2011-04-14

  9. Anonymous users2024-01-30

    You can borrow third-party tools, such as PB and PLSQL Developer, to pour the data of the table into SQL files and execute them in MySQL. With PB (PowerBuilder) data pipeline tools, it's simple.

Related questions
4 answers2024-04-10

Do you send out your sql part to take a look? Report any errors?

5 answers2024-04-10

It seems that there is something called triggers in the DB, and there seems to be another thing called transactions.

16 answers2024-04-10

The 3 integers of only 200w are definitely no problem, and they don't hit without tens of millions of influences. >>>More

7 answers2024-04-10

Method 1: Leverage the Metadata Locks view.

This method is only applicable to MySQL versions or later, and the performance schema adds Metadata Locks, which can easily locate the global lock session if the probe with metadata lock enabled before locking (the default is not enabled). >>>More

14 answers2024-04-10

As MySQL iterates over the releases, crashes become less frequent and more insidious. >>>More