One of the greatest advancements in EM12c from previous Enterprise Manager versions is the auto-deployment.  I have a number of clients with Windows environments and upon another recent search on Google, I found that there was a consistent and solid recommendation of installing Cygwin, (or another shell emulator installation) to utilize the auto-deploy.  There is a large amount of work that is required to perform the pre-requisites to then take advantage of the auto-deploy, so I’m thrilled when I see someone recommend using the silent installation with Windows installation.  I’m aware that I, along with others, have created posts that demonstrate silent deployments, but not JUST for Windows, so here it is!

The Software Library

A silent deploy demands a software library for a download the agent zip file to.  This must be pre-configured beforehand.

To configure the software library, log into the EM12c environment and go to the software library:



In the Software Library administration section, click on ADD.

Enter a name and location for the software library, ensure you’ve already created the folder names in Windows to ensure success.



Click on OK

You will see the software library in the list:



You will now use this directory to download the agent deployment zip files to.

Download the Agent Deployment Files

Deployment is done by the Enterprise Manager Command Line Interface, (EMCLI).   The emcli is ready with EM12c, release 2, but you need to set the environment up to support the emcli.  The JAVA_HOME must be set before your Windows emcli will work correctly.  Either set it in the environment variables or set it at the command line.  It must be java 1.6 or greater to work with emcli.

set JAVA_HOME=C:\Progra~2\Java\jre7

Log into the EMCLI as SYSMAN or user with agent deployment privs:

E:\app\oracle\em12c\oms\BIN>emcli login -username=sysman
Enter password :
Login successful

Syncronize the EMCLI so that it is up to date with the repository:

E:\app\oracle\em12c\oms\BIN>emcli sync
Synchronized successfully

Query the repository to get what agents are in the repository:

E:\app\oracle\em12c\oms\BIN>emcli get_supported_platforms
Getting list of platforms ...
Check the logs at E:\app\oracle\em12c\gc_inst\em\EMGC_OMS1\sysman\emcli\setup/.emcli/agent.log
About to access self-update code path to retrieve the platforms list..
Getting Platforms list ...
Version =
 Platform = Microsoft Windows x64 (64-bit)
Platforms list displayed successfully.


Deploy the Agent 

OK, time to download it to the software drive.  The syntax asks for the destination, which we list, along with the exact name of the platform of the agent that we want and the version:


emcli get_agentimage -destination=E:/sw_lib/12.2 –platform="Microsoft Windows x64 (64-bit)" –version=
Platform:Microsoft Windows x64 (64-bit)
 === Partition Detail ===
Space free : 20 GB
Space required : 1 GB
Check the logs at E:\app\oracle\em12c\gc_inst\em\EMGC_OMS1\sysman\emcli\setup/.emcli/get_agentimage_2013-10-24_12-55-31-PM.log

A zip file now resides in the download folder:



Copy this file over to the target server that you wish to deploy the EM12c agent to and unzip the file:

You will see a list of files, (depending on version of EM12c, output may vary some…) but there are two files you are mainly interested in:

agentDeploy.bat     Batch file to deploy the agent.

agent.rsp                     Agent response file that requires configuration.

The agent.rsp requires the following changes made: #OMS Host Server name
EM_UPLOAD_PORT=4800 #Upload port for OMS
AGENT_REGISTRATION_PASSWORD=pssword #You can add a new one in security if you don't already have.
AGENT_INSTANCE_HOME=E:\app\agent12c #Installation directory on new target
AGENT_PORT=3872 #Agent port
b_startAgent=true #Name of target host
s_agentHomeName=TRGT_ORCL #Name of the target in EM12c

Save the changes and execute the batch file to deploy the agent:

agentDeploy.bat AGENT_BASE_DIR=E:\app RESPONSE_FILE=E:\app\\agent.rsp
E:\>agentDeploy.bat AGENT_BASE_DIR=E:\app RESPONSE_FILE=E:\\agent.rsp
Present working directory:E:\
Archive location:E:\ directory
Agent base directory:E:\app
Agent base directory:E:\app
OMS Host:
Agent image loc : "E:\"
E:\app configonlyfalse
Reading the properties file: "E:\"\
 1 file(s) copied.
This is the version
This is the type core
This is the aru id 233
"Validating the OMS_HOST & EM_UPLOAD_PORT"
"Executing command : E:\app\core\\jdk\bin\java -classpath E:\app\core\\jlib\agentInstaller.jar:E:\app\core\\oui\jlib\OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller E:\app\core\ "E:\
Validating oms host & port with url:
Validating oms host & port with url:
Return status:3
"Executing command : E:\app\core\\jdk\bin\java -classpath E:\app\core\\jlib\OraInstaller.jar:E:\app\core\\sysman\jlib\emInstaller.jar:E:\app\core\\jlib\xmlparserv2.jar:E:\app\core\\jlib\srvm.jar:E:\app\core
Executing agent install prereqs...
Executing command: E:\app\core\\oui\bin\setup.exe -ignoreSysPrereqs -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion -prereqlogloc E:\app\core\\cfgtoollogs\agentDeploy -entryPoint -detailedEx
Prereq Logs Location:E:\app\core\\cfgtoollogs\agentDeploy\prereq<timestamp>.log
Agent install prereqs completed successfully
Cloning the agent home...
Executing command: E:\app\core\\oui\bin\setup.exe -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=E:\app\core\ -responseFile E:\\agent.rsp AGENT_BASE_DIR=E:/app AGENT_BASE_DIR
Clone Action Logs Location:C:\Program Files\Oracle\Inventory\logs\cloneActions<timestamp>.log
Cloning of agent home completed successfully
Attaching sbin home...
Executing command: E:\app\core\\oui\bin\setup.exe -ignoreSysPrereqs -attachHome -waitForCompletion -nowait ORACLE_HOME=E:\app\sbin ORACLE_HOME_NAME=sbin12c1 -force
Attach Home Logs Location:E:\app\core\\cfgtoollogs\agentDeploy\AttachHome<timestamp>.log
Attach home for sbin home completed successfully.
Updating home dependencies...
Executing command: E:\app\core\\oui\bin\setup.exe -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={E:\app\sbin:E:\app\core\,} -invPtrLoc E:\app\core\\oraInst.loc -force
Update Home Dependencies Location:E:\app\core\\cfgtoollogs\agentDeploy\UpdateHomeDeps<timestamp>.log
Update home dependency completed successfully.
Performing the agent configuration...
Executing command: E:\app\core\\oui\bin\runConfig.bat ORACLE_HOME=E:\app\core\ RESPONSE_FILE=E:\app\core\\agent.rsp ACTION=configure MODE=perform COMPONENT_XML={} RERUN=true
Configuration Log Location:E:\app\core\\cfgtoollogs\cfgfw\CfmLogger<timestamp>.log
Agent Configuration completed successfully
Agent deployment log location:
Agent deployment completed successfully.

A couple times, you will see the Oracle Installer come up and you may see an error with an opportunity to close the program or repair.  Choose to not close and let it continue, it’s an issue as the Installer attempts to login in without direct admin privileges, but it does recover.

You have now deployed the agent successfully and you can now log back into your EM12c and see the target host you just deployed.  If you have auto-discovery, the secondary targets will be discovered and configuration completed or you can manually discover targets from this point.


This is all there is to deploying in Windows and not one Cygwin installation in sight! :)


« »