06 agosto 2008

Oracle export and import by pipe

EXPORT pipe

#!/bin/ksh
rm -f export_pipe
mknod export_pipe p
chmod 666 export_pipe
nohup gzip -c < export_pipe > expdat.dmp.gz &
imp "\"/ as sysdba\"" file=export_pipe full=yes ignore=yes
log=exportTESTDB.log
rm -f export_pipe


IMPORT pipe
To import, I use gunzip and do the opposite!

mknod exp.pipe p
gunzip < expdat.dmp.gz > exp.pipe &
imp userid=system/manager file=exp.pipe full=y

No hay comentarios.: