RE: Why isn't my script running?

  • From: Eugene Pipko <eugene.pipko@xxxxxxxxxxxx>
  • To: 'z b' <zimsbait@xxxxxxxxx>
  • Date: Wed, 25 Feb 2009 08:08:56 -0800

Thanks everyone for your replies.

Yes, I could use dbms_job, but I am trying to learn to use cron.

I've implemented all the suggestions, but ... the script still wouldn't fire 
from cron.
It runs just fine if I do: $sh test_schema_stats.sh.
I will spend some more time trying to figure it out.

Eugene Pipko
  Please consider the environment before printing this e-mail.

-----Original Message-----
From: z b [mailto:zimsbait@xxxxxxxxx] 
Sent: Tuesday, February 24, 2009 6:32 PM
To: Eugene Pipko
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: Why isn't my script running?

If this is the actual script, why not use dbms_job (< 10g) or
dbms_scheduler (> 10g)?

On Tue, Feb 24, 2009 at 1: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.
>
>
��i��0���zX���+��n��{�+i�^

Other related posts: