码奴夫人 2018-01-22 02:14 采纳率: 0%
浏览 3246
已结题

我想查看某个存储过程是否被执行

我定义了一个job,job里面有个存储过程,存储内容是根据日期判断是否执行另外一个存储过程。

 create or replace procedure autoetl_day (indate  in  date)
is    --输入参数
flg number;
mlg number;
begin
   --如果是周六日被节假日调休的情况,且该日期是周六或者周日
   select count(1)  into  flg from FESTIVAL  f      where  f.festival_day=indate    and f.fe_lag=1;
   select count(1)  into mlg  from FESTIVAL  f1      where  f1.festival_day=indate  and f1.fe_lag=0;
        if (flg)=1 and    (to_char(indate,'d') ='1' or  to_char(indate,'d') ='7') 
     then  
        a_etl_proc;  dbms_output.put_line(' 假日调休抽取'||indate);
     insert into LION_ETL_LOG(ETL_LOGCONTENT) values('调休日抽取'||to_char(indate,'yyyymmdd')||'抽取完成');
    else if  --如果是节日情况
         mlg<>0
        then       dbms_output.put_line('节日 不抽取'||indate);
    else if   (to_char(indate,'d') ='1' or  to_char(indate,'d') ='7') 
      then      dbms_output.put_line(' 周六日不抽取'||indate);
      else 
             a_etl_proc; dbms_output.put_line(' 工作日抽取'||indate);
              insert into LION_ETL_LOG(ETL_LOGCONTENT) values('工作日'||to_char(indate,'yyyymmdd')||'抽取完成');
        end if;
        end if;
      end if;
        commit;
    end;         

各位大神,请问,我如何查询A_ETL_PROC的每天执行记录?

  • 写回答

4条回答 默认 最新

  • qq_15746835 2018-01-22 02:22
    关注

    select * from sys.dm_exec_procedure_stats

    评论

报告相同问题?

悬赏问题

  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配