Thursday, February 07, 2013

SQL*Loader and ORA-01480

This was tested on Oracle 11.2.0.2.7 on Solaris. I created a SQL*Loader control file with a table name which was more than 30 characters long: 

ORCL > cat andrew.ctl
load data
infile 'andrew.dat'
into table andrew7890123456789012345678901
fields terminated by ','
(col1, col2, col3)
ORCL >

Then when I tried to use SQL*Loader, I got an ORA-01480: 

ORCL > sqlldr / control=andrew.ctl
 
SQL*Loader: Release 11.2.0.2.0 - Production on Thu Feb 7 16:06:23 2013
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
SQL*Loader-704: Internal error: ulmtsyn: OCIStmtExecute(tabhp) [1480]
ORA-01480: trailing null missing from STR bind value
ORCL >

I reduced the length of the table name to 30 characters and the error went away.

In Spanish / en español

No comments: