Skip Headers
Oracle® Enterprise Manager Grid Control Quick Start Guide
10g Release 2 (10.2)

Part Number B28678-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

6 Job System

Today's IT environments are composed of many sets of components. You need to minimize the time needed to support those IT components and eliminate the human error associated with component maintenance. The Enterprise Manager Grid Control Job System provides the capacity to automate routine administrative tasks and synchronize components in your environment so you can manage them more efficiently.

The following sections help you work with the Job System:

6.1 Jobs

A job is a schedulable unit of work that you define to automate commonly run tasks. A job is defined by its name, description, owner, parameters, targets, and schedule. Jobs are composed of steps.The Enterprise Manager Job System supports the automation of many administrative tasks, for example, backup, cloning, and patching, and enables users to create their own jobs using their own custom OS and SQL scripts. One of the advantages of the system is that you can schedule a job to start immediately or start at a later date and time. You also have the option to have the job run once or at a specific interval, for example, three times every month. Job results are displayed on the target's home page.

Multi-task jobs allow you to create complex jobs consisting of one or more distinct tasks. Because multitask jobs can run against targets of the same or different type, they can perform spontaneous operations on one or more targets of the same or different type.

6.1.1 Scenario: Jobs

Linda can set up various administrative jobs for her environments and schedule them to run at a later stage. One of the jobs that she would like to schedule is to back up some of her databases. This involves other tasks, such as shutting down listeners and the databases. Linda can make use of a multitask job for this purpose.

6.1.2 Scheduling a Multitask Job

A job can be defined from the Job Activity page, Job Library page, or from other pages of Enterprise Manager. All job runs and executions can be displayed on the Job Activity page, and all library jobs can be displayed on the Job Library page.

In this topic, Linda will see how to define a backup job for a database.

To define a backup job:

  1. Click the Jobs tab from the Grid Control console.

  2. Select Multi-Task in the Create Job list and click Go.

    The Create Multi-Task Job wizard appears.

  3. In the General page, specify a name for the task, and in the Targets field, select Different targets for different tasks.

    For each task that you create within this multitask job, you can specify a type of target and pick either individual targets or a group. If a selected group contains targets of different types, tasks are run on only the applicable targets. For example, a Shutdown Listener job type will only be run on Listener targets even though the group may contain targets of other types.

  4. Click the Tasks subtab.

    You can click Add to add several tasks in this page. For example, to create a job to back up a database, Linda can make use of a multi-task job as follows:

    1. Create a task to shut down listeners by using the OS Command type of task, specifying the Target Type as Listener and the following command as the parameter:

      %OracleHome%/bin/lsnrctl stop
      
      
    2. Create a task to shut down databases by using the Shutdown Database type of task.

    3. Create a task to back up databases by using the RMAN Script type of task. You can build a dependency between this task and the previously added one by selecting the Condition as On Success and the Depends On task as Shutdown Database. An RMAN script you could use is as follows:

      backup device type disk tag '%TAG' database include current controlfile;

    4. Create a task to start up databases by using the Shutdown Database type of task.

    5. Create a task to start up listeners by using the OS Command type of task, specifying the Target Type as Listener and the following command as the parameter:

      %OracleHome%/bin/lsnrctl start
      
      

    The Tasks page in the Create Multi-Task Job wizard appears listing all the tasks created.

    Tasks tab of the Create Multi-Task Job wizard
  5. Click Schedule to specify a schedule to run the multitask job.

  6. Click Access to grant other administrators access to this job.

  7. Click Save to Library to save the job in the library.

Linda can later select this job and edit or submit it.

6.2 Job Activity

Job executions are usually associated with one target, for example, a backup job on a particular database. Some executions have multiple targets, for example, comparing hosts. Other executions have no targets, for example, the RefreshFromMetaLink job. When you submit a job to many targets, it would be tedious to examine the status of each execution of the job against each target. With the Job System, you can easily get these answers viewing the "job run." A job run is the sum of all job executions of a job that ran on a particular scheduled date.

In addition to supporting the standard job operations of create, edit, create like, and delete, the Job System allows you to suspend and resume jobs, as well as retry failed executions. For example, you may need to suspend a job if a needed resource was unavailable, or the job needs to be postponed. Once you suspend a job, any scheduled executions do not occur until you decide to resume the job. When analyzing a failed execution, it is useful to be able to retry a failed execution after the cause of the problem has been determined rather than create a new job.

After you submit jobs, the status of all job executions across all targets is automatically rolled up and available for review on the Grid Control Console Home page and on the Job Activity page. This information is particularly important when you are examining jobs that execute against hundreds or thousands of systems and want a quick way to determine the job executions that have failed.

6.2.1 Scenario: Job Activity

Linda would like to see if her backup job completed. If it did not complete, she would like to examine which step of the job failed and why.

6.2.2 Monitoring a Job

In this topic, Linda will see how to analyze and monitor the jobs that she had submitted.

To monitor a job:

  1. Click the Jobs tab from the Grid Control console.

    The Job Activity page appears. By default, it shows a list of Active jobs. You can select a job, view its results, create another job like it, or copy it to a library. You can also, edit, suspend, resume, stop, or delete it. You can also click a job to go to its home page and see details.

    Job Activity page
  2. To narrow down the listing of jobs, specify search criteria and click Go.

    You can search for jobs by name or criteria. You can also choose to view either executions or runs. You can also specify advanced search options, such owner, job type, target type and so on.

  3. Click the job that you want to inspect.

    The Job Run page appears showing details of executions on various targets. You can perform various operations from this page, the way you can from the Job Activity page.

    Job Run details page
  4. Select a failed execution and click Suspend so that you can examine it.

  5. Click the failed execution to see its details.

  6. Remedy any problems that you can identify and click Retry.

Linda can similarly ensure that the job runs successfully on all the targets on which she wants it to run.

6.3 Job System: Oracle By Example Series

Oracle By Example (OBE) has a series on the Oracle Enterprise Manager Grid Control Quick Start Guide.

The Creating Jobs OBE covers the tasks in this chapter with annotated screen shots. It is located at

http://www.oracle.com/technology/obe/obe10gEMR2/Quick_Start/jobs/creating_jobs.htm