Export

#!/bin/bash

$username=
$password=
$exportfile=
$exportlog=
$DBNAME=

mknod pipe p

cat pipe |gzip -c >$exportfile &
exp $username/$password@$DBNAME file=pipe DIRECT=Y CONSISTENT=Y LOG=$exportlog
sleep 5

rm pipe

 

Import

#!/bin/bash


$username=
$password=
$importfile=
$importlog=
$DBNAME=

mknod pipe p

gunzip  pipe &
imp $username/$password@$DBNAME file=pipe DESTROY=Y FULL=Y IGNORE=Y LOG=$importlog
sleep 5

rm pipe

 

en_USEnglish