Alter a job task - SETATTRIBUTE procedure - Oracle DBA

Q.  Which task does the SET_ATTRIBUTE procedure come under the Job tasks and their procedures?
- Published on 30 Jul 15

a. Create a job
b. Alter a job
c. Run a job
d. Disable a job

ANSWER: Alter a job
 

    Discussion

  • Nirja Shah   -Posted on 25 Aug 15
    -The SET_ATTRIBUTE procedure changes an attribute of an object.
    -It is overloaded to accept values of the following types: VARCHAR2, TIMESTAMP WITH TIMEZONE, BOOLEAN, PLS_INTEGER, and INTERVAL DAY TO SECOND.
    -To set an attribute to NULL, the SET_ATTRIBUTE_NULL procedure should be used.
    -What attributes can be set depends on the object being altered.
    -With the exception of the object name, all object attributes can be changed.
    - The SET_ATTRIBUTE procedure is used for altering a job

    -The other tasks are:

    -Create a job - You create one or more jobs using the CREATE_JOB or CREATE_JOBS procedures or Enterprise Manager.
    -The CREATE_JOB procedure is used to create a single job.
    -This procedure is overloaded to enable you to create different types of jobs that are based on different objects.
    -Multiple jobs can be created in a single transaction using the CREATE_JOBS procedure.

    -Alter a job - You alter a job using the SET_ATTRIBUTE or SET_JOB_ATTRIBUTES procedures or Enterprise Manager.
    -All jobs can be altered, and, with the exception of the job name, all job attributes can be changed.
    -If there is a running instance of the job when the change is made, it is not affected by the call.
    -The change is only seen in future runs of the job.

    -Run a job - There are three ways in which a job can be run:
    1. According to the job schedule — In this case, provided that the job is enabled, the job is automatically picked up by the Scheduler job coordinator and run under the control of a job slave. The job runs as the user who is the job owner.
    2. When an event occurs — Enabled event-based jobs start when a specified event is received on an event queue
    3.By calling DBMS_SCHEDULER.RUN_JOB — You can use the RUN_JOB procedure to test a job or to run it outside of its specified schedule.

    -Disable a job - You disable one or more jobs using the DISABLE procedure or Enterprise Manager.
    -A job can also become disabled for other reasons
    -Disabling a job means that, although the metadata of the job is there, it should not run and the job coordinator will not pick up these jobs for processing. When a job is disabled, its state in the job table is changed to disabled.

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)