Home » RDBMS Server » Enterprise Manager » How to extract MGMT_JOB info (OEM 10g / 11g)
How to extract MGMT_JOB info [message #468913] Mon, 02 August 2010 08:39 Go to next message
paul_hallam
Messages: 3
Registered: August 2010
Location: UK
Junior Member
I want to extract all OEM Job schedule information so that we can recreate the jobs on a different OEM should the need arise; e.g.
Our network A OEM grid control system fails completely.
We decide to connect all databases on network A to an OEM grid control system on Network B.
Once all agents are switched over to network B we need to recreate and schedule all the OEM jobs that were running from the OEM on A to the new OEM.

Does anyone know any sql that will get the job info from sysman.mgmt_jobs (and related tables) which I can run on a regular basis OR how to merge the mgmt_job.. tables from one oem into a second oem without corrupting the data alreeady in the second oem ?
icon12.gif  Re: How to extract MGMT_JOB info [message #468962 is a reply to message #468913] Mon, 02 August 2010 12:11 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
All jobs scheduled through Grid Control actually reside on the target server(s), not in the GC repository.

If you move GC to another server, all you need to do is reconnect each agent with the new repository and you get all you jobs.

[Updated on: Mon, 02 August 2010 12:16] by Moderator

Report message to a moderator

Re: How to extract MGMT_JOB info [message #469072 is a reply to message #468962] Tue, 03 August 2010 03:08 Go to previous messageGo to next message
paul_hallam
Messages: 3
Registered: August 2010
Location: UK
Junior Member
Apologies but I must disagree.

Firstly I have moved two nodes to the new server and the jobs did not appear.
Secondly, using dbms_job and dbms_scheduler the jobs do not appear on the hosts in question BUT looking at the mgmt_jobs tables on the GC host the jobs are there in the GC repository.
As these are GC library jobs scheduled to run on the targets selected in the OEM screens I do firmly believe (although I am willing to be proved wrong) that these jobs are only defined in the GC repository and not on the individual hosts.

Regards

Paul
Re: How to extract MGMT_JOB info [message #469139 is a reply to message #469072] Tue, 03 August 2010 08:57 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member

Perhaps GC does keep some kind of information about the jobs, but the case is that even if GC fails, the jobs will continue executing never the less.

I know there is an undocumented DBMS package to manage the repository, but you may need to open SR with Oracle to get the correct syntax.

Good luck!
Re: How to extract MGMT_JOB info [message #469142 is a reply to message #469139] Tue, 03 August 2010 09:05 Go to previous messageGo to next message
paul_hallam
Messages: 3
Registered: August 2010
Location: UK
Junior Member
Many thanks for your reply but:
My experience is that as the jobs are controlled by the GC job activity/library pages then if GC goes down the jobs do not run.

As for Oracle, I did raise an SR and the answers I got from them were generally useless; their answer was to look at the mgmt* tables in gc; A correct statement I will admit but not much use unless I want to sit down and spend two weeks trying to decipher the table structures and relationships and write procedures to extract the data correctly.

Many thanks

Paul
Re: How to extract MGMT_JOB info [message #469158 is a reply to message #469142] Tue, 03 August 2010 10:12 Go to previous message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
paul_hallam wrote on Tue, 03 August 2010 10:05
Many thanks for your reply but:
My experience is that as the jobs are controlled by the GC job activity/library pages then if GC goes down the jobs do not run.


Sure about that?
My experience is that even if GC is down, as long as the agent on the target server is up, the jobs keep executing.

In fact in the early (pre-historic) days of the OEM server, the job (scripts, etc) actually resided on a directory belonging to the "intelligent" agent.

Unfortunately the current client I am working for does not have GC and therefore I cannot confirm or test anything.

On the other hand insist w/Oracle support about the package(s) SYSMAN.MGMT_% (SYSMAN.MGMT_JOB_UI_EXECS for example) which allow access to the MGMT tables.



Previous Topic: too many core.xxx files generated by grid control agent at AGENT_HOME/<HOST>_<SID>/sysma
Next Topic: Changed sysman password, now emctl start oms fails, please help!
Goto Forum:
  


Current Time: Thu Mar 28 04:23:30 CDT 2024