I'm using first time DBMS_JOB package can u tell me that how to run 9am every day. The following is the steps follwed.

First i create table
====================
create table mohan3(job int primary
key, period date );

Procedure
=========:
create or replace procedure mohan4( p_job in
number ) as l_parameters mohan3%rowtype;
begin select * into l_parameters from mohan3 where job =
p_job;
end;

Procedure created




declare
l_job number;
begin
dbms_job.submit(l_job, 'mohan4( p_job => JOB );', trunc(sysdate)+9/24,'trunc(sysdate)+1+9/24);
insert into mohan3 values ( l_job, to_date( '200207',
'yyyymm' ) );
commit;
end;



PL/SQL procedure successfully completed.



SQL> exec dbms_job.run(10);
BEGIN dbms_job.run(10); END;

*
ERROR at line 1:
ORA-12011: execution of 1 jobs failed
ORA-06512: at "SYS.DBMS_IJOB", line 394
ORA-06512: at "SYS.DBMS_JOB", line 267
ORA-06512: at line 1





And looking at the alert log we see the below error
================================================== =:

Dump file C:\Oracle\admin\test2\bdump\test2SNP5.TRC
Thu Nov 14 10:28:59 2002
ORACLE V8.1.6.0.0 - Production vsnsta=0
vsnsql=e vsnxtr=3
Windows 2000 Version 5.0 Service Pack 3, CPU type 586
Oracle8i Release 8.1.6.0.0 - Production
JServer Release 8.1.6.0.0 - Production
Windows 2000 Version 5.0 Service Pack 3, CPU type 586
Instance name: test2

Redo thread mounted by this instance: 1

Oracle process number: 17

Windows thread id: 584, image: ORACLE.EXE


*** SESSION ID12.1916) 2002-11-14 10:28:59.406
*** 2002-11-14 10:28:59.406
ORA-12012: error on auto execute of job 5
ORA-01403: no data found
ORA-06512: at "SYSTEM.MONTH_QD", line 6
ORA-06512: at line 1




2)
I want to get the optimizer statistics of the emp,dept tables every night 7pm .In order to get the statistics i followed the below steps




VARIABLE jobno number;
BEGIN
DBMS_JOB.SUBMIT(:jobno,
'dbms_ddl.analyze_object(''TABLES'',
''EMP'', ''DEPT'',
''ESTIMATE'', NULL, 50);'
SYSDATE, 'SYSDATE + 7/24');
commit;
END;


SQL> select job,next_date,next_sec,failures,broken from user_jobs;

JOB NEXT_DATE NEXT_SEC FAILURES B
---------- --------- -------- ---------- -
25 14-NOV-02 16:10:34 3 N


After each run, the FAILURES and NEXT_SEC columns value are increasing, but I'm
unable to run the job.


Any idea it should be appreciate
Regards
mohan