Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Automated file loading
Nothing wrong with using cron, ksh and SQL*Loader. I like using awk
if I need to manipulate the file contents, like if I need to put some
sort of primary key field such as the filename in the front of the file
contents.
For example, I have some scripts that do a bunch of stuff like massage a skeleton controlfile for the current data, then:
sqlldr userid=$lschemapassword log=load_cgp$$ control=load_cgp$$.ctl silent=all
Where $lschmapassword is the username/password.
Also remember you can use hereis files on sqlplus, as well as things like:
echo "$lschemapassword
insert into xyz_table (year, period, created) values
($year,$per,sysdate);
" | sqlplus -s > /dev/null
It's not really difficult to do with PL/SQL (poke about on asktom.oracle.com for some ideas, and probably on orafaq.com); some would argue that would enhance your Oracle marketability.
But I'm a unix bigot and find that cron/ksh is simpler, faster and bulletproof (except when sam blows away the crontab because someone manually commented out a sambackup <sigh>).
jg
-- @home.com is bogus. Big Brother is boring. http://www.signonsandiego.com/uniontrib/20050513/news_1b13websense.htmlReceived on Fri May 13 2005 - 17:02:39 CDT
![]() |
![]() |