oracle: ocp题解与实验(15/205)

来源:互联网 发布:双系统linux无法启动 编辑:程序博客网 时间:2024/05/20 00:35

题目:

15. You work as a database administrator at Certkiller .com. In your production database there is a job, CALC_STAT, which has been scheduled to run every Friday at 5.00 p.m. CALC_STAT updates the optimizer statistics for the objects owned by the APPS schema. You want the taskto be generic, there by allowing users to modify the attributes of the task at run time without affecting the original task.Which component of Oracle Scheduler must you define to achieve this?A. WindowB. ProgramC. Job classD. Window groupAnswer: B

题目翻译:作为Certkiller.com的数据管理员,在生产数据库上有一个job名为CALC_STATE,已经计划每周五下午5点运行。它的功能是为apps schema拥有的objects更新optimizer statistics。你希望这个工作是generic的,因此允许用户可以在运行时间修改工作的attributes参数,而不影响原先的task。哪个oracle scheduler模块组件可以用来完成这项工作?
答案解释:

Programs
Programs provide a layer of abstraction between the job and the action it will perform.They are created with the DBMS_SCHEDULER.CREATE_PROGRAM procedure:
PROCEDURE CREATE_PROGRAM
Argument Name                               Type                                 In/Out  Default?
-------------------------------------------    ------------------------------   ------    --------
PROGRAM_                                     NAME VARCHAR2         IN
PROGRAM_TYPE VARCHAR2                                               IN
PROGRAM_ACTION VARCHAR2                                           IN
NUMBER_OF_ARGUMENTS          BINARY_INTEGER         IN          DEFAULT
ENABLED BOOLEAN                                                              IN          DEFAULT
COMMENTS VARCHAR2                                                        IN          DEFAULT

By pulling the “what” of a job out of the job definition itself and defining it in a program, it becomes possible to reference the same program in different jobs, and
thus to associate it with different schedules and job classes, without having to define it many times
. Note that (as for a job) a program must be ENABLED before it can be used. 

Program就是这个作用。
原创粉丝点击