标签:host dfa toc dea rtt 定时任务 lld select repo
CREATE PUBLIC DATABASE LINK DBLINK01 CONNECT TO app IDENTIFIED BY appapp2018 USING ‘(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 134.103.65.206)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) )‘;
create or replace procedure test as begin DELETE FROM KDFAULTORDER; INSERT INTO KDFAULTORDER select BUSINESSDATAID ID, TITLE REPORTTITLE, MAINSN FAULTNUMBER, (select SPECIALTYNAME from CCATSUPT.PUB_SPECIALTY@kdogg where SPECIALTYID= BIGSPECIALTY)BIGTYPE, (select SPECIALTYNAME from CCATSUPT.PUB_SPECIALTY@kdogg where SPECIALTYID= SPECIALTY)SMALLTYPE, (select BUSINESSNAME from CCATSUPT.sys_business@kdogg where BUSINESSID= BUSINESS)REPORTTYPE, SOURCEDEPT REPORTRESOURCE, FIRSTRECEPTTIME REPORTTIME, REQREPAIRTIME ENDTIME, (select objectname from ccatsupt.org_tree@kdogg where itemid= REPAIROPER )DEALPERSON, HASTENNUM REPAIRNUM, decode(PROCESSFLAG,‘DECLARATE‘,‘申告‘,‘BILLDEAL‘,‘工单处理中‘,‘HANGUP‘,‘挂起‘,‘VISIT‘,‘待回访‘) ORDERSTATUS, ALARMSTATUS WARNSTATUS, (select objectname from ccatsupt.org_tree@kdogg where itemid= regionid) AREANAME from CCATSUPT.Svr_Pub_Da_Mainqueue@kdogg where ARCHIVETYPE is null and FIRSTRECEPTTIME < sysdate -15/1140 and REQREPAIRTIME > sysdate -15/1140; end;
declare job1 number; begin dbms_job.submit(job1, what => ‘test;‘, next_date => sysdate, interval => ‘TRUNC(sysdate) + 1 + 1 / (24)‘); commit; end;
// 查询当前数据库的所有定时任务 declare job1 number; begin dbms_job.submit(job1, what => ‘test;‘, next_date => sysdate, interval => ‘TRUNC(sysdate) + 1 + 1 / (24)‘); commit; end; // 运行某个定时任务 begin dbms_job.run(29); commit; end;
标签:host dfa toc dea rtt 定时任务 lld select repo
原文地址:https://www.cnblogs.com/DreamSeekerming/p/9160872.html