12.13. Answers to Review Questions

  1. C. The SET_JOB_ANYDATA_VALUE procedure allows you to set job arguments that don't easily convert to and from a string (VARCHAR2) datatype.

  2. A, D. Programs (as well as jobs) can be enabled in two ways: by using the ENABLE procedure or by using the SET_ATTRIBUTE procedure to set the ENABLED attribute to TRUE.

  3. C. The calendaring syntax does not support an element named RUNDATE. It does not support the concept of specifying a single run date at all. The purpose of the calendaring syntax is to define repeat intervals that will be used to calculate run dates.

  4. B, D. The DBA_SCHEDULER_RUNNING_JOBS view shows detailed information about all jobs currently executing. The DBA_SCHEDULER_JOBS view contains the STATE column, which shows a value of RUNNING for an executing job.

  5. B. A schedule defined within a job object is known as an inline schedule, whereas an independent schedule object is referred to as a stored schedule. Inline schedules cannot be referenced by other objects.

  6. A, E. A job can be altered only by changing the value of one or more of its attributes. This is accomplished by using the SET_ATTRIBUTE and SET_ATTRIBUTE_NULL procedures.

  7. B. Jobs and programs are created in a disabled state by default. They must be enabled by setting the ENABLE parameter to TRUE in their respective CREATE statements, or by altering the object after creation.

  8. A, D. The LOG_HISTORY parameter defines the retention period for both job logging and window logging by default. However, the WHICH_LOG parameter can be used to specify either JOB_LOG or WINDOW_LOG.

  9. B, C. The RUN_JOB procedure accepts two parameters: JOB_NAME and USE_CURRENT_SESSION. In this example, the USE_CURRENT_SESSION parameter is set to a value of TRUE. This causes the job to be executed synchronously in the user's current session. Because the job runs synchronously, control would not return to the user until the job was completed. Therefore, the user could not continue to execute SQL statements while the job was running.

  10. B. The BYMONTHDAY element accepts negative values that represent a specific count of days from the end of the month. Also, the FREQ parameter must be set to MONTHLY, because it will execute every month.

  11. A. The job coordinator does not update the job log when a job completes. That function is performed by the job slave that has been assigned to the job.

  12. A, D. A window does not execute programs or jobs. It specifies a resource plan that will be enabled based on a schedule. Therefore, it can reference both a schedule object and a resource plan object. And while the resource plan may reference one or more resource consumer groups, the window object does not directly reference them.

  13. C. The EVALUATE_CALENDAR_STRING procedure will generate execution dates from a calendaring syntax expression.

  14. B. Java stored procedures cannot be executed by the job Scheduler unless they are called from within a PL/SQL procedure wrapper. This can be done in a stored procedure using PL/SQL's external procedure feature. Therefore, the job or program type setting would be STORED_PROCEDURE.

  15. A, B, D. Schedule objects do not specify any action to be performed; they simply generate execution dates that any job can use. Program and job arguments allow the jobs and programs to be reused by simply changing the arguments that are passed in. Job classes simplify the management of jobs, but they do not specifically encourage job reuse.

  16. D. The Scheduler will attempt to wrap the job within a transaction and will execute a rollback if a job is stopped. However, if the job has performed commits, the rollback will only roll back any uncommitted changes. This could result in inconsistent data.

  17. E. A schedule object does not possess the ENABLED attribute. It is therefore enabled upon creation and can never be disabled.

  18. A, B, E. When a job exceeds its end date, it will be dropped only if the AUTO_DROP attribute is set to TRUE. Otherwise, it will be disabled. In either case, the STATE column will be set to COMPLETED in the job table. A job object does not possess a CASCADE attribute or a STATE attribute.

  19. B. The DBA_SCHEDULER_WINDOWS view shows information on window objects defined in the Scheduler.

  20. A. The WINDOW_PRIORITY attribute can be set to either HIGH or LOW for a window. If two windows overlap and only one of the windows has a priority of HIGH, it will be chosen.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset