Oracle Enterprise Manager EMCLI and Java 1.8

Java 1.8 is the current version and you probably use it on your personal computer. Although EMCLI says it will work on Java 1.6 and newer versions, if you install it using Java 1.8, you get an error when you try to setup or synchronize it with the Enterprise Manager Cloud Control OMS server. The reason is that Java 1.8 will use TLS 1.2 as default protocol for secure connections.

To fix the problem, you need to download and apply Patch 17555224 for FMW 11.1.0.6.0 version. You can learn more from My Oracle Support Doc ID 1930390.1.

Using EMCLI to Create Named Credentials

One of my blog readers asked me to write a sample EMCLI codes to create named credentials for Database. To be able to create a named credential, you need to know the target name (unless you create a global credential), target type and credential type associated with the target type. Let’s say I want to create a named credential for my database named “TESTDB”. First I need to login to our EM12c server, and list targets named “TESTDB”:

The % sign after the TESTDB means any target type (be careful about the colon (:) symbol between target name and target type). So we know that our TESTDB is an “oracle_database”. I’m sure you will memorize most of the target types after you start to work with EMCLI but I still prefer to check them before executing commands. Now we need to get the credential types (and their attributes) associated with “oracle_database”:

EMCLI “session expired” Error and FQDN

In my previous post, I demonstrated how to use emcli to download new agent software and import them to Enterprise Manager Cloud Control. One of my readers told me that emcli gives “session expired” error when he tries to import catalog file. First I thought he does not run the commands in time so emcli session expires but I get the same error in one of my test servers.

I checked the logs and found the bug 10625373 in My Oracle Support. According to the bug, you get this error if you do not use a fully qualified domain name (FQDN) of the OMS server for emcli setup (or while installing Enterprise Manager Cloud Control). You need to re-setup emcli and use a FQDN or you can use “auto-login” to fix this problem.