Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: run an external OS script in Oracle 10g

Re: run an external OS script in Oracle 10g

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 22 Apr 2006 19:59:26 +0200
Message-ID: <3lrk42piqlp4vv19f3eri82dq6f80gva14@4ax.com>


On Sat, 22 Apr 2006 17:40:44 +0200, "Michele Campagni" <michele.campagni_at_libero.it> wrote:

>I've difficult in executing an external OS script like this:
>vmstat.sh: "/usr/bin/vmstat >> /tmp/vmstat.LST"
>which have this permission:
>-rwxr-xr-x 1 oracle other 47 Apr 3 05:13
>/export/home/oracle/vmstat.sh
>
>I try with this:
>
>BEGIN
> dbms_scheduler.create_job(job_name => 'myjob',
> job_type => 'executable',
> job_action => '/oracle/vmstat.sh',
> enabled => TRUE,
> auto_drop => TRUE);
>END;
>/
>
>but oracle responds:
>SQL> exec dbms_scheduler.run_job('VMSTAT_JOB');
>BEGIN dbms_scheduler.run_job('VMSTAT_JOB'); END;
>
>*
>ERROR at line 1:
>ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
>ORA-06512: at "SYS.DBMS_ISCHED", line 150
>ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
>ORA-06512: at line 1
>
>I'm using Solaris 10/Sparc and Oracle 10g.
>what's the problem?
>thanks
>
>

/oracle/vmstat.sh doesn't look exactly like to be the same file as /usr/bin/vmstat.sh
Other than that: why on earth are you running vmstat in a *database*.

--
Sybrand Bakker, Senior Oracle DBA
Received on Sat Apr 22 2006 - 12:59:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US