Exp/imp uses pipelines to directly export and import
Exp/imp uses pipelines to directly export and import files without landing.
Mknod / backup/dmp/pipe p
Exp\'/ as sysdba\ 'file=/backup/dmp/pipe log=expscott.log owner=scott rows=y indexes=n compress=n direct=n recordlength=65536 buffer=52488000 feedback=100000
Imp\'/ as sysdba\ 'file=/backup/dmp/pipe log=impscott.log fromuser=scott touser=scott1 buffer=52488000
Rm / backup/dmp/pipe
View pipe content
Dd if=/backup/dmp/expscott of=/dev/null
You can observe that after executing the exp command, there is no output and the pipe has no content; after the imp command is executed in another window, exp starts to output
Export data compression through pipeline, then decompress it and import it
1. Establish a pipeline through mknod-p
two。 No files are generated before exporting data to the established pipeline through exp and gzip and compressing the execution of gzip
3. Delete the established pipe after the export completes successfully
Mknod / backup/dmp/expscott p
Exp\'/ as sysdba\ 'file=/backup/dmp/expscott direct=n recordlength=65536 buffer=52488000 feedback=100000 log=expscott.log owner=scott &
Gzip
< /backup/dmp/expscott >/ backup/dmp/expscott.dmp.gz
Rm-rf / backup/dmp/expscott
Import the resulting file through the pipe
1. Establish a pipeline
two。 Import the resulting compressed file
In this way, the import is successful, and then the pipe is deleted
3. Delete Pip
Mknod / backup/dmp/impscott p
Imp\'/ as sysdba\ 'file=/backup/dmp/impscott log=impscott1.log fromuser=scott touser=scott1 &
Gunzip
< /backup/dmp/expscott.dmp.gz >/ backup/dmp/impscott
Rm / backup/dmp/impscott