Oracle EMCLI-II

In this short post, I am going to show you how to submit your Oracle jobs from the library and how to monitor your Oracle jobs from the command line. By doing that you can create your automation instead of using Oracle Enterprise Manager web interface.

Before issuing any command below, first you need to authorize Oracle OMS and sync your environment.

Submitting Oracle Jobs from the library.

After submit the job you should get similar output if everything is OK.

Monitor job status:

You can monitor submitted job status.

Getting Execution ID:

Sometimes even your Oracle job finished successfully, Your job may not be finished as an expected. In order to overcome this situation, we can also get the execution detail for the finished job. First thing is the getting the execution id for the submitted job. (T24_EXA03_BACKUP_TEST in our case)

Getting Execution detail:

After possession of execution id. we can get the execution detail.

It prints out  all the job logs in xml format.   As my sample job is RMAN backup, it gives me similar output such this. “Recovery Manager complete”

Executing a Job on the specific target:

In order to submit job on a specific target we need to create oracle property file.

Creating a property file.

Create a file sample.job and add the line below.

Submitting the job specific  target: