When using Data Pump, there is no direct way to save the dump file on your local machine. This is how Data Pump is designed.
However, there is one possible way to achieve the desired. The workaround has two steps:
- Run
expdp
as usual, which creates a dump file on the server - Use the
ocp
tool to transfer the dump file from the database server to the local computer (and vice versa if you want).
The ocp
tool ocp
for "Oracle Copy" and is written exactly for copying dump files from the database server. It is available here: https://github.com/maxsatula/ocp/releases/download/v0.1/ocp-0.1.tar.gz This is the original distribution, so after downloading and unpacking, run ./configure && make
(I hope you do not have Windows on the client side, because I never tried to compile it)
This is a simple command line tool with simple syntax. For example, this command will pull out the file for you:
ocp <connection_string> DATA_PUMP_DIR:remote_file_name.dmp local_file_name.dmp
The tool uses a database connection and a minimum set of database privileges.
Update:
Finally, I was able to tweak the source code and create the ocp
tool for the 32-bit version of Windows:
https://github.com/maxsatula/ocp/releases/download/v0.1/ocp-0.1-win32.zip
Compiled / tested with 32-bit Instant Client 11.2.0.4 available here: http://www.oracle.com/technetwork/topics/winsoft-085727.html
instantclient-basiclite-nt-11.2.0.4.0.zip (20,258,449 bytes)
I believe that it will work with a full installation of Oracle Client (just watch for bits, there should be 32), but did not test itself.
Unfortunately, the windows ocp
build ocp
not have a fantastic progress indicator during file transfer. There were too many * nix-specific things in this code snippet, so I had to disable it.
In addition, since it uses the popt and zlib libraries, which are compiled as part of the GnuWin project and are only available in the 32-bit version, ocp
for Windows is also 32-bit. I hope that not having a 64-bit version is not critical for you.
Update 2:
A warning! . Always check the connection to the DEDICATED server when downloading files from the server, otherwise (for the SHARED server) the downloaded copy of the file will be damaged without error messages!