Re: Why isn't my script running?

From: Stefan Knecht <knecht.stefan_at_gmail.com>
Date: Tue, 24 Feb 2009 19:48:30 +0100
Message-ID: <486b2b610902241048i631c1777w2ffa0d96b305fde2_at_mail.gmail.com>



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_at_10046.ch

10046 Consulting GmbH
Schwarzackerstrasse 29
CH-8304 Wallisellen
Switzerland

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


On Tue, Feb 24, 2009 at 7:15 PM, Eugene Pipko <eugene.pipko_at_unionbay.com>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.
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 24 2009 - 12:48:30 CST

Original text of this message