Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Database Administration >> loader

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: loader
 ib  Posted: Aug 29, 2007 02:41:38 AM

 Total Post: 15
 Joined: Aug, 2007






 hi friends,
can anybody explain how we load data into database.what are the steps involved in sql loader.pls explain me

 Mohammed Taj
Posted: Aug 29, 2007 04:54:25 AM  

 Total Post: 746
 Joined: Jul, 2007






 
Hi,


1.sqlldr utility run on OS command prompt instead of SQL> prompt.

2. you need one file .dat, .csv etc for load in database

3. control file ... through control file sqlldr utility load your text file in oracle database.

how can work control file ?
1. first create table in database
create table test ( no number, name varchar2(20));

2. create data.dat file in OS
eg
1,'taj'

3. create control file for load data.

data.ctl

load data
infile 'data.dat'
into table
fields terminated by ',' optionally enclosed by '"'
(no , name)


try it ...

regards
Taj

 nick
Posted: Sep 11, 2007 03:04:50 PM  

 Total Post: 30
 Joined: Sep, 2007






 
How does one use the SQL*Loader utility?
****************************************
One can load data into an Oracle database by using the sqlldr (sqlload on some platforms) utility. Invoke the utility without arguments to get a list of available parameters. Look at the following example:

sqlldr scott/tiger control=loader.ctl

This sample control file (loader.ctl) will load an external data file containing delimited data:


load data
infile 'c:\datamydata.csv'
into table emp
fields terminated by "," optionally enclosed by '"'
( empno, empname, sal, deptno )

The mydata.csv file may look like this:

10001,"Scott Tiger", 1000, 40
10002,"Frank Naude", 500, 20

Another Sample control file with in-line data formatted as fix length records. The trick is to specify "*" as the name of the data file, and use BEGINDATA to start the data section in the control file.


load data
infile *
replace
into table departments
( dept position (02:05) char(4),
deptname position (08:27) char(20)
)
begindata
COSC COMPUTER SCIENCE
ENGL ENGLISH LITERATURE
MATH MATHEMATICS
POLY POLITICAL SCIENCE

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi333
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software