• About

OraManageability

~ Advanced Oracle Systems Management

OraManageability

Tag Archives: OEM Jobs

Turn OEM Job Output into Lists

30 Thursday Jun 2016

Posted by raysmithace in OEM 12c, SYSMAN

≈ Leave a comment

Tags

OEM 12c, OEM Job Results, OEM Jobs, Oracle Enterprise Manager, sysman, sysman.mgmt$job_step_history

Context

We have an OEM job that we run after each system-wide Unix password change to verify success on all hosts.

The OEM Job is run against Dynamic Groups of hosts.  In this example I’ve limited it to the group DBHosts.

check_pwd_job2

The job consists of a very simple call for id

check_pwd_job01

The Credentials for the job contain the new password, of course.

The job quickly tries to connect to each host with that named named credential and either succeeds or throws an error.  The Job’s screen output provides immediate feedback to the operator, but I need to share the list of exceptions with Operations so they can correct it.

Gathering Data

Job results are stored in sysman.mgmt$job_step_history. We can run a simple query to find our exceptions.  The list I sent to Operations excluded the end_time and status.

SELECT target_name,
       end_time,
       status
FROM sysman.mgmt$job_step_history
WHERE job_name LIKE 'CHECK ORACLE PASSWORD%'
 AND  status NOT IN ( 'Succeeded' )
 AND  end_time > SYSDATE - 7
ORDER BY target_name;

check_pwd_job3

OMS Configuration Backup

15 Tuesday Mar 2016

Posted by raysmithace in emctl, OEM 12c, Shell scripts

≈ 2 Comments

Tags

exportconfig, OEM 12c, OEM Jobs

The Job system in OEM provides a flexible and reliable means of scheduling custom activities. This can be particularly handy for managing OEM itself.

Backing up the configuration of your management server is essential for recovery and the Job system is great tool for scheduling it.

Job Creation

Start by creating a Job through Enterprise | Job | Job Library.  Select OS Command from the Create Library Job dropdown.

OMS_Backup01

On the General tab give the job a name and description, then associate it with the OMS server hosting the Admin Server for your cluster

OMS_Backup02.png

On the Parameters tab

  • Select Script as the Command Type
  • Create a script in the OS Script block from this sample, inserting your own paths and sysman password.  The directory referenced as BU_DIR should be on your shared drive containing the Software Library
  • Enter your command interpreter (/bin/bash in this example)

OMS_Backup03

Associate the job with your appropriate named credential on the Credentials tab.

Create an initial schedule in the Schedule tab. We’ll come back to this page when we run a test later.

OMS_Backup04

Save your new job to the library

OMS_Backup05

Test It

You’ll be returned to the Job Library page.  Click the radio button for your new job and press the Submit button

OMS_Backup06

Go to the Schedule tab and select One Time (Immediate).

OMS_Backup07

Click-through on the job name (OMS BACKUP 1.0 in this example) to follow your progress

OMS_Backup08

OMS_Backup09

Follow-up

  1. Visit the OMS server and verify that file was created where you expected it.  Do this again in a few days to verify that the job is running as scheduled
  2. Check back with the Job Activity  page in a couple days.
  3. Create another job to clean up older backup files

 

 

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • March 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • June 2016
  • May 2016
  • March 2016
  • January 2016
  • December 2015
  • November 2015
  • September 2015
  • August 2015
  • June 2015
  • May 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • July 2014
  • June 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • March 2013
  • February 2013
  • January 2013

Categories

  • BetterTouchTools
  • BI Publisher
  • CAcert
  • EM 12.1.0/4
  • emctl
  • LDAP
  • My Oracle Support
  • ODSM Oracle Directory Services Manager
  • OEM 12c
  • OEM 13c
  • OEM Blackout
  • OEM Named Credentials
  • opmnctl
  • Oracle Inventory
  • Patching
  • PDP
  • Shell scripts
  • startManagedWebLogic.sh
  • SYSMAN
  • Uncategorized
  • updatecomponentregistration
  • User Community Development
  • VirtualBox

Meta

  • Register
  • Log in

Social media

  • View @raysmithace’s profile on Twitter
  • View smithray’s profile on LinkedIn

Top Clicks

  • f5.com/pdf/deployment-gui…
  • community.oracle.com/comm…
  • oracle.com/technetwork/oe…
  • boastr.net
  • oracle.com/technetwork/da…

Blog at WordPress.com.

Cancel