Promoting Unmanaged Targets Automatically

Recently a customer asked if it was possible to promote unmanaged targets automatically without any interaction. They were already using auto-discovery.

The answer is yes, and of course as soon as you see words like “without any interaction” you know there’s going to be scripting involved. In the Enterprise Manager world, scripting is handled by the EM Command Line Interface, better known as EMCLI. I’ve posted some example scripts of using EMCLI a while back (see this post), but I thought it was worthwhile to show you how this particular request is handled as well. If you have the latest bundle patch on either or, you can also use additional parameters to the get_targets verb to list discovered targets (-unmanaged). This includes listing the associated instance targets if you want to promote a RAC database (-associations).

Now on to the script. This one is a python script which promotes some or all single instance databases, just as an example. And of course, all the usual caveats apply – use at your own risk, Oracle does not support this script, yaddah yaddah yaddah. 🙂 The script comes courtesy of my boss, Dave, so if there’s something wrong you can blame him!

Since WordPress does some funky stuff with lesser than and greater than signs, it’s easiest if I post this as a file, so here’s the link to the file on DropBox. If DropBox is blocked by your work, just shoot me an email and I’ll get a copy of it to you that way.

Hope that example is of use to you!


After 22 years of working at Oracle in just about every role except Marketing and Support, I am now working as a Senior Managed Services Consultant with Data Intensity, specializing in Oracle Database technology, High Availability and Disaster Recovery solutions. I am also a member of the OakTable Network, and have presented at RMOUG Training Days, Hotsos Symposia, Oracle OpenWorld conferences, and other user group events. I have co-authored the Expert Oracle Enterprise Manager 12c and Practical Oracle Database Appliance books published by Apress, and am one of the authors of the Building Database Clouds in Oracle Database 12c book published by Addison Wesley.

Comments are closed.