标签:
exporacle备份管道 |
分类: 技术学习 |
[oracle11g@csdba1850 test]$ exp system/oracle owner=scott compress=n file=scott_nocom.dmp
Export: Release 11.1.0.6.0 - Production on Thu Nov 8 16:54:23 2007
Copyright (c) 1982,
2007, Oracle.
......
[oracle11g@csdba1850 test]$ ls -lthc
total 44K
-rw-r--r--
[oracle11g@csdba1850
test]$ mknod
/home/oracle11g/test/exp_pipe p
[oracle11g@csdba1850 test]$ cat exp_pipe.sh
nohup compress < /home/oracle11g/test/exp_pipe > /home/oracle11g/test/exp_scott.dmp.Z &
exp system/oracle owner=scott file=/home/oracle11g/test/exp_pipe log=exp_pipe.log
-- 这个shell脚本的作用就主要是让exp出来的信息,进入管道exp_pipe,然后操作系统接受管道出来的信息,将其压缩,于是就得到了经过压缩后的文件。
[oracle11g@csdba1850 test]$ sh exp_pipe.sh > /home/oracle11g/test/exp_scott.log 2>&1
[oracle11g@csdba1850 test]$ ls -lthc
total 88K
prw-r--r--
-rw-r--r--
-rw-r--r--
-rw-r--r--
-rw-r--r--
-rw-r--r--
[oracle11g@csdba1850
test]$ mknod imp_pipe p
[oracle11g@csdba1850 test]$ cat imp_pipe.sh
nohup uncompress -c /home/oracle11g/test/exp_scott.dmp.Z > /home/oracle11g/test/imp_pipe &
imp system/oracle file=/home/oracle11g/test/imp_pipe fromuser=scott touser=enix log=imp_pipe.log
-- 把操作系统解压出来的信息输入到管道中,imp接受管道传来的信息,将其导入至数据库
[oracle11g@csdba1850 test]$ sh imp_pipe.sh > /home/oracle11g/test/imp_scott.log 2>&1

加载中…