I have a ddl script to create some tables but the data is in .ctl files and I never use it before. I did some researches but I didn't quite understand how to use SQLLDR. How it works? Can I use some other way to execute the .ctl file? I'm just using PL/SQL and Oracle 10G
0
votes
1 Answers
1
votes
The way you put it, it would go like this:
using DDL script, create all those tables
if CTL files contain data, I presume it is within the
BEGINDATAsection. Fine, couldn't be better because - as soon as you run the loader, it'll know where to find data to be loaded (it also means that control file usesinfile *, right?)you have to have access to SQL*Loader
- if you can connect to the database server, it is there
- if you're using your own PC, see whether it is installed
- along with the Client software
- or, you might even have a database on your PC (XE?)
once you have it (the
sqlldr.exe), make sure its directory is contained with thePATHenvironment variable, or - if not - invoke it by specifying the whole path to itopen command prompt of your operating system
navigate to directory that contains
CTLfilesrun the loader as
sqlldr scott/tiger control=file1.ctl log=file1.log
If everything is OK, data will be loaded. Check log files!