Re: copy file to a remote server

From: Vishal Gupta <vishal_at_vishalgupta.com>
Date: Sat, 2 Oct 2010 19:17:33 +0100
Message-ID: <62E8F315-F036-4EE4-8DF0-8B3B2F0F2764_at_vishalgupta.com>



Trouble with DBMS_FILE_TRANSFER is if your source file size is not a multiple of DB block size, then oracle does not like the file and starts complaining.

Regards,
Vishal

On 1 Oct 2010, at 15:11, "Darren Darnell" <darren_at_thedarnells.org> wrote:

> Try using DBMS_FILE_TRANSFER.
>
> http://www.oracle-base.com/articles/10g/FileTransfer10g.php
>
> Darren
>
> On Fri, Oct 1, 2010 at 8:40 AM, Tim Hall <tim_at_oracle-base.com> wrote:
> Hi.
>
> On Linux, Oracle doesn't care what the mount point is provided it has permission to write to it, so UTL_FILE will work fine on any available mount point.
>
> Back in the WinNT days UTL file also working on mapped drives, but with the move to Windows 2000 it stopped. I raised a TAR with Oracle support at the time and was told this was now a "feature" brought about my a change Microsoft had made in Windows 2000. I don't work on Windows much if I can help it, so I don't know if it is still a "feature", but judging by what you have said it still is. If this is the case you will never be able to access a mapped drive directly using UTL_FILE.
>
> Regarding "http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php", there are a few things to mention.
>
> 1) It is potentially very dangerous because it gives access to any OS command/file that the Oracle software owner has access to. So don't use the wildcard permissions I've used in the article.
>
> 2) The Oracle JVM has a limited scope to its permissions, in a similar way to UTL_FILE. The fact someone has mentioned they don't have a problem on Windows 2003 with it means it hasn't fallen foul of "mapped drives feature" like UTL_FILE has, but it may not solve every problem you enocunter.
>
> 3) You could also consider using a specific file-handling API, like "http://www.oracle-base.com/articles/8i/FileHandlingFromPLSQL.php". This may suffer the same fate as UTL_FILE on Windows since the JVM would not be responsible for the file movement, rather than the shell, so its scoping may come into play.
>
> Cheers
>
> Tim...
>
> On Thu, Sep 30, 2010 at 10:21 PM, Eugene Pipko <epipko_at_unionbay.com> wrote:
> They are not directories.
>
> I set utl_file_dir = * on the source box.
>
> I mapped the drive to the destination box.
>
> When I run UTL_FILE.FCOPY (vSource_dir,vSource_file,vDest_dir,vDest_file); I get invalid_operation.
>
>
>
> From: Goulet, Richard [mailto:Richard.Goulet_at_parexel.com]
> Sent: Thursday, September 30, 2010 12:12 PM
> To: Eugene Pipko; oracle-l_at_freelists.org
> Subject: RE: copy file to a remote server
>
>
>
> What is your location and dest_dir parameters set to? Are they directory names located in all_directories??
>
>
>
> Dick Goulet
> Senior Oracle DBA/NA Team Lead
> PAREXEL International
>
>
>
>
>
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Eugene Pipko
> Sent: Thursday, September 30, 2010 3:04 PM
> To: oracle-l_at_freelists.org
> Subject: copy file to a remote server
>
> Hi all,
>
> I am trying to move a .txt file generated by the d/b procedure (9i) to a remote box. Both servers are windows machines.
>
> Source is 2003 and dest is 2008.
>
> I mapped the drive on source and using utl_file.fcopy, but receiving an error.
>
> My question is: is it even possible to move a file via utl_file package between two servers?
>
>
>
> Thanks,
>
> Eugene
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Oct 02 2010 - 13:17:33 CDT

Original text of this message