Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: File transfer through the database

Re: File transfer through the database

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 24 Dec 2005 19:31:22 -0800
Message-ID: <1135481482.891335.81350@g49g2000cwa.googlegroups.com>

Eric de Redelijkheid wrote:
> Hello,
>
> Oracle 9iR2 Enterprise edition on Tru64 5.1B
>
> We currently have a database application that creates RTF-documents on
> an UNIX-directory. For Windows-clients to read those documents, we have
> to transfer these files, either by ftp or, as I currently do, by HTTP
> (Internet Explorer starts with MS-WORD; the document is loaded). We do
> this in a single script with the document name as parameter.
>
> The HTTP-server is a different machine, wich has to be retired from
> service, so I would like a different option.
>
> I am thinking of two possibilities:
>
> 1. load the file line by line in a table with UTL_FILE, spool those
> lines to a RTF-file on a Windows directory and load this file in Word.
> 2. insert a pointer to this file in a BFILE column in a table,
> dowload this file to Windows and start Word.
>
> The first seems straightforward, but only works for textfiles and I
> don't get the entire file at once. I'd rather have something more generic.
>
> I don't know how to get about the second option. I can create the table.
> When using TOAD, I can doubleclick on a field in that BFILE column and a
> Window appears asking me if I want to run the associated program. The
> document is then loaded in MS Word.
>
> Since normal users do not have TOAD, I need another way to run a single
> script with only the document name as parameter, which does the trick
> for me. I am not a programmer, but a DBA. What do I use best? PL/SQL,
> Java, Forms? Has anyone got example-code?
>
> I do not have the possibility to install any additional software on the
> clients. They normally access the database using Forms 6.

You can use Java to *push* the file via ftp from within the database to another machine, however; I personally don't like this approach. Too many unknowns.

I like the simple approach of writing the file to the local database server directory (Much secure) and storing the filename and path in a table. This path would be relative to the database server ftp directory. Then get the desired filename from the table and *pull* the file via ftp (Binary or Ascii) to any client (On demand or batch). You can even store the default username, password, port etc for the ftp session in the database.

Regards
/Rauf Received on Sat Dec 24 2005 - 21:31:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US