oracle table fill from flatfile via .cmd/.ctl files using telnet
Date: 11 May 2002 15:32:42 -0700
Message-ID: <fc627ce0.0205111432.417bd7c5_at_posting.google.com>
Hi,
Currently I use a telnet session to execute an upload of data from a
flatfile to an oracle table, using the following entries:
>"[profilename].cmd"
this prompts me for a password, so my next entry is:
>"[password]"
That's it.
The .cmd file, when viewed in notepad looks like:
set ORACLE_SID=[blah]
sqlldr control=[profilename].ctl log=[profilename].log
userid=[blahblah] DIRECT=true data=[flatfilename]
The .ctl file referenced above, when viewed in notepad looks like:
unrecoverable
load data
truncate into table [tablename]
trailing nullcols
(
[fieldname1] position(1:11), [fieldname2] position(12:13), ... ... [fieldname10] position(83:88)
)
What I'm hoping for is guidance as to how I can:
a) automate this telnet session (connect, logon, commandline,
password)
b) avoid telnet entirely and run in VB code
Any help much appreciated.
Thanks,
Frank
Received on Sun May 12 2002 - 00:32:42 CEST