9.6 Objects

The Objects menu in Scheduling provides links to the following four pages: Job Classes, File Watchers, Windows and Window Groups

Job Classes

A job class is an Oracle Scheduler object that enables the Scheduler administrator to group jobs for logical purposes, such as to assign the same set of attribute values to member jobs, to set service affinity for member jobs, to set resource allocation for member jobs, or to group jobs for prioritization.

Note:

Creating a job class requires the MANAGE SCHEDULER system privilege. Access to SYS.DBA_RSRC_CONSUMER_GROUPS and SYS.DBA_SERVICES dictionary views is required in order UI to provide all details and choices.

The Job Classes page displays the job classes created in a tabular format. You can perform the following actions:

  • Create: To create a job class, see Create Job Class.
  • Edit: To edit a job class, select Edit from the Actions menu at the end of a row. For a description of the fields, see Create Job Class.
  • Drop: To drop a job class, select Drop from the Actions menu.
File Watchers

A file watcher is an Oracle Scheduler object that defines the location, name, and other properties of a file whose arrival on a system causes the Scheduler to start a job. You create a file watcher and then create any number of event-based jobs or event schedules that reference the file watcher. When the file watcher detects the arrival of the designated file, it raises a file arrival event. The job started by the file arrival event can retrieve the event message to learn about the newly arrived file.

The File Watchers page displays the file watchers created in a tabular format. You can perform the following actions:

  • Create: To create a file watcher, see Create File Watcher.
  • Edit: To edit a file watcher, select Edit from the Actions menu at the end of a row. For a description of the fields, see Create File Watcher.
  • Drop: To drop a file watcher, select Drop from the Actions menu.
  • Show DDL: Displays the Data Definition Language statements for the file watcher. To show DDL, select this option from the Actions menu.
Windows

A window is an Oracle Scheduler object that can be used to automatically start jobs or to change resource allocation among jobs during various time periods of the day, week, and so on.

Note:

Creating a window object requires the MANAGE SCHEDULER system privilege. Access to SYS.DBA_RSRC_PLANS dictionary view is required to provide all details and choices.

The Windows page displays windows created in a tabular format. You can perform the following actions:

  • Create: To create a window, see Create Window.
  • Edit: To edit a window, select Edit from the Actions menu at the end of a row. For a description of the fields, see Create Window.
  • Drop: To drop a window, select Drop from the Actions menu.
  • Show DDL: Displays the Data Definition Language statements for the window. To show DDL, select this option from the Actions menu.
Window Groups

A window group is an Oracle Scheduler object that is a list of Oracle Scheduler Windows. Scheduler jobs that are scheduled to be run in a window group will be activated in that time span and using that resource plan for all windows in the group

The Window Groups page displays windows created in a tabular format. You can perform the following actions:

  • Create: To create a window group, see Create Window Group.
  • Edit: To edit a window group, select Edit from the Actions menu at the end of a row. For a description of the fields, see Create Window Group.
  • Drop: To drop a window group, select Drop from the Actions menu.
  • Show DDL: Displays the Data Definition Language statements for the window group. To show DDL, select this option from the Actions menu.

9.6.1 Create Job Class

To create a job class:
  1. In the Job Class page, click Create Job Class.
  2. Enter the following fields:
    • Name: Name of the job class.

    • Description: Optional text string that can be used to describe the job class.

    • Logging Level: Specifies how much information is written to the job log:

      • RUNS: Detailed information for all runs of each job in this class.
      • FULL: RUNS plus all operations performed on all jobs in this class.
      • OFF: No logging.
    • Log Retention Period (days): Number of days that job log entries for jobs in this class are retained. The range of valid values is 0 through 999. If set to 0, no history is kept. If NULL (the default), retention days are set by the log_history Scheduler attribute.

    • Service Name: The database service that the jobs in this class will have affinity to. If no service is specified, the job class will belong to the default service, which means it will have no service affinity and any one of the database instances within the cluster might run the job.

    • Resource Consumer Group: Resource consumer group this class is associated with. If no resource consumer group is specified, the job class is associated with the default resource consumer group.

  3. Click Create.

9.6.2 Create File Watcher

To create a file watcher:
  1. In the File Watchers page, click Create File Watcher.
  2. Enter the following fields:
    • Enabled: Enables the file watcher. (Causes the DBMS_SCHEDULER.ENABLE procedure to be called after the file watcher is created.)

    • Name: Name of the file watcher.

    • Description: Optional descriptive text.

    • Destination: Name of an external destination. You create an external destination by registering a remote Scheduler agent with the database.The view ALL_SCHEDULER_EXTERNAL_DESTS lists valid external destination names. If this parameter is null, the file watcher is created on the local host.

    • Credential Name: Name of a valid credential object. The file watcher uses the credential to authenticate itself with the host operating system to access the watched-for file. The file watcher owner must have EXECUTE privileges on the credential.

    • Directory Path: Directory in which the file is expected to arrive. The single wildcard '?' at the beginning of the path denotes the Oracle home path. For example, '?/rdbms/log' denotes the rdbms/log subdirectory of the Oracle home directory.

    • File Name: Name of the file to look for. Two wildcards are permitted anywhere in the file name: '?' denotes any single character, and '*' denotes zero or more characters.

    • Min File Size: Minimum size in bytes that the file must be before the file watcher considers the file found.

    • Steady State Duration: Minimum time interval that the file must remain unchanged before the file watcher considers the file found. Cannot exceed one hour. If null, an internal value is used. The minimum value is 10 seconds. Oracle recommends similar steady state duration values for all file watchers for efficient file watcher job operation. Also, the repeat interval of the file watcher schedule must be equal or greater than the steady state duration value.

  3. Click Create.

9.6.3 Create Window

To create a window:
  1. In the Windows page, click Create Window.
  2. Enter the following fields:
    • Name: Name of the window.

    • Description: Optional descriptive text.

    • Enabled: Enables the window. (Causes the DBMS_SCHEDULER.ENABLE procedure to be called after the window is created.)

    • Resource Plan: The resource plan that automatically activates when the window opens. When the window closes, the system switches to the appropriate resource plan, which is usually the plan that was in effect before the window opened, but can also be the plan of a different window. Only one resource plan can be associated with a window. It null, the resource plan in effect when the window opens stays in effect for the duration of the window. If an empty string, the resource manager is disabled for the duration of the window. If the window is open and the resource plan is dropped, then the resource allocation for the duration of the window is not affected.

    • Duration: The length of time that the window stays open. Can range from one minute to 99 days.

    • Priority: Relevant when two windows overlap. Because only one window can be in effect at one time, the window priority determines which window opens. The two possible values for this attribute are HIGH and LOW. A high priority window has precedence over a low priority window, therefore, the low priority window does not open if it overlaps a high priority window.

    • Execution Mode: Repeating or Schedule:

      • For Repeating, specify the Repeat Interval and optionally the Start Date and End Date.

      • For Schedule, select the name of the Schedule to be used.

  3. Click Create.

9.6.4 Create Window Group

To create a window group:
  1. In the Window Groups page, click Create Window Group.
  2. Enter the following fields:
    • Name: Name of the window group.

    • Description: Optional comments.

    • Enabled: Enables the window group. (Causes the DBMS_SCHEDULER.ENABLE procedure to be called after the window group is created.)

    • Available Windows: Lists all Scheduler windows.

    • Selected Windows: List windows to be added to the window group. Use the arrow icons to move selected windows or all windows from one list to the other.

  3. Click Create.