I'm transferring data from one base to another via database links (using INSERT INTO SELECT ...
).
I want to know if data transferred through the link is compressed or can be compressed to avoid too much network use. I have very little bandwidth, and I think that would help if it's not already done.
There's some de-duplication but no serious compression.
There is a UTL_COMPRESS function but it would be tricky to get that to decompress on the destination (maybe a trigger, or instead of view - but it is clunky).
EXPDP can use a database link (NETWORK_LINK) and, in 11g, compression but that does require the Advanced Compression option to be licensed.
Lastly there's conventional extract, zip, transfer, unzip, load
In 11gR2 you can use external tables with a preprocessor to unzip, so you could semi-automate that final option.
As @Gary says, not natively, but it's possible to get compression using an SSH tunnel, assuming you have command-line access anyway. The SSH man page notes that compression can slow things down on a fast network, but that trade-off may be worth it if you're severely bandwidth-constrained; and you may need to experiment with
CompressionLevel
inssh_config
to get the best results for your situation.For example, if your existing link is defined to connect to
remote_server
port1521
:You can create an SSH tunnel using a free local port, with something like:
And then you can have a DB link that points to the local side of the tunnel:
So you just change the host and port. If your existing link is using a
tnsnames
entry then you can just modify that instead, to point tolocalhost:1522
instead ofremote_server:1521
.Of course you have to make sure the SSH link is up whenever you use the DB link. If it's down you'll get an
ORA-12541: TNS:no listener
error, since nothing will be listening on your local port 1522.