Previous | Table of Contents | Next
Page
224
values for these fields if left empty. The dialog box has a number of boxes that require
information. The following is a description of the boxes:
FIG. 10.1
The SQL*LOADER icon.

FIG. 10.2
The SQL*LOADER dialog box.

Page
225
- UsernameThis field is for the name of the user account that has access to the
Oracle tables. This user name id must have insert authority to add records and delete
authority to use the replace option.
- PasswordThis field is for the password for the value of the user account password.
- DatabaseThis value identifies the database that contains the Oracle tables. This
value will also contain the location of the database when it's remote. This field is often
called the connect string or host string.
- Control FileThis field is for the name and location of the file that holds the
loading instructions. The default file extension is
.CTL.
- DataThis is an optional field that contains the name of the file that holds the load
data. This file name may also be contained in the control file.
- LogThis is an optional field that contains the name of the file that will hold the
results of the loading process. This file will defaults to the name of the control file with a
file extension of .LOG when no value is supplied.
- BadThis is an optional field that contains the name of the file that will contain
any records that can't be loaded into the tables. This file will default to the name of
the control file with a file extension of .BAD when no value is supplied.
- DiscardThis is an optional field that contains the name of the file that will hold
any records discarded by Oracle during the loading procedure. Discarded records are
those that don't meet the load criteria specified in the condition logic in the load file. This
file will default to the name of the control file with a file extension of
.DSC when no value is supplied.
The SQL*LOADER dialog box also has a number of buttons. The
Browse button adjacent to the Control File and
Data fields will open a file-search dialog box you can use to find the
desired file you want. When the file is found, the search dialog box will return the full file address
to the field.
The Defaults button will populate the optional files with default file names that match the
name of the control file. The Cancel button closes the dialog box without any action occurring.
The Help button displays the Oracle SQL*LOADER help. It is part of the Database Tools
Users' Guide facility.
The Load button starts the execution of the load program. However, before you can start
the load program, the Loader Options must be reviewed and set. This is accomplished by
clicking the Advanced button, which brings up the Advanced SQL*LOADER Options dialog box,
as shown in Figure 10.3.
Following are the fields in the Advanced SQL*LOADER Options dialog box. The dialog
box contains a number of values. Descriptions of these values are as follows:
- Records to SkipThis field tells Oracle how many records to skip before
adding records to the tables. This is a useful tool when you've performed only a partial
table load. For instance, assume you're loading 500,000 rows into a table. The load program
is terminated at 150,000 rows because of table space constraints.
Page
226
After the constraints are removed, you can begin loading data beginning at
record 150,001. This will save you the time that was spent on the initial loading procedure.
The default is 0. The load procedure will load all rows into the table.
FIG. 10.3
The Advanced
SQL*LOADER Options,BR>
dialog box.

NOTE |
Table constraints were discussed in Chapter 6, "Defining the Database Objects."n
|
- Records to LoadThis field tells Oracle to terminate the loading procedure when
the value in this field is reached. It's often useful to load several records with the
first execution of the procedure. This allows you the opportunity to check the table to be
sure the loading procedure worked correctly without waiting for the full load to occur.
You can also use this option to stop the loading at a predefined pointfor instance,
if you're concerned with space in your table. This option allows you to terminate the load
at a given point, check the table space, and continue loading. The default setting will
allow the procedure to load 429,496,729 records to be loaded before terminating.
- Rows per CommitThis field tells Oracle when to commit the load records.
The default setting is 64. This means Oracle will commit the inserted records at the end
of each set of 64 inserted records.
- Maximum ErrorsThis field tells Oracle when to terminate the loading
procedure based on errors. The default is 50. This means Oracle will terminate the procedure
when the 50th error has been encountered.
- Maximum DiscardsThis field tells Oracle to terminate the loading procedure
when the specified number of discarded records is reached. The default value is
429,496,729
Page
227
records before terminating. Consider setting this at a low value. It's better to find
out sooner than later in the long loading process that your condition logic is in error and
is discarding good records early.
- Maximum Bind ArrayThis field is used to specify the maximum size of the
bind array.
When you've reviewed these settings, press OK. This will return you to the
SQL*LOADER dialog box. Press Load to start the loading procedure. When the load program is initiated,
this brings up the SQL*LOADER Status dialog box. This screen will display error, commit, or
status messages.
The loading is complete when no more messages are displayed. Press Close to close the
dialog box. Figure 10.4 shows the Status dialog box.
FIG. 10.4
The SQL*LOADER Status screen.

The previous section discussed five files used in the loading procedure:
control, data, log, bad, and discard.
The control file holds the loading instructions and will be discussed at length in the next
section. The data file holds the data that will be loaded into the Oracle tables. It will be
discussed under "Defining Control Files in the next section." Next you learn about the remaining
three files: log, bad, and discard.
Previous | Table of Contents | Next
|