External Tables

External tables are read-only tables whose data resides outside the database in an external operating system resident flat file but whose definition resides in the database. You can query the external table just as if it were a regular table. You specify the external table by adding the ORGANIZATION EXTERNAL clause to your CREATE TABLE command.

You need to develop the specifications for the external file using formats similar to that used in SQL Loader control files.

First, you need to create the directory objects in Oracle that refer to the operating system directories that contain the data sources that are the destination for bad records and the destination for log files:

CREATE OR REPLACE DIRECTORY datadir as 'd:\datadir' ...

Get Oracle 9i Fundamentals I Exam Cram™ 2 (Exam 1Z0-031) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.