How to load long columns using loader?

Question:

I get errormessages when the column have more than 255 characters.
The recieving column is a VARCHAR2(2000).

I have recently read somewhere in the documentation that the default
maximum
length of a column loaded in this manner is 255 characters.
I tried to find something in the doc's about adjusting this length,
or on how to solve the problem.

There must be a simple solution, or??

Regards
Göran K

Answer:

I found the solution myself on Oracle MetaLink
in a document titled "SQL*Loader - Questions and Answers":

Q.      I am attempting to load into a varchar2 column with data > 255
          characters and SQL*Loader is rejecting these records with
          "Field in data file exceeded maximum specified length".

  A.      By default SQL*Loader has a 64K buffer which it uses to hold
          up to 64 rows for inserting into the database.  In order to
          decide how many rows will fit into this buffer, SQL*Loader
          reads the field information in the control file to determine
          the maximum space needed for each field's data.  Where the
          length is not given explicitly or implied by the data type,
          SQL*Loader must make some assumptions.  In the case of
          character strings it will assume that the data can be up to
          255 bytes (assuming too large a number would simply waste
          space in many cases).  Thus, if you have character data > 255
          you must tell SQL*Loader the maximum length the data can be,
          eg "col1 char(300)".  Note, specifying lengths for small
          character fields can often improve efficiency in that if
          SQL*Loader does not have to reserve 255 bytes for each such
          field it may be able to fit more records into its buffer and
          so have to commit less frequently during the load.
 
 
 

Hosted by www.Geocities.ws

1