Home » SQL & PL/SQL » SQL & PL/SQL » create job using dbms_jobs (oracle ,Unix)
create job using dbms_jobs [message #509616] Mon, 30 May 2011 09:54 Go to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi,

I want to create one dummy job using dbms_jobs and execute it under BALA user.
This is just for testing purpose.My goal is to test Whether the job executes successfuly
under the new user i created BALA.

All these should happen under BALA user.


Your help is appreciated

Thanks

Re: create job using dbms_jobs [message #509617 is a reply to message #509616] Mon, 30 May 2011 09:56 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Which part of the Posting Guidelines ( http://www.orafaq.com/forum/t/88153/0/ ) did you NOT read & follow?
Was it the part about using SEARCH ( http://www.orafaq.com/forum/s/136107/ ) or GOOGLE ( http://google.com ) before posting?
Why should we repeat here, what is already documented at http://tahiti.oracle.com
Please post DOCUMENTED solution back here after you have found it.

Re: create job using dbms_jobs [message #509621 is a reply to message #509616] Mon, 30 May 2011 11:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
DBMS_JOB

Regards
Michel
Re: create job using dbms_jobs [message #509719 is a reply to message #509621] Tue, 31 May 2011 07:25 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Nice link to start with jobs scheduler. Thanks Michel.

I have one doubt in this topic.

Is it necessary to create dbms_scheduler.create_program and procedure for my task ?

what are all the steps required to test if the jobs is running successfully
with newly created user.

To my understanding i prepare to follow the below.

create a job
------------
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_java_job',
job_type => 'EXECUTABLE',
job_action => '/usr/bin/java myClass',
repeat_interval => 'FREQ=MINUTELY',
enabled => TRUE
);
END;
/

Run a job
---------------
EXEC dbms_scheduler.run_job('myjob');


Monitor job
---------
SELECT * FROM dba_scheduler_jobs WHERE job_name = 'MY_JAVA_JOB';


Did i miss anything here ? pls correct if it is required.

Thanks,











Re: create job using dbms_jobs [message #509724 is a reply to message #509719] Tue, 31 May 2011 07:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
Is it necessary to create dbms_scheduler.create_program and procedure for my task ?

No, dbms_job and dbms_scheduler are 2 different schedulers.
If you use dbms_job there is nothing to do with dbms_scheduler.

Quote:
what are all the steps required to test if the jobs is running successfully
with newly created user.

Do something that you can test! For instance, insert a row in a table or write into a file.

Quote:
create a job
------------
...

Now you use dbms_scheduler so read DBMS_SCHEDULER and try it, this is the best way to learn.

Regards
Michel
Re: create job using dbms_jobs [message #509801 is a reply to message #509724] Wed, 01 June 2011 02:59 Go to previous message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member



Thanks Michel.
Previous Topic: exec stored proc with table of number as in parameter
Next Topic: Fetching data from table
Goto Forum:
  


Current Time: Sun Aug 24 19:34:23 CDT 2025