Part 1: The following steps fully demonstrate the job creation process: Part 2: job-related knowledge: Part 3: Actual Application discovery: This is required when jobs are deleted.
Part 1: The following steps fully demonstrate the job creation process: Part 2: job-related knowledge: Part 3: Actual Application discovery: This is required when jobs are deleted.
Guidance:
Part 1: The following steps fully demonstrate the job creation process:
Part 2: job-related knowledge:
Part 3: Practical Application
We found that the job owner must be used to delete jobs, and sys cannot delete other jobs! (In this case, correct it later. Hey hey ·)
Body:
Part 1: The following steps fully demonstrate the jobCreation process:
1. Create a pig table with the Date Format
SQL> create table pig (a date );
Table created
SQL> commit;
Commit complete
2. Create a stored procedure. bb inserts data into the pig table.
SQL> create or replace procedure bb
2 begin
3 insert into pig values (sysdate );
4 end;
5/
Procedure created
3. Create a job named job2009 to execute the Stored Procedure bb every minute (60 × 24 = 1440.
SQL> variable job2009 number;
SQL> begin
2 dbms_job.submit (: job2009, 'bb; ', sysdate, 'sysdate + 1/1440 ');
3 end;
4/
Note: here the system automatically generates a job id of 41
PL/SQL procedure successfully completed
Job2009
---------
41
4. Run job2009.
SQL> begin
2 dbms_job.run (: job2009 );
3 end;
4/
PL/SQL procedure successfully completed
Job2009
---------
41
5. Delete job2009
SQL> begin
2 dbms_job.remove (: job2009 );
3 end;
4/