Il file CRONTAB chiama le shell Statistiche_Aggreg.sh e StatisticheAggreg_fin.sh
E poi richiama il loro FTP corrispondente FTPStatisticheAggreg.sh che contiene la seguente istruzione:
---------------------------------------------
ftp -n << +
open 157.28.116.5 2121
u inbound Inbound
lcd /genesys/FLUSSI/out/STATISTICHE_AGGREG
put Statistiche_Aggreg-*.txt
bye
+
-----------------------------------------------------------
Il file Statistiche_Aggreg.sh a sua volta richiama uno script sql che esegue una select su una tabella.
Se questo script provo ad eseguirlo in TOAD mi torna corretamente un risultato. Quindi non è il file SQL che crea problemi.
Lo stesso fa la shell StatisticheAggreg_fin.sh.
Il file log del file FTPStatisticheAggreg.sh che mi ritorna il crontab riporta questo errore:
---------------------------------------------
/genesys/FLUSSI/out/STATISTICHE_AGGREG
: No such file or directory
Statistiche_Aggreg-*.txt
: No such file or directory
?Invalid command
---------------------------------------------
Sembrerebbe che non trova il file Statistiche_Aggreg-*.txt, oppure il percorso non è corretto.
E invece non solo il file esiste e il percorso è corretto ma non ha generato alcun errore.
Qualcuno sa dirmi quale potrebbe essere il problema??
Questa è la shell:
---------------------------------------------------------
#
# @(#)local.profile 1.4 93/09/15 SMI
#
#stty istrip
ORACLE_SID=OUTB
ORACLE_BASE=/u/app/oracle
ORACLE_HOME=/u/app/oracle/product/8.0.6.0.0
PATH=/usr/bin:/usr/ucb:/etc:$ORACLE_HOME/bin:.
export PATH
export ORACLE_SID ORACLE_BASE ORACLE_HOME
#
# imposto la data corrente
#
data=`date '+%Y%m%d'`
#
# eseguo la query che estrae gli esiti dalla tabella statistiche
#
sqlplus gcti/gcti@OUTB @/genesys/FLUSSI/script/STATISTICHE_AGGREG/ExportStatistiche_Aggreg.sql
#
# copio il risultato nello storico
#
cp /genesys/FLUSSI/out/STATISTICHE_AGGREG/Statistiche_Aggreg.tmp /genesys/FLUSSI/out/STATISTICHE_AGGREG/Statistiche_Aggreg-$data.txt
cp /genesys/FLUSSI/out/STATISTICHE_AGGREG/Statistiche_Aggreg.tmp /genesys/FLUSSI/out/STATISTICHE_AGGREG/STORICO/Statistiche_Aggreg-$data.txt
------------------------------------------------------------
Grazie a tutti in anticipo!
:master: