Oracle:流程调用子程序 [英] Oracle : Flow to call the subroutines

查看:168
本文介绍了Oracle:流程调用子程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑有4个工作 A,B,C MAIN 。根据某些条件,MAIN工作将调用其他子程序。 / strong>将在每周的第一个工作日调用作业A ,并在每个工作日调用 JOB B 。此外还会调用工作C 。任何人都可以建议我这样做的流程?



我使用的是oracle 10g。

解决方案

我假设你要使用oracle ..你可以设置主要查询数据库。其中你设置时间表(存储过程的名称和日程表格式)..格式该计划可以类似于crontab中使用的东西,但一些不太强大的东西应该足够了你我猜...



更新的答案



以下是您需要创建的表格。
StoredProcName,timeToRun
1)ProcA FirstDayOfBusiness
2)ProcB每个工作日
3)ProcC FirstDay of EveryMonth。



您的Main将有逻辑来获取此表中的所有作业,并决定是否需要运行,然后根据需要运行它们,任何序列也很重要..

com / node / 871rel =nofollow> http://www.orafaq.com/node/871


Consider there are 4 jobs A,B,C and MAIN.The MAIN Job will call other subroutines based on the some condition.The Main Job will call the Job A on the first business day of the every week.also it will call JOB B on every business day.Also it will call the Job C on the first day of the every month. Can anyone suggest me the flow to do it?

I am using oracle 10g.

解决方案

I am assuming you are going to be using oracle.. you can set up main to query the database..where you set the schedules (name of the stored proc and the schedule format)..the format of the schedule can something similar to what is used in crontab, but something less powerful should be sufficient for you i guess...

updated answer

Following is the table you need to create. StoredProcName, timeToRun 1) ProcA FirstDayOfBusiness 2) ProcB Every business day 3) ProcC FirstDay of EveryMonth.

Your Main will have logic to get all jobs from this table and decide if they need to be run and then run them if needed, Is any sequence also important.. or the jobs are independent of previous job runs?

read this http://www.orafaq.com/node/871

这篇关于Oracle:流程调用子程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆