Oracle7 Server Utilities
Command-Line Keywords
This section describes each of SQL*Loader's command-line keywords.
Keyword
| Identifies
|
|
BAD
| Bad File
|
|
BAD specifies the name the bad file created by SQL*Loader to store records that cause errors during insert or that are improperly formatted. If a filename is not specified, the name of the control file is used by default with the extension .BAD. This file has the same format as the input datafile, so it can be loaded by the same control file after appropriate updates or corrections are made.
A bad file filename specified on the command line becomes the bad file associated with the first INFILE statement in the control file. If the bad file filename was also specified in the control file, the command-line value overrides it.
BINDSIZE specifies the maximum size of the bind array in bytes. The size of the bind array given by BINDSIZE overrides the default size (which is system dependent) and any size determined by ROWS. The bind array is discussed 5 - 63.
Keyword
| Identifies
|
|
CONTROL
| Control File
|
|
CONTROL specifies the control file that describes how to load data. If a file extension or file type is not specified, it defaults to CTL. If omitted, you are prompted for it.
DATA specifies the data file containing the data to be loaded. If a filename is not specified, the name of the control file is used by default. If a file extension or file type is not specified, it defaults to DAT.
DIRECT specifies the load method to use, conventional path or
direct path. TRUE specifies a direct path load. FALSE specifies a conventional path load. The defaults is FALSE. Load methods are explained.
DISCARD specifies an optional discard file which will be created by SQL*Loader to store records that are neither rejected, nor inserted, into a table. If a filename is not specified, the name of the control file is used by default with the default extension .DSC. This file has the same format as the input datafile. So it can be loaded by the same control file after appropriate updates or corrections are made.
A discard file filename specified on the command line becomes the discard file associated with the first INFILE statement in the control file. If the discard file filename was also specified in the control file, the command-line value overrides it.
DISCARDMAX
| Discards to allow
|
|
DISCARDMAX specifies the number of discard records that will terminate the load. The default value is all discards are allowed. To stop on the first discarded record, specify one (1).
ERRORS specifies the number of insert errors that will terminate the load. The default is 50. To stop on the first error, specify one (1). To specify that all errors be allowed, use a very high number.
Keyword
| Identifies
|
|
FILE
| File to Load Into
|
|
FILE specifies the database file to allocate extents from. It is used only for parallel loads. By varying the value of the FILE parameter for different SQL*Loader processes, data can be loaded onto a system with minimal disk contention. For more information, see "Parallel Data Loading" .
LOAD specifies the maximum number of logical records to load (after skipping the specified number of records). By default all records are loaded. No error occurs if fewer than the maximum number of records are found.
LOG specifies the log file which SQL*Loader will create to store logging information about the loading process. If a filename is not specified, the name of the control file is used by default with the default extension of .LOG.
PARFILE specifies the name of a file that contains commonly-used command-line parameters. For example, the command line could read:
SQLLDR PARFILE=example.par
and the parameter file could have the following contents:
userid=scott/tiger
control=example.ctl
errors=9999
log=example.log
Note: Although it is not usually important, on some systems it may be necessary to have no spaces around the equal sign ("=") in the parameter specifications.
PARALLEL specifies whether direct loads can operate in multiple concurrent sessions to load data into the same table. For more information on PARALLEL loads, see "Parallel Data Loading" .
Keyword
| Identifies
|
|
ROWS
| Rows per commit
|
|
Conventional path loads only: ROWS specifies the number of rows in the bind array. The default is 64. (The bind array is discussed .)
Direct path, loads only: ROWS identifies the number of rows you want to read from the data file before a data save. The default is to save data once at the end of the load. For more information, see "Data Saves" .
Because the direct load is optimized for performance, it uses buffers that are the same size and format as the system's I/O blocks. Only full buffers are written to the database, so the value of ROWS is approximate.
When SQL*Loader begins, a header message like this appears on the screen and is placed in the log file:
SQL*Loader: Production on Wed Feb 24 15:07:23...
Copyright (c) Oracle Corporation...
As SQL*Loader executes, you also see feedback messages on the screen, like this:
Commit point reached - logical record count 20
SQL*Loader may also display data error messages like these:
Record 4: Rejected - Error on table EMP
ORA-00001: unique constraint <name> violated
You can suppress these messages by specifying SILENT with an argument. For example, you can suppress the header and feedback messages that normally appear on the screen with the following command-line argument:
SILENT=(HEADER, FEEDBACK)
Use the appropriate keyword to suppress:
HEADER
| Suppresses the SQL*Loader header messages that normally appear on the screen. Header messages still appear in the log file.
|
FEEDBACK
| Suppresses the "commit point reached" feedback messages that normally appear on the screen.
|
ERRORS
| Suppresses the data error messages in the log file that occur when a record generates an Oracle error that causes it to be written to the bad file. A count of rejected records still appears.
|
DISCARDS
| Suppresses the messages in the log file for each record written to the discard file.
|
ALL
| All of the above.
|
Keyword
| Identifies
|
|
SKIP
| Records to skip
|
|
SKIP specifies the number of logical records from the beginning of the file that should not be loaded. By default, no records are skipped.
This parameter continues loads that have been interrupted for some reason. It is used for all conventional loads, for single-table direct loads, and for multiple-table direct loads when the same number of records were loaded into each table. It is not used for multiple table direct loads when a different number of records were loaded into each table. See "Continuing Multiple Table Direct Loads" for more information.
USERID is used to provide your Oracle username/password. If omitted, you are prompted for it. If just a slash is used, USERID defaults to your operating system logon. A SQL*Net database specification string can be used for a conventional path load into a remote database. For more information on SQL*Net, see your SQL*Net documentation.