Re: Why isn't my script running?

From: amonte <ax.mount_at_gmail.com>
Date: Thu, 26 Feb 2009 08:09:30 +0100
Message-ID: <85c1fb130902252309i76dcabbfj35f259bca08f32bc_at_mail.gmail.com>



not about your script but for god sake dont run sqlplus -s user/password, use this

sqlplus /nolog << EOF
connect user/password
...........

EOF I just got two production passwords from a couple of customers last week because they run as you and with a ps you catch all these critical informations!

Alex

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 Thu Feb 26 2009 - 01:09:30 CST

Original text of this message