Creating the Database Directory and Uploading the File to the Database Server

Use the following procedure to create the IMPORT DIR database directory.

To create the IMPORT DIR database directory

  1. On the database server, create a database directory using the following command:

    SQL> CREATE OR REPLACE DIRECTORY IMPORT_DIR AS <DIR_PATH>';

    For example: CREATE OR REPLACE DIRECTORY IMPORT_DIR AS '/TMP';

    SQL> GRANT READ,WRITE ON DIRECTORY 'IMPORT_DIR' TO PUBLIC;
  2. Verify that you have read/write permission for the IMPORTDIR database directory.

  3. Upload the .txt file that contains the contact records to the folder on the database server that is mapped to the MPORT_DIR database directory (designated as '/TMP' in Step 1).

  4. Give the IMPORT_DIR (/TMP) read/write permission for the TBLO user (the database table owner).

  5. Give all the attached files read/write permission.

  6. Grant CREATE/DROP table privileges for the database table owner.