Monday, December 17, 2012

Introducing django and mysql

I wanted to do some rapid prototyping with web applications, and decided to give python and django a go. There are various tutorials out there, but none of them seem to focus on using existing database structures and views.

So this is primarily to document my own findings. If someone else finds it useful: be my guest. ;-)

Oracle OMS Agent migration

I've recently migrated a few Oracle databases to Enterprise Manager 12c. While this is worth a few posts on it's own, here's just a quick hint of how to update the IP/hostname of an agent after it's been registered at OEM.

First, verify that the agent is responding to requests, by navigating to the new IP/host with your browser:
https://my.new_server.lan:3872/emd/main/
Then log on to the OEM repository DB as sysman. The table MGMT_TARGETS holds all the juicy agent details. Just update the column EMD_URL with the new value, and everything is fine.
For instance
update mgmt_targets set emd_url=replace(emd_url,'my.server.lan','my.new_server.lan')  where target_name like '%my.server.lan%';
Verify your changes in the view MGMT$TARGET.
Finally the agent should be available in Setup - Agents at once. I then resync'd the agent from EMS, and secured the agent. All targets were up and running without issues then.