开发者

Oracle: Can IMP/EXP go to stdin/stdout?

I'm scripting some data transfer routines and incorporating exp and imp into the workflow. Both of these have a FILE= parameter to specify the data file.

Is there a way to specify stdin and stdout? I would love to do something like this:

exp ... | ssh foo imp ...

Right now I'm halfway tempted to work around this with mkfifo, but th开发者_运维知识库at seems a bit on the clunky side.


Not quite stdout/stdin but it is possible to export to and import from unix pipes. Could this technique fit into your workflow? Find out more.

Incidentally, Oracle's Data Pump does not work with unix pipes.


You can use node files (man mknod) as a buffer file instead of a pipe (|).

Example:
On the destination host (dhost) were the dump should be created, execute:

ssh shost "cat /ORACLE_BACKUP_PATH/NAME_OF_THE_NODE_FILE" > FILE_NAME_ON_THE_DESTINATION_HOST

On the source host (shost) from were the backup should be created, execute:

expdp system/..... full=y directory=ORACLE_BACKUP_PATH DUMPFILE=NAME_OF_THE_NODE_FILE

Good Luck, Mark

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜