Oracle Job
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Jun 3 14:51:26 2011
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter user-name: ***
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create table job_test(a date);
Table created.
SQL> create or replace procedure prc_job_test as
2 begin
3 insert into job_test values (sysdate);
4 end;
5 /
Procedure created.
SQL> variable testjob1 number;
SQL> begin
2 dbms_job.submit(:testjob1,prc_job_test;,sysdate,sysdate+1/1440);
3 commit;
4 end;
5 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_job.run(:testjob1);
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_job.remove(:testjob1);
3 end;
4 /
PL/SQL procedure successfully completed.
SQL>drop procedure prc_job_test;
SQL>drop table job_test;
相关新闻>>
- 发表评论
-
- 最新评论 更多>>