how i can read text file located on a different server then that of my database

i need to access and read some text file located on a server different from that where my database is located. i need to read the data from these files to load them in table in my database. for some reason i cannot setup the procedure  that i have built to read the files from the other server. but when i use a test path located on the database machine, i can read a test file.
in the proceudre  i am using ths syntax

-- grant permission to frost_addons
dbms_java.grant_permission('FROST_ADDONS','','ip address:port no ','connect, listen,accept,resolve');

-- get file quantity

select recon_GetFileqty(v_path2) into v_file_qty from dual;
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


For UTL_FILE's procedures to access server directories the directories to
be accessed must be specified in the init.ora file, for example :


Quotes and a trailing \ are not necessary.

1) Long filenames or directory names with mixed case

For this to work the directory specified for use in the UTL_FILE procedures
must exactly match (including case) that specified in UTL_FILE_DIR. Although
the UTL_FILE_DIR init.ora parameter does not have to exactly match the actual
directories case.

e.g. UTL_FILE_DIR=E:\LogDirectory  

2) Directories with space characters

For this to work the directory must be delimited by double quotes in the
init.ora parameter file.


3) Making multiple directories available

To specify multiple directories have a separate UTL_FILE_DIR line for each
directory, but make sure these are on consecutive lines otherwise only the
last directory will be accessible. Alternatively separate each directory
with a space on a single UTL_FILE_DIR line.

Directory Permissions

Directories on FAT partitions

FAT does not support file or directory permissions.

Directories on NTFS partitions

When an oracle instance is created the services that support it are setup
to Log On As the SYSTEM (or operating system) account. For UTL_FILE's
procedures to access directories that do not have access granted to
everyone they must have "Change" privileges granted to the SYSTEM account.
If the OracleServiceXXXX service has been altered to log on as another
account, it is this account that must be given access to the directories.

Accessing Network Directories

Netware Networked Directories

For this to work ensure that the account that started the Oracle instance
has a mapped network drive connected using a fully qualified username/password
with the same drive letter and path as is specified by UTL_FILE_DIR.

NT Networked Directories

When an oracle instance is created the services that support it are setup
to "Log On As" the SYSTEM (or operating system) account, this account has
very few privileges and no access to NT Domains. To access another NT machine
the OracleServiceXXXX must be setup to logon to the appropriate NT Domain as
a user who has access to the required location for UTL_FILE.

To change the default logon for the Oracle services, go to :

  -> Control Panel
     -> Services
        -> OracleServiceXXXX (where XXXX is the instance name)
           -> Startup
              -> Log On As

Choose the "This Account" radio button, then complete the appropriate
domain login information. Repeat this procedure for the TNS Listener :

  -> Control Panel
     -> Services
        -> OracleXXXXTNSListener (where XXXX is the Oracle Home Name)
           -> Startup
              -> Log On As

If the listener is not configured to start as the same user as the Oracle
Service user will fail to connect with "ORA-12500 TNS:listener failed to start
a dedicated server process". Once the services have been setup as a user with
the appropriate privileges the are two options for setting UTL_FILE_DIR :

a. Mapped Drive : To use a mapped drive, the user that the service starts as
must have setup a drive to match UTL_FILE_DIR and be logged onto the server
when UTL_FILE is in use.

b. Universal Naming Convention : UNC is preferable to Mapped Drives because
it does not require anyone to be logged on and UTL_FILE_DIR should be set to
a name in the form :

  \\\<machine name>\<share name>\<path>


  "\\<machine name>\<share name>\<path>"
marcia1Author Commented:
Dear schwertner:

is it possible to set e.g. UTL_FILE_DIR="<server name> or <ip address>\LOG DIR"?

as my files are located on unix platform on different machine then that where is residing my db instance.
This is a Unix related question.
I am sure that the answer is "yes",
but you have to ask how on the unix thread.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.