Why isn't my script running?

  • From: Eugene Pipko <eugene.pipko@xxxxxxxxxxxx>
  • To: "'oracle-l@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 24 Feb 2009 10:15:26 -0800

Hi all,
I am new to shell. I need to calculate stats for a schema using cron (oracle 
linux 4).
For some reason my script is not running.
--------------------------------------
#!/bin/ksh
USER=SYSTEM
PASSWORD=pwd
sqlplus -s $USER/$PASSWORD <<EOF
set feed off
set head off
set pagesize 0
exec dbms_stats.gather_schema_stats('TEST',ESTIMATE_PERCENT=>30,CASCADE=>TRUE);
/
exit 0;
EOF
-------------------

Then in Linux:
00 01 * * 7 /home/oraprd/scripts/test_schema_stats.sh 1&2 >> 
/home/oraprd/scripts/logs/test_schema_stats.log

Thanks,
Eugene Pipko
P  Please consider the environment before printing this e-mail.

Other related posts: