Transferring a text file from a windows PC to a Unix server [message #183479] |
Fri, 21 July 2006 02:31  |
tumediso
Messages: 3 Registered: April 2005
|
Junior Member |
|
|
Hi,
I am trying to write a pl/sql program that sends a file from a windows PC to a Unix server on the network. I have encountered an exception and am not able to figure out the problem. the exception is: Oracle: ORA-22285: non-existent directory or file.
Below is the code that I am using. It uses a user-defined package that also depends on the UTL_TCP, UTL_FILE, DBMS_LOB & STANDARD packages.
PROCEDURE Server_Connect IS
l_conn UTL_TCP.Connection;
BEGIN
Message('0');
l_conn := Stud.Upload_File.Login('168.167.8.23', '21', 'tumediso', 'p1fel0');
-- Message('1');
Stud.Upload_file.Binary(l_conn);
-- Message('2');
Stud.Upload_File.Put(l_conn, 'C:/Packages/', 'test.txt', '/its/tumediso/test_put.txt');
-- Message('3');
Stud.Upload_file.Logout(l_conn);
-- Message('4');
UTL_TCP.Close_All_Connections;
It actually fails at line:
Stud.Upload_File.Put(l_conn, 'C:/Packages/', 'test.txt', '/its/tumediso/test_put.txt');
Does anyone know where the prblem could be. All the specified files and directoty do exist on the two computers.
|
|
|
|
Re: Transferring a text file from a windows PC to a Unix server [message #183503 is a reply to message #183492] |
Fri, 21 July 2006 03:23   |
tumediso
Messages: 3 Registered: April 2005
|
Junior Member |
|
|
I intended /its/tumediso/test_put.txt to be the path to the target file on the Unix server. The local directory is the other one, C:/packages/.
Are you saying for it to work I have to use oracle directories on the target server?
And what about the syntax of the directory path to access the Unix server? Is it okay the way I have it?
Thanks again for your time.
|
|
|
|