tags:

views:

27

answers:

1

Is there any easy way to save BLOB as a binary file into client-side file system with using of only standard Oracle utilities (such as sqlplus or sqlldr for example)?

I've already looked onto UTL_FILE package, but actually I have two problems with it:

  1. I have doubts that it can work with client-side file system.
  2. I have no privilege to CREATE DIRECTORY in schema where BLOBs are saved and so that I can't work with UTL_FILE at all.

Also, I know that I can just write some homebred utility in any language (Java for example); connect to Oracle, select my BLOB and save it in binary format. But I'd look for some easier way before doing this.

+1  A: 

Would you really want a database writing a BLOB, for example winword.exe, to your local PC ? This is the sort of thing that is intentionally quite protected.

It is very client driven, so the best place to start is with whatever is running on your local machine. I'd go with a Java routine, or if you've got APEX running, a simple procedure that will push the BLOB out through the browser and let the browser prompt you for what to save it.

Gary
I don't want the database itself (server-side) writing a BLOB. I want some utility from Oracle client installation on my PC to connect oracle and save BLOB.For example `sqlldr` is able to upload local files as BLOBs into database but it is unable unfortunately to download these BLOBs back and save it as files.Browser is not an option in my case unfortunately, because I need a BLOB to be saved automatically (each time when it changed in DB) without any user effort.
Volodymyr Frolov
The key phrase in your comment is "automatically...when it changed in DB". No client program magically knows when data is changed. What happens if the client (PC/software) isn't up when the BLOB is changed ? This is a program that you will need to design and then write
Gary
In my case it is okay to overwrite file on client-side in cron each several ours. In case when BLOB is changed the file will be overwritten with new value.
Volodymyr Frolov