SQL*Loader (sqlldr or sqlload) is a bulk loader utility used for moving data from external files into the Oracle database.
The synatx of command is as follows:
sqlldr userid=scott/tiger control=user.ctl log=user.log direct=y
This sample control file (user.ctl) will load an external data file containing comma (by default) delimited data:
LOAD DATA
INFILE '/home/nayakr/User_Permission.csv'
BADFILE ‘/home/nayakr/User_Permission.bad’
DISCARDFILE ‘/home/nayakr/User_Permission.bad’
INSERT INTO TABLE User_Apps
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
( USER, APPS, PERMS )
The 'User_Permission.csv' contains following data:
"NayakR", "Oracle", 2
"NayakR", "DB2", 99
"NayakR", "Sybase", 1
The synatx of command is as follows:
sqlldr userid=scott/tiger control=user.ctl log=user.log direct=y
This sample control file (user.ctl) will load an external data file containing comma (by default) delimited data:
LOAD DATA
INFILE '/home/nayakr/User_Permission.csv'
BADFILE ‘/home/nayakr/User_Permission.bad’
DISCARDFILE ‘/home/nayakr/User_Permission.bad’
INSERT INTO TABLE User_Apps
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
( USER, APPS, PERMS )
The 'User_Permission.csv' contains following data:
"NayakR", "Oracle", 2
"NayakR", "DB2", 99
"NayakR", "Sybase", 1
No comments :
Post a Comment