Migrate MySQL to Oracle - Tutorial Step 5

Step 5

Now the final step, Run SQL Loader utility with the following arguments

$sqlldr user=scott/tiger control=/opt/oracle/orders.ctl log=orders.log

run sql loader

From the output we can see that SQL Loader has successfully loaded all the rows. If any errors are encountered we can find out the exact error by looking up the log file. In our case the log file is "orders.log"

You can view it using any text editor, let us open it in vi editor by typing

$vi orders.log

and you will see the following output

sql loader log file output

We can now go to SQL Plus and verify that all the rows are imported by giving select statement

SQL> SELECT * FROM orders;

sqlplus plus output 

So this is how we can accomplish transferring of data from MySQL or any database whose data can be converted to FLAT files to Oracle using SQL Loader.

There are also many third party tools which make conversion of MySQL to Oracle very easy and convenient. These commercial tools doesn't require you to write any code and they support many other databases also. One such tool is Data Loader from Interface Computers which can be downloaded from here Download Data Loader

New: Modern Oracle

Concepts here also apply to Oracle 19c/21c/23ai unless a version note says otherwise. See the homepage for what's changed.