The goal of this tutorial is to show you how to create single-task
and multi-task jobs as well as set up the e-mail notifications about the job
status.
The Oracle Enterprise Manager 10g Release 2 job system is
a repository-based system that enables users to submit and schedule jobs to
run one or more times. The person who submits the job is the owner. Jobs can
consist of everything from cloning Oracle homes to custom OS jobs. All job outputs
and logs are recorded for review.
Single-task jobs encapsulate one task as a scheduled unit
of work, whereas a multi-task jobs represent several tasks in the same unit
of work. These tasks may be run against the same target or segregated for different
targets.
Each task in a multi-task job may be executed based on the
condition of the preceding task in the list. The Initialization Error Handling
Task runs if any task in the list causes an initialization error.
The Notification System which is associated with jobs allows
administrators to receive notifications through e-mail on the status of jobs.
| 1. |
Open the browser and enter the following URL:
http://<management
service hostname>.<domain>:<port>/em/
The default port value on a clear machine is 7777.
However, if there are other instances running on the machine, then the
port may be different.
The login page will be displayed. Enter the User Name and Password,
and then click the Login button.

|
| 2. |
The Oracle Enterprise Manager 10g Grid Control Home page appears showing you a high-level summary
of your entire environment. Click the Jobs tab.

|
| 3. |
Select the Startup Database option from the Create Job drop-down
list. Click Go.

|
| 4. |
Enter the name and description of the task. Click the Add button
to add database targets.

|
| 5. |
Select any database target and click the Select button.

|
| 6. |
Click the Parameters subtab.

|
| 7. |
Select the appropriate startup mode and initialization parameter. Click
the Credentials subtab.

|
| 8. |
Select Override Preferred Credentials and enter the appropriate
values. Click the Schedule subtab.
|
| 9. |
Schedule the task and click the Access subtab.

|
| 10. |
Select the status values for E-Mail Notification for Owner and click
the Submit button.

|
| 11. |
The confirmation page appears. You have successfully created a new
single-task job.

|
| 1. |
Select the Multi-Task option from the Create Job drop-down list
and click Go.

|
| 2. |
Enter the name and description of the Multi-Task job, and select Database
Instance as Target Type. Click the Add button to add database
targets.

|
| 3. |
Select any database target and click the Select button.

|
| 4. |
Click the Tasks subtab.

|
| 5. |
Add the first task. Select Shutdown Database from the Type drop-down
list. Click the Add button.

|
| 6. |
Enter the name of the first task and click the Parameters subtab.

|
| 7. |
Select Immediate as the shutdown mode. Click the Credentials
subtab.

|
| 8. |
Select Override Preferred Credentials and enter appropriate values.
Click Continue.

|
| 9. |
Add the second task. Select SQL Script from the Type drop-down
list . Click the Add button.

|
| 10. |
Enter the name of the second task. Click the Parameters tab.

|
| 11. |
Enter the name of the backup script. Click the Credentials subtab.

|
| 12. |
Select Override Preferred Credentials and enter appropriate
values. Click Continue.

|
| 13. |
Add the third task. Select Startup Database from the Type drop-down
list . Click the Add button.

|
| 14. |
Enter the Name of the third task. Click the Parameters subtab.

|
| 15.. |
Select the appropriate startup options. Click the Credentials subtab.

|
| 16. |
Select Override Preferred Credentials and enter appropriate
values. Click Continue.

|
| 17. |
Click the Schedule subtab.

|
| 18. |
Schedule the task and click the Tasks subtab.

|
| 19. |
Define an Initialization Error Handler Task for all jobs in this Multi-Task
Job. Click the Add button.

|
| 20. |
Select OS Command from the Type drop-down list. Click Continue.

|
| 21. |
Enter the name of the Initialization Error Handler Task. Click the
Parameters subtab.

|
| 22. |
Enter the name of the error handler script. Click the Credentials
subtab.

|
| 23. |
Select Override Preferred Credentials and enter the appropriate values.
Click Continue.

|
| 24. |
The Error Handler Task is defined.

|
| 25. |
Click the Access subtab.

|
| 26. |
Select all status values for E-Mail Notification for Owner and click
the Submit button.

|
| 27. |
The Confirmation page appears. You have successfully created a new
multi-task job.

|