oracle - sqlloader syntax error on command line -
i can't figure out syntax error in case trying execute sqlloader command line. seems ok.
command:
sqlldr myuser/mypass@myhost:1521/orcl control=tbx.ctl log=c:\path\to\tbx.log bad=c:\path\to\tbx.bad skip=0
ctl file:
load info infile 'c:\path\to\tbx.csv' table tbx fields terminated ';' optionally enclosed '"' , '"' ( x, xx, xxx, xxxx, xxxxx, xxxxxx, xxxxxxx, xxxxxxxx, xxxxxxxxx )
csv file:
"724098100357859";"";"";"";"";"";"";"" "724098100358417";"";"";"";"";"";"";"" ...
error:
sql*loader-100: syntax error on command-line
table structure:
create table tbx ( "x" varchar2(20 byte), "xx" varchar2(80 byte), "xxx" varchar2(80 byte), "xxxx" varchar2(80 byte), "xxxxx" varchar2(60 byte), "xxxxxx" varchar2(60 byte), "xxxxxxx" varchar2(60 byte), "xxxxxxxx" varchar2(60 byte), "xxxxxxxxx" varchar2(80 byte) )
if paths have spaces in them sql*loader see path more 1 argument, generating lrm-00112 error. haven't shown comments seem issue. need enclose paths in quotes:
sqlldr myuser/mypass@myhost:1521/orcl control='tbx.ctl' log='c:\path\with spaces\tbx.log' bad='c:\path\with spaces\tbx.bad' skip=0
off-topic original question, picking comment... when utilize @myhost:1521/orcl
connect string, you're using easy connection identifier (link sql*plus, same applies here). final element of service name database, may not same sid - orcl.example.com
, instance. on database server can run lsnrctl status
or lsnrctl services
see service names valid. if have working tnsnames.ora
, though, can utilize tns alias instead, e.g. sqlldr myusr/mypass@orcl
.
oracle sql-loader
No comments:
Post a Comment