#!/bin/ksh
############################################################################
#  On destination server edit /etc/inetd.conf and uncomment 'shell' line.
#  Also place servername and username in $HOME/.rhosts file.
#  Restart inetd if changed.  'inetd -c'.
#  Change DB and/or servername 
#  as root 'mknod <pipename> p'  then chown
############################################################################ 
#initialize variables
############################################################################ 
DB=QTDB 
import_file=/home/joelp/pipe/i${DB}pipe
log_file=/tmp/imp${DB}full.log

. /usr/local/bin/oraenvnew ${DB}
today=`date '+%y/%m/%d %H:%M:%S'` 

. $HOME/scripts/getpassword ${DB} SYSTEM
passwd=${password}

echo "KEYWORDGREP ${DB} Began at:  ${today}" 
echo "import_file = ${import_file}"
echo "log_file = ${log_file}"

nohup imp system/${passwd} file=${import_file} log=${log_file} \
full=yes buffer=10240000 rows=yes grants=y indexes=y commit=y ignore=y constraints=y & 

today=`date '+%y/%m/%d %H:%M:%S'` 
echo "KEYWORDGREP ${DB} Ended at:  ${today}"
