I have this portion of the script but is not working. It is supposed to send an email because the log has a message that is not within this message that can be ignored:
• EXP-00007: dictionary shows no columns for AAIS.TMP*
• EXP-00007: dictionary shows no columns for AAIS.LIJPKGS_NOFAC
• EXP-00007: dictionary shows no columns for AAIS.EDTTNLIJPKGS
• EXP-00007: dictionary shows no columns for AAIS.DUP_PKGMEQ_TN1
The email must be sent if found one of this messages:
ORA-|rejected|Killed|Server out
EXP-00007 for other tables that are not one of the above
if [[ $(egrep -i -c "ORA-|rejected|Killed|Server out" "$log" -gt 0) || $(egrep -i -c "EXP-00007: dictionary shows no columns for" "$log" -eq 0) && $(egrep -i -c "AAIS.TMP|AAIS.LIJPKGS_NOFAC|AAIS.EDTTNLIJPKGS|DUP_PKGMEQ_TN1" "$log" -eq 0) ]]; then mailx -s "Full Structure export of Aais production with error $log" mail@mail.com
Our community of experts have been thoroughly vetted for their expertise and industry experience.