-
I'm trying to develop a bulk lister for our Web App. The documentation for sql loader is a bit overwhelming. Can any recommend a good tutorial or getting started doc? Thanks.
-
Were you reading Oracle Utilities Manual?
If it seems like overwhelming, just try a simple load:
Precreate a two column table called junk with, e.g. two columns. This table needs to be created by a user e.g. scott or whatever you like but it needs to be the same user you will run sql load ina moment.
create table junk (name varchar2(40), dnum number);
Then create a simple controlfile, a file by typing in vi if you are on UNIX or Notepad if on PC.
You controlfile will look like this, called e.g. ulcase1.ctl :
LOAD DATA
INFILE *
INTO TABLE junk
FIELDS TERMINATED BY ’,’ OPTIONALLY ENCLOSED BY ’"’
(name, dnum)
BEGINDATA
"SARATOGA",12
So your data will be inside controlfile and you will be loading one row, SARATOGA will go to a first column, number 12 to a second one.
Last step, go to UNIX prompt or DOS (verison 8i of oracle) and type:
sqlldr userid=scott/tiger control=ulcase1.ctl log=ulcase1.log
That will be your simple load with a log. You can see what happened during load in a log.
Your table will get data loaded.
That's all I can give and I learnt all details just by running loads. Principle is the same no matter what data type we use or what controlfile we write... I think Utility manual is still the easiest to use :-)
Alla S. Pfauntsch
Oracle DBA
========================================
"Life is what happens while you are planning something else".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|