How Enterprise Manager Detects the Version of Oracle Databases

You know that patch numbering has been changed since November 2015, and the new format replaces the numeric 5th digit of the bundle version with a release date in the form “YYMMDD”. Let’s say you applied PSU 160719 to your 11.2.0.4 database, the exact version of your database becomes 11.2.0.4.160799. We also know that PSUs do not change the Oracle release version information that can be queried from v$version (Doc ID 861152.1), so when you query your database, you still see 11.2.0.4.0:

On the other hand, when you list your database targets on Oracle Enterprise Manager, it shows the exact version of Oracle Database.

Create Blackout for Multiple Targets on EM13c

The notifications emails of a “planned” downtime is one of the annoying things of monitoring systems. You forget creating blackout and you start a maintenance work, and you get lots of notifications mails. Most of the time, the target which goes down, also affect other targets so it will multiple the number of unwanted notifications mails. Good thing is, it’s very easy to create blackouts on EM13c. We can do it through web console, emctl or emcli tools. A one-liner is enough for it:

The above code will create a blackout for the all targets on the server. We can achieve the same thing by EMCLI:

If we use emcli, we have more options such as creating repeating blackouts, entering a reason for blackout, enabling blackout for a group of targets (which resides on different hosts).

Database Server Generated Alerts and Enterprise Manager

You installed Oracle Enterprise Manager Cloud Control, added your production databases to the Enterprise Manager system. You set up the metric thresholds, monitoring templates and notification rules. Everything was looking OK until you got a warning email about “Current Open Cursors Count”. It was surprising because you didn’t set any threshold for it.

You checked the “Metric and Collection Settings” page to be sure that you didn’t set up any threshold, and you were right!

You wanted to edit the metric from the event details page, and all you got is “The metric data can not be found.” error. So what is happening?

Who Decommissioned My Enterprise Manager Agent?

I prefer to write blog posts about the interesting questions on OTN. This blog post is one of them. There are usually more than one EM admins managing the systems, and you may want to track other users’ activity. Enterprise Manager Cloud Control provides auditing mechanism called “comprehensive auditing”. It’s not enabled by default for all actions because it may consume a lot of disk space.

If you want to enable it for all actions, you should use “emcli” tool:

After you enable comprehensive auditing for all actions, you can go to “setup” >> “security” >> “audit data” to see all audited actions.

The audit data page, provides filtering on audit records so I can easily list who deleted a target from the system.

EMCLI: Add a Database Target with Specific DB System Name

On Oracle Community forum, I’ve seen a good question about using EMCLI to add targets. The forum user says that they decided to name the database targets with combining db_name and hostname. As you may know, when you add a database target, EM also creates a database system for the new target (or assign it with an existing one). The new database system’s name is generated by adding “_sys” to the database target name. Let’s we add a database target named TEST, EM will create a database system as TEST_sys. If we name our database target as “TEST_test.gokhanatil.com”, EM will create a database system named “TEST_test.gokhanatil.com_sys”.

In my personal opinion, Enterprise Manager provides enough flexibility to report these information so I wouldn’t use this kind of naming system but that’s not the point. As you see, it works well for stand alone databases but when you add a standby database to this system, it becomes confusing. For example, your TESTSTBY_stby.gokhanatil.com will be part of TEST_test.gokhanatil.com_sys. So the forum user asks if we can give a specific name to the database system instead of default naming. For example, our database system will be named as TEST_sys although its members are TEST_test.gokhanatil.com and TESTSTBY_stby.gokhanatil.com.