egrep 이 shell 을 수동으로 돌릴때는 되는데 자동은 안 됩니다.
===============================================================================================
FName="/ETT/AutoShell/OutFile/내부조직실적Mart"`date +"%m월%d일-%H시%M분"`"데이타.jobout"
echo "SAMFILE_ID = SAMPROB.CUS.ETTB202" >> $FName
echo "TARGET_TABLE_NAME = TMIOR.기업연금_계상일별실적_임시" >> $FName
echo "SP_NAME = DM_ORGN_008~11" >> $FName
sqlldr tmior/$TMIOR_PWD control=/ETT/cts/Ctl/tmior.기업연금_계상일별실적_임시_replace.ctl data=/ETT/DATA01/SAMPROB.CUS.ETTB202 log=/LOADTEMP/msg/SAMPROB.CUS.ETTB202.log bad=/LOADTEMP/msg/SAMPROB.CUS.ETTB202.bad errors=1000000 silent=ALL
tail -30 /LOADTEMP/msg/SAMPROB.CUS.ETTB202.log|egrep -f terms >> $FName
===============================================================================================
오라클 SQL*Loader 의 log 를 뽑아낼려고 shell 을 만들었는데 이 shell 이 수동으로 돌리면 잘 됩니다.
===============================================================================================
<수동 결과 output>
SAMFILE_ID = SAMPROB.CUS.ETTB202
TARGET_TABLE_NAME = TMIOR.기업연금_계상일별실적_임시
SP_NAME = DM_ORGN_008~11
150749 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Total logical records skipped: 0
Total logical records read: 150749
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Thu Dec 11 09:18:38 2008
Run ended on Thu Dec 11 09:18:48 2008
===============================================================================================
그런데 crontab 에 등록하고 자동화로 묶으면 아래처럼 egrep 명령어가 들어간 행만 실행이 안 됩니다.
===============================================================================================
<자동 결과 output>
SAMFILE_ID = SAMPROB.CUS.ETTB202
TARGET_TABLE_NAME = TMIOR.기업연금_계상일별실적_임시
SP_NAME = DM_ORGN_008~11
===============================================================================================
이유가 뭘까요? 딱히 오류원인을 알 수 없으니 답답하네요.
검색
검색!
http://search.empas.com/search/oea/kldp/oe.html?q=cron+%ED%99%98%EA%B2%BD%EB%B3%80%EC%88%98&sdsn=&en=utf8
댓글 달기