tags:

views:

77

answers:

1
create table ext_table_dat (
    i   Number,
)
organization external (
    type              oracle_loader
    default directory ext_dir
    access parameters (
        records delimited  by newline
        fields  terminated by ','
        missing field values are null
    )
    location ('$AI_SERIAL/file.dat')
)
reject limit unlimited;

Without creating directory in oracle. Can I use the above code to create an external table. Because my file.dat is located in another server, its path is $AI_SERIAL/file.dat.

+1  A: 

You can create an external table with any file that is accessible to the account that operates the oracle process.

  • On windows boxes, Oracle is by default setup to be executed from a LOCAL account, i-e it won't be able to access remote directory directly (you'll have to switch to another account).
  • On *nix boxes the owner of the oracle procees needs to be able to see the remote directories.
Vincent Malgrat