oracle sql and dba tutorial logo

 

Oracle DBA

Learn Oracle 11g / 12c Database Admin step by step



Oracle SQL

Tutorial for Oracle SQL


Oracle DBA Interview Questions

Most asked Oracle DBA Interview Questions.

60 Technical Questions
42 Backup & Recovery Questions

Unix For Oracle DBA 20 Questions



Download Oracle 11g / 12 c Software

Links to Download Oracle 12c / 11g for Linux, Windows etc.


MySQL Tutorial

Learn MySQL step by step


 

 

 

 

 

 

 

 

 

Migrate MySQL to Oracle - Tutorial Step 4

Step 4

We should now create a SQL Loader control file by using any text editor. We will use VI editor for this purpose. Remember creating control file is mandatory in SQL Loader. In the control file we specify the format of the input file and target table name and other settings

Login to Linux machine as oracle user and start vi editor by typing the vi command along with control file name. Here we are using orders.ctl you can use any filename as per your choice

$vi orders.ctl

Then write the following contents

LOAD DATA
INFILE '/opt/oracle/test.csv'
BADFILE '/opt/oracle/test.bad'
DISCARDFILE '/opt/oracle/test.dsc'
APPEND INTO TABLE SCOTT.Orders
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(OrderID,CustomerID,EmployeeID,OrderDate date "yyyy-mm-dd hh24:mi:ss",
RequiredDate date "yyyy-mm-dd hh24:mi:ss",ShippedDate date "yyyy-mm-dd hh24:mi:ss",
ShipVia,Freight,ShipName,ShipAddress,ShipCity,ShipRegion,ShipPostalCode,ShipCountry) 

write control file for sql loader 

After writing the above contents save the file and quit VI by pressing ESC and then :wq

next step

 

 


HomeContact Us

Data Loader

Data Loader is a simple yet powerful tool to
export and import Data between many common database formats


Forms Data Loader

Tool to load data into Oracle E-Business Suite R12 / Oracle Apps using Macros and Forms Record and Playback

Interface Computers Academy © 2007-2017 All Rights Reserved