I have experienced an ODBC connection failure from Excel, when I try to embed "sudo -u mfg /apps/mfgsvr/start.Demonstration" inside my crontab scheduler. Users from 4GL arent affected.
It executes perfectly well under tty terminal mode with manual entry.
$sudo -u mfg /apps/mfgsvr/start.Demonstration
However, when it comes to crontab, it just failed to establish connection via ODBC/JDBC.
#crontab -e
0-59/10 * * * * sudo -u mfg /apps/mfgsvr/start.Demonstration
Promon also give symptoms of _sqlsrv2 problems in evoking, a basis process needed for establishing ODBC/JDBC connection.
The solution to this problem is pretty easy.
Just add the following lines to your start.Demonstration.
#Solution To Crontab sudo Problem in ODBC/JDBC
export JAVA_HOME=/apps/java/j2sdk1.4.2_06
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:/usr/dlc/java/progress.jar
export LD_LIBRARY_PATH=/usr/dlc/lib
export WRKDIR=/apps/mfgsvr/instlog
Hope it helps ppl who encountered this prob.
It executes perfectly well under tty terminal mode with manual entry.
$sudo -u mfg /apps/mfgsvr/start.Demonstration
However, when it comes to crontab, it just failed to establish connection via ODBC/JDBC.
#crontab -e
0-59/10 * * * * sudo -u mfg /apps/mfgsvr/start.Demonstration
Promon also give symptoms of _sqlsrv2 problems in evoking, a basis process needed for establishing ODBC/JDBC connection.
The solution to this problem is pretty easy.
Just add the following lines to your start.Demonstration.
#Solution To Crontab sudo Problem in ODBC/JDBC
export JAVA_HOME=/apps/java/j2sdk1.4.2_06
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:/usr/dlc/java/progress.jar
export LD_LIBRARY_PATH=/usr/dlc/lib
export WRKDIR=/apps/mfgsvr/instlog
Hope it helps ppl who encountered this prob.