开发者

db2 time based trigger

开发者 https://www.devze.com 2022-12-16 11:33 出处:网络
开发者_如何学JAVAare there any time based triggers in DB2?You don\'t have to. There is usually a OS function available for that. If I am not mistaken it is at in unix and the scheduled jobs under wind

开发者_如何学JAVAare there any time based triggers in DB2?


You don't have to. There is usually a OS function available for that. If I am not mistaken it is at in unix and the scheduled jobs under windows (there is also a command line interface for windows).

However, I do remember that there was a scheduler in MS SQL server. After asking google, I learned that DB2 has something called task center. Not sure what that thing does or how you configure it (my UI does not open for some strange reason).


Without further details, I can't give you a specific answer. I'm guessing you're asking for "a trigger that is fired at a specific time" and not "a trigger that has different timing options, like fire before event or fire after event".

The answer to the former is no, triggers are not fired by external events like the time of day. Triggers are features specifically designed to respond to monitor for changes in tables. What you are looking for is some form of task/job scheduling, and there are many approaches you can use to accomplish this.

I can't really detail any options without knowing what platform you're running on (Unix, Linux, Mainframe, Windows?), so if you could clarify I might be able to help further. The version of DB2 you're running would also help.

Examples
If you're running DB2 on IBM's iSeries you would probably want to use the OS's native job scheduler (see http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/rzaks/sc415324.pdf).

On Unix/Linux the popular option is cron (see http://www.adminschoice.com/crontab-quick-reference)

The typical solution for DB2 on windows, z/OS, and others is the Task Center utility (depending on your DB2 version, see http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.taskcenter.doc/taskcenter/abouttaskcenter.htm)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号