Translation

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

giovedì, agosto 04, 2011

Export, gzip and pipe

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

dove

$cat export_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

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

exp $ADMIN/$PASSWORD OWNER=${USERNAME} FILE=${WORKINGDIR}/${USERNAME}.pipe LOG=${WORKINGDIR}/${USERNAME}_dwprt_export.log

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

$cat dwpr_test_01.list
PR_AI_INTEG
PR_AI_PRE
PR_DM_PRE
PR_EDW_COLL
PR_EDW_PRE
PR_LAY_PRE
PR_SRVDIFF_COLL
PR_SRVDIFF_PRE

0 commenti: