Case 6: Loading Using the Direct Path Load Method - Oracle 8i

This case study loads the EMP table using the direct path load method and concurrently builds all indexes. It illustrates the following functions:

  • Use of the direct path load method to load and index data.
  • How to specify the indexes for which the data is presorted.
  • Loading all-blank numeric fields as null.
  • The NULLIF clause.

In this example, field positions and datatypes are specified explicitly.

Control File

Notes:

  1. The SORTED INDEXES statement identifies indexes:presorting data:case study the indexes on which the data is sorted. This statement indicates that the datafile is sorted on the columns in the EMPIX index. It allows SQL*Loader to optimize index creation by eliminating the sort phase for this data when using the direct path load method.
  2. The NULLIF...BLANKS clause specifies that the column should be loaded as NULL if the field in the datafile consists of all blanks.

Invoking SQL*Loader
Before invoking SQL*Loader, run the script ULCASE6.SQL as SCOTT/TIGER.

Then invoke SQL*Loader at the command line: sqlldr scott/tiger ulcase6.ctl direct=true log=ulcase6.log

Additional Information: The command sqlldr is a UNIX-specific invocation. To invoke SQL*Loader on your operating system, see your Oracle operating system-specific documentation.

Log File
The following is a portion of the log file:

The following index(es) on table EMP were processed:
index SCOTT.EMPIX loaded successfully with 7 keys

Table EMP:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 8i Topics