Home » Infrastructure » Unix » How to Create Oracle Directory for remote location
icon5.gif  How to Create Oracle Directory for remote location [message #183704] Sat, 22 July 2006 06:11 Go to next message
junaidsystems
Messages: 30
Registered: June 2006
Member
Can an oracle directory be created for remote location other the the database server??? i.e on middle tier(App server).
I want to read file in external table 'data.csv' which is on remote location(App server directory).

SQL> create or replace directory foo_dir as '/tmp';

CREATE OR REPLACE PROCEDURE test AS
BEGIN

EXECUTE IMMEDIATE 'create table ext_tab
(
first_name varchar2(30),
last_name varchar2(30),
home_phone varchar2(12))

organization EXTERNAL
(type oracle_loader
default directory EXT_DIR
access parameters
( records delimited by newline
badfile ''data_invalid.bad''
logfile ''log_data.log''
fields terminated by '',''
OPTIONALLY ENCLOSED BY ''"''
missing field values are null
)
Location (''data.csv'')
)
reject limit unlimited';
END;

where 'data.csv' is on remote location.
what should I add before '/tmp'???

Thanks in advance.

[Updated on: Sat, 22 July 2006 07:28]

Report message to a moderator

Re: How to Create Oracle Directory for remote location [message #183707 is a reply to message #183704] Sat, 22 July 2006 07:20 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Sure, you can NFS mount the remote directory and give oracle the appropriate permissions.
Re: How to Create Oracle Directory for remote location [message #183798 is a reply to message #183704] Sun, 23 July 2006 22:59 Go to previous messageGo to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
hi!
ordinary mounting the directory, like

mount /host/shared/direc /tmp
Re: How to Create Oracle Directory for remote location [message #250736 is a reply to message #183707] Wed, 11 July 2007 02:08 Go to previous message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
Reported Message:

Reported By: gowthamsen
On: Wed, 11 July 2007 09:04

"Hi, Could you please explain the steps, in order to access the files in remote machine thorougth external table. Here you have explained NFS mount. Could you please explain, how to do that. Thank you, Regards, Gowtham Sen."
Previous Topic: Unix and SQLPlus shell scripts
Next Topic: K shell commands
Goto Forum:
  


Current Time: Thu Dec 08 18:11:43 CST 2016

Total time taken to generate the page: 0.04716 seconds