Translation

The oldest posts, are written in Italian. If you are interested and you want read the post in English, please use Google Translator. You can find it on the right side. If the translation is wrong, please email me: I'll try to translate for you.

venerdì, agosto 05, 2011

Import gzip and pipe

Dopo aver fatto l'export, si esegue l'import:

$for i in $(cat dwpr_test_01.list); do
>nohup ./import_dwpr_test.sh $i 2>&1 > $i.nohup &
>done

$cat import_dwpr_test.sh
WORKINGDIR=/dwhtest01a/export.20110804
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
ORACLE_BASE=/u1/app/oracle
ORACLE_SID=dwprt
ORACLE_TERM=vt100
ORA_NLS33=/u1/app/oracle/product/9.2.0/ocommon/nls/admin/data
ORACLE_HOME=/u1/app/oracle/product/9.2.0
ADMIN=system
PASSWORD=password
USERNAME=$1

rm ${WORKINGDIR}/${USERNAME}.pipe
mknod ${WORKINGDIR}/${USERNAME}.pipe p

gunzip <  ${WORKINGDIR}/${USERNAME}.dmp.gz > ${WORKINGDIR}/${USERNAME}.pipe &

imp $ADMIN/$PASSWORD FROMUSER=${USERNAME} TOUSER=NEW_${USERNAME} FILE=${WORKINGDIR}/${USERNAME}.pipe LOG=${WORKINGDIR}/${USERNAME}_dwprt_import.log

rm ${WORKINGDIR}/${USERNAME}.pipe

Nessun commento: