Re: Why isn't my script running?

  • From: Stefan Knecht <knecht.stefan@xxxxxxxxx>
  • To: eugene.pipko@xxxxxxxxxxxx
  • Date: Tue, 24 Feb 2009 19:48:30 +0100

AFAIK this :

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

should be:


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


Cheers


=========================

Stefan P Knecht
CEO & Founder
s@xxxxxxxx

10046 Consulting GmbH
Schwarzackerstrasse 29
CH-8304 Wallisellen
Switzerland

Phone +41-(0)8400-10046
Cell +41 (0) 79 571 36 27
info@xxxxxxxx
http://www.10046.ch

=========================


On Tue, Feb 24, 2009 at 7:15 PM, Eugene Pipko <eugene.pipko@xxxxxxxxxxxx>wrote:

>  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: