Re: dbms_job not running at sqlplus shell

From: Chek Ban Tan <chekban_at_gmail.com>
Date: Mon, 31 Mar 2014 03:42:58 -0700 (PDT)
Message-ID: <4bda99f1-86e4-42ea-8e21-7cd12e72ec2e_at_googlegroups.com>


On Saturday, March 29, 2014 1:53:14 AM UTC+8, ddf wrote:
> On Wednesday, March 26, 2014 9:44:10 PM UTC-6, Chek Ban Tan wrote:
>
> > Hi,
>
> >
>
> >
>
> >
>
> > I'm trying to run dbms_job at sqlplus shell but failed. In Toad i managed to run this at "Editor"->"Execute statement"
>
> >
>
> >
>
> >
>
> > exec dbms_job.isubmit(1234, 'TEST;',SYSDATE,INTERVAL => 'SYSDATE+(2/24/60)');
>
> >
>
> > /
>
> >
>
> > successfully
>
> >
>
> >
>
> >
>
> > But when i run
>
> >
>
> >
>
> >
>
> > [abc]$ sqlplus user/password _at_compile1.sql
>
> >
>
> >
>
> >
>
> > compile1.sql's content
>
> >
>
> > spool compile.log;
>
> >
>
> > _at_try.sql
>
> >
>
> > spool off;
>
> >
>
> >
>
> >
>
> > try.sql's content
>
> >
>
> >
>
> >
>
> > exec dbms_job.isubmit(1234, 'TEST;',SYSDATE,INTERVAL => 'SYSDATE+(2/24/60)');
>
> >
>
> > /
>
> >
>
> >
>
> >
>
> > after runnning compile1.sql, this appears
>
> >
>
> >
>
> >
>
> > [abc]$ sqlplus ESERV/ESERV _at_compile1.sql
>
> >
>
> >
>
> >
>
> > SQL*Plus: Release 11.2.0.4.0 Production on Tue Jan 28 13:46:11 2014
>
> >
>
> >
>
> >
>
> > Copyright (c) 1982, 2013, Oracle. All rights reserved.
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > Connected to:
>
> >
>
> > Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
>
> >
>
> > With the Partitioning, OLAP, Data Mining and Real Application Testing options
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > and it stucked there forever. I did try to include begin ... end;
>
> >
>
> >
>
> >
>
> > but still it doesn't succeed , kindly advise if you have any idea, thanks !
>
> >
>
> >
>
> >
>
> > regards, Tan
>
>
>
>
>
> Are you trying to run this in the same database? If you got it to run from the SQL> prompt and are trying to get it to run again it won't, but it should have displayed an error that the job already exists.
>
>
>
>
>
> What privileges does the ESERV user have?

Hi,
[Quoted] the sql run at command prompt is not stable , sometimes it can be executed but most of the time it hang there. its not privilege issue.

The job does not have error. Received on Mon Mar 31 2014 - 12:42:58 CEST

Original text of this message