Vous êtes sur la page 1sur 1

dbms_job.

next_date(job=>42,next_Date=>(to_date('01/01/4000', 'dd/mi/yyyy ')));

This is to change the job schedule


dbms_job.next_date(job=>285,next_Date=>(to_date('13/07/2016 07:30:00', 'DD/MM/YYYY
HH24:MI:SS')));
commit

7/13/2016 2:00:00

exec dbms_job.broken(job=>118293, broken=>FALSE,next_Date=>(to_date('01/01/4000',


'dd/mi/yyyy ')));

exec dbms_job.run(job=>1322)---run immediately

Dynamic script to create jobs under correct user after impdp, (as jobs are created
under sys/system)

run this in source under the schema owning the jobs, it will spool a file then run
this spool
file by connecting to the owner schema (whihc should ownt he jobs) in target.
Note before doing this, we would have to drop the existing jobs under system/sys in
target.

-----------------------------------------------------
alter session set nls_date_format='mm-dd-yyyy hh24:mi:ss';
set lines 250
set pages 500

spool a.lst

SELECT 'BEGIN SYS.DBMS_JOB.iSUBMIT( job => '


|| job
|| ', what => '''
|| replace(what,'''','''''')
|| ''' ,next_date => to_date('''
|| next_date
|| ''','' mm-dd-yyyy hh24:mi:ss'') ,interval => '''
|| INTERVAL
|| ''',no_parse => FALSE ); COMMIT;END;'||chr(10)||'/'||chr(10)
FROM user_jobs;

spool off

Vous aimerez peut-être aussi