ORACLE 定时执行存储过程
2017-03-25 10:56
411 查看
-- 创建 create table test_lf( test_id varchar(40) primary key, test_name varchar(50) not null, reate_time date ); select t.*,t.rowid from test_lf t; --select t.*,t.rowid from lf_201703282003 t -- 授权 grant create table to developer -- 创建存储过程 create or replace procedure test_lf_pro authid current_user as tablename varchar(1200); begin -- 拼接数据库名 select 'LF_' || to_char(sysdate, 'yyyymmddhh24mm') into tablename from dual; dbms_output.put_line('执行。。。'); -- 创建表 execute immediate 'create table '|| tablename || ' as select * from test_lf where reate_time >(sysdate-1)'; end; -- 调用(手动) call test_lf_pro(); -- 定时调用 declare jobid number; begin -- 定时 --sys.dbms_job.submit(qqid,'LF;',sysdate,'trunc(sysdate+1)+(10*60+45)/(24*60)',true); sys.dbms_job.submit(jobid,'test_lf_pro;',sysdate,'trunc(sysdate+1)+11/(24*60)',true); commit; -- 执行 dbms_job.run(jobid); end;
相关文章推荐
- oracle定时执行存储过程的job
- oracle 定时执行存储过程
- oracle job 定时执行 存储过程
- oracle定时执行一个存储过程
- oracle 定时执行存储过程
- Oracle添加job定时执行存储过程
- oracle 创建存储过程 在job 定时执行
- oracle job 定时执行 存储过程
- oracle 里面定时执行任务,比如存储过程内容等
- Oracle定时执行存储过程(转)
- 使用oracle 的 PL/Sql 定时执行一个存储过程
- ORACLE通过JOB定时执行存储过程
- ORACLE 定时执行存储过程
- Oracle实现创建作业定时执行存储过程
- oracle定时执行存储过程的job
- oracle定时执行存储过程的job
- Oracle 定时执行存储过程
- oracle 定时执行存储过程
- oracle定时执行存储过程
- oracle job 定时执行 存储过程