Creating a Create script for an existing job in an Oracle database
--generate a Create script for an existing job Create or Replace procedureProc_generate_job_create_sql is beginDbms_output. ENABLE (Buffer_size= NULL);--indicates that the output buffer is unrestrictedSys.dbms_output.put_line ('Declare'); Sys.dbms_output.put_line ('v_job number;'); Sys.dbms_output.put_line ('begin'); forJinch(SelectWhat, Interval fromuser_jobs) Loop Sys.dbms_output.put_line ('sys.dbms_job.submit (Job = V_job,'); Sys.dbms_output.put_line ('What =" " ||J.what|| " ",'); Sys.dbms_output.put_line ('next_date =' ||J.interval|| ','); Sys.dbms_output.put_line ('interval =" " ||J.interval|| ';" "); EndLoop; Sys.dbms_output.put_line ('commit;'); Sys.dbms_output.put_line ('end;'); End;
Resources
Ora-20000:oru-10027:buffer Overflow,limit of bytes.
Oracle Tools Class-Create a script for creating a database existing job