1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| #!/bin/ksh -p
#===========================================================*===========
# Suppression_Table.ksh
#===========================================================*=============
export FIC_SQL=${DLK_HOME_OT}/sql.Suppression_Table.sql
export FIC_LOG=${DLK_DATA_OT}/trc/$(date "+%Y%m%d.%H%M%S").Suppression_Table.log
#=====================================================================
echo "`date` : Debut suppression " >> ${FIC_LOG}
# execution du script de suppression:
sqlplus -s ${DK_USER}/${DK_PWD}@${DK_ALIAS} >> ${FIC_LOG}
@${FIC_SQL}
ret=$?
if ${ret} -ne 0
then
{
echo "`date` : Erreur dans le traitement de suppression, code retour=${ret}" >> ${FIC_LOG}
}
fi
echo "`date` : Fin ret=${ret}" >> ${FIC_LOG}
exit ${ret} |
Partager