Wednesday, August 19, 2009

Hi Speed copy Oracle data from one machine to another machine

[PREREQUITE]
SSH SETUP to connect without password
[TARGET MACHINE]
mknod /tmp/inpipe.dmp p
imp username/password file=inpipe.dmp &

[SOURCE MACHINE]
mknod /tmp/outpipe p
ssh -C user@target 'cat > /tmp/inpipe.dmp' < /tmp/outpipe &
exp username/password file=/tmp/outpipe

Thursday, August 6, 2009

use exp/imp to copy the data from one db to another

To export Table(s)
exp scott/tiger file=emp.dmp log=emp.log tables=emp rows=yes indexes=no
exp scott/tiger file=emp.dmp tables=(emp,dept)

To export whole schema
exp scott/tiger file=emp.dmp

To import
imp scott/tiger file=emp.dmp full=yes
imp scott/tiger file=emp.dmp fromuser=scott touser=scott tables=dept