Create a Job
You can create a SQL job to perform administrative operations on a single Managed Database or a Database Group.
The information provided when creating a job is to enable the following components to connect and interact:
- The single Managed Database or the Database Group on which the job will be executed.
- For External Databases, the Oracle Cloud Infrastructure Management Agent that is installed on a host and has a
connection to the External Database is used to execute the job.
Note
The Management Agent is not required for Oracle Cloud Databases and Autonomous Databases. - The Oracle Cloud Infrastructure Object Storage bucket in which job results for a Query type job are stored.
To create a job:
You can click the Actions icon () for the job and perform the following tasks:
- View details: Click to go to the Job details page and view the details of the job, job runs and executions, the associated Managed Databases on which the job is executed, and perform tag-related tasks. For more information, see Monitor Job Runs and Executions.
- Clone job: Click to clone the job.
- Edit job: Click to edit the details of scheduled repeating jobs in Active state.
- Move job: Click to move the job from the current compartment to another compartment.
- Delete job: Click to delete the job.
On the Runs tab in the Jobs section, you can view the associated job runs and executions. The job runs for the time period selected in the Time period field are displayed along with an overview of the status of the job executions: Succeeded, Failed, and In progress. You can click the execution status links to filter the executions by status.
You can build metric queries and
create alarms on the job execution status in the Oracle Cloud Infrastructure Monitoring service using the
dbmgmtJobExecutionsCount
metric. For more information, see
Database Management Metrics for Oracle Databases.
Here's an example of a query that you can use to create a "failed job" alarm:
dbmgmtJobExecutionsCount[1m]{managedDbId = "<OCID of the Oracle Database>", status = "Failed"}.mean()
In the query, the managedDbId
dimension is used to
notify you of any failed jobs for the Managed Database whose OCID is mentioned in
the query. Similarly, you can use the following dimensions:
managedDbGroupId
: To be notified of failed jobs for all the Managed Databases in a Database Group.jobId
: To be notified if a particular job fails.
For more information on how to create an alarm, see Creating a Basic Alarm.