Home » RDBMS Server » Server Utilities » UTL_FILE question part 2
UTL_FILE question part 2 [message #309792] Fri, 28 March 2008 18:25 Go to next message
kowalsky
Messages: 37
Registered: May 2003
Member
Hi all,
for whoever still has patience on this subject ...

My definitive question relative to the use of UTL_FILE is as follows:

My task is to upload data from some text files on a Windows box on a network into a table in a 8.1.7 Oracle database running on a Solaris machine; very critical info - one of the fields to be stored in the table is the timestamp of the text file itself.

Just a few more details: when I use sqlldr on the Windows box I have no problem loading the data but I haven't found a way to get the file's timestamp. On the Windows box I have an Oracle client installed (I don't know the version, nevertheless the load is working).

Now, to try and get the timestamp I need access to the file system; I saw UTL_FILE has the necessary functions to get to that, however, UTL_FILE is used in a PL/SQL code that's ON THE SERVER - is there any chance I could read files in a network from that unix machine?

As far as I can understand, any kind of third party soft I would use that is able to create that pl/sql proc will create it on the server (it's adb object) and to me, that means it is going to run locally on the server.

Can anybody tell me if there's any solution to this? Is there a way to see files on a Windows box in a network from a unix box that i can see from that windows box thru an ODBC connection for instance?

Thanks a bunch,
kowalsky
Re: UTL_FILE question part 2 [message #309794 is a reply to message #309792] Fri, 28 March 2008 18:48 Go to previous messageGo to next message
BlackSwan
Messages: 25042
Registered: January 2009
Location: SoCal
Senior Member
> Is there a way to see files on a Windows box in a network from a unix box
The SAMBA utilty running on *NIX can mount Windoze shares & present the files as being local to the *NIX system.
Alternatively you could run NFS software under Windoze to mount a *NIX filesystem.

>that i can see from that windows box thru an ODBC connection for instance?
I do not think so, but others may have a better solution.
Part of your challenge is that V8.1.7, IIRC, has not been supported this century.

I suggest that the " timestamp of the text file itself" could be updated after the rest of the data has been loaded.

FWIW - This would be trivial to do with a small & simple PERL program running on the Windows client; including the timestamp during initial data load.
from file to table [message #309795 is a reply to message #309792] Fri, 28 March 2008 19:11 Go to previous messageGo to next message
kowalsky
Messages: 37
Registered: May 2003
Member
Hi all,
I need to load the contents of some text files on a windows network share into a table in an Oracle database running on a Solaris box. One of the fields I need to add to this table is the file's timestamp.

I do not see the windows box from the unix box.

Is it possible to use UTL_FILE still (because I don't know any other way to read the file's time stamp other than using UTL_FILE.FGETATTR()) in a client-side pl/sql proc? Please give me some pointers on how to do this, if this would be a solution,
Thanks,
kowalsky
Re: from file to table [message #309798 is a reply to message #309795] Fri, 28 March 2008 19:58 Go to previous message
BlackSwan
Messages: 25042
Registered: January 2009
Location: SoCal
Senior Member
This is NOT an expert level question & do NOT cross-multipost!
Previous Topic: Moving tables between schemas using command line
Next Topic: SQL loader -- just a utility, BUT so COMPLICATED.
Goto Forum:
  


Current Time: Tue Dec 06 16:15:40 CST 2016

Total time taken to generate the page: 0.08693 seconds