Oracle DBA Tips and Techniques

By Arjun Raja

Archive for July, 2012

ORACLE 12C AGENT INSTALL

Posted by Arjun Raja on July 24, 2012

ORACLE 12C LATEST BUNDLE PATCH AGENT INSTALL

Download and unzip patch from technet.oradcle.com –
12.1.0.1.0_AgentCore_212.zip to staging area on server where agent is being installed.

cd :/u01/oracle/stage/12cagent

unzip 12.1.0.1.0_AgentCore_212.zip

Unzips and creates a few files.

Edit the agent.rsp file – make a copy of it before making changes.

vi agent.rsp

Make the following changes –

#??????????????????????????-
#OMS_HOST: OMS host info required to connect to OMS
#EM_UPLOAD_PORT: OMS port info required to connect to OMS
#AGENT_REGISTRATION_PASSWORD: Agent Registration Password needed to # establish a secure connection to the OMS.
#AGENT_INSTANCE_HOME: Agent instance home is the location of agent state directory.
#AGENT_PORT: Agent port on which the agent process should be started. #b_startAgent: Agent will not be started after configuration if the value specified is false.
#ORACLE_HOSTNAME: Fully qualified domain name of host where is the agent is deployed.
#s_agentHomeName:Customized Oracle home name for the agent home. Example: s_agentHomeName=”agent12gR1″
#??????????????????????????-
OMS_HOST=”middba3″
EM_UPLOAD_PORT=”4900″
AGENT_REGISTRATION_PASSWORD=”oracle12c”
AGENT_INSTANCE_HOME=”/u01/oracle/agent12c”
AGENT_PORT=”3872″
b_startAgent=true
ORACLE_HOSTNAME=”xxxxx.xxxxxx.com”
s_agentHomeName=”agent12gR1″
#??????????????????????????-
#s_agentServiceName: Sets the agent Service Name and this variable can be # used to overrite the agent service name calculated by the install. This is
# required for only Windows.
# Example:
# s_agentServiceName = “Oracleagent12gAgent” ; default value # s_agentServiceName = “GridAgent” ; User specified value
#??????????????????????????-
#s_agentServiceName=””

####################################################################################

#Please Don’t change the values of these variables
####################################################################################

#??????????????????????????-
#EM_INSTALL_TYPE: install type
#??????????????????????????-
EM_INSTALL_TYPE=”AGENT”

Save the file agent.rsp –

Make sure the OMS server ip address and alias has an entry in the /etc/hosts if there is no dns entry.

xxxx.xxxx.xxx middba3

Create following directories.

/u01/oracle/agent12c

/u01/oracle/agent12c/install/

/u01/oracle/agent12c/install/logs

This is to avoid failure of plugin being installed with following error – in the /u01/oracle/agent12c/sysman/log/gcagent.log file – if you install without creating the directory above :

2012-07-23 14:41:50,056 [42:F5077C5B] INFO – >>> Dispatching request: PutFileRequest
(/u01/oracle/agent12c/install/logs/oracle.sysman.oh_12.1.0.1.0_DISCOVERY_52.zip len
gth=302837 BIN) <<<
2012-07-23 14:41:50,130 [89:68BCA6D1:JobReader-GCThread-36-89] WARN – JobReader encountered an exception:java.io.IOException: Broken pipe 2012-07-23 14:41:50,136 [42:F5077C5B] INFO – >>> Reporting exception: oracle.sysman.emSDK.agent.client.exception.PerformOperationException: Unable to create file /u01/o
racle/agent12c/install/logs/oracle.sysman.oh_12.1.0.1.0_DISCOVERY_52.zip: No such file or directory

NOW INSTALL AGENT WITH SILENT INSTALL .

cd /u01/oracle/stage/archives >

./agentDeploy.sh AGENT_BASE_DIR=”/u01/oracle/agent12c”
RESPONSE_FILE=”/u01/oracle/stage/archives/agent.rsp”

Log below –

AGENT_BASE_DIR=/u01/oracle/agent12c

-e Validating the OMS_HOST & EM_UPLOAD_PORT
Executing command : /u01/oracle/agent12c/core/12.1.0.1.0/jdk/bin/java
-classpath /u01/oracle/agent12c/core/12.1.0.1.0/jlib/agentInstaller.jar:/u01/oracle/agent12c/core/12.1.0.1.0/oui/jlib/OraInstaller.jar

oracle.sysman.agent.installer.AgentInstaller /u01/oracle/agent12c/core/12.1.0.1.0 /u01/oracle/stage/12cagent /u01/oracle/agent12c -prereq

Validating oms host & port with url: http://xxxxxx:4900/empbs/genwallet Validating oms host & port with url: https://xxxxxxx:4900/empbs/genwallet Return status:3
Unzipping the agentcoreimage.zip to /u01/oracle/agent12c …. 12.1.0.1.0_PluginsOneoffs_212.zip
Executing command : /u01/oracle/agent12c/core/12.1.0.1.0/jdk/bin/java -d64
-classpath /u01/oracle/agent12c/core/12.1.0.1.0/oui/jlib/OraInstaller.jar:/u01/oracle/agent12c/core/12.1.0.1.0/oui/jlib/xmlparserv2.jar:/u01/oracle/agent12c/core/12.1.0.1.0/oui/jlib/srvm.jar:/u01/oracle/agent12c/core/12.1.0.1.0/oui/jlib/emCfg.jar:/u01/oracle/agent12c/core/12.1.0.1.0/jlib/agentInstaller.jar:/u01/oracle/agent12c/core/12.1.0.1.0/oui/jlib/share.jar

oracle.sysman.agent.installer.AgentInstaller /u01/oracle/agent12c/core/12.1.0.1.0 /u01/oracle/stage/12cagent /u01/oracle/agent12c AGENT_BASE_DIR=/u01/oracle/agent12c AGENT_BASE_DIR=/u01/oracle/agent12c RESPONSE_FILE=/u01/oracle/stage/12cagent/agent.rsp

Executing agent install prereqs…
Executing
command: /u01/oracle/agent12c/core/12.1.0.1.0/oui/bin/runInstaller -ignoreSysPrereqs -prereqchecker -silent -ignoreSysPrereqs
-waitForCompletion
-prereqlogloc /u01/oracle/agent12c/core/12.1.0.1.0/cfgtoollogs/agentDeploy -entryPoint oracle.sysman.top.agent_Complete -detailedExitCodes PREREQ_CONFIG_LOCATION=/u01/oracle/agent12c/core/12.1.0.1.0/prereqs -J-DORACLE_HOSTNAME=xxxx.xxxxxxxx.com
-J-DAGENT_BASE_DIR=/u01/oracle/agent12c
Prereq Logs
Location:/u01/oracle/agent12c/core/12.1.0.1.0/cfgtoollogs/agentDeploy/prereq.log Agent install prereqs completed successfully

Cloning the agent home…
Executing
command: /u01/oracle/agent12c/core/12.1.0.1.0/oui/bin/runInstaller -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/oracle/agent12c/core/12.1.0.1.0
-responseFile /u01/oracle/stage/12cagent/agent.rsp
AGENT_BASE_DIR=/u01/oracle/agent12c AGENT_BASE_DIR=/u01/oracle/agent12c RESPONSE_FILE=/u01/oracle/stage/12cagent/agent.rsp -noconfig ORACLE_HOME_NAME=agent12gr2 -force
Clone Action Logs
Location:/u01/oracle/oraInventory/logs/cloneActions.log Cloning of agent home completed successfully

Attaching sbin home…
Executing
command: /u01/oracle/agent12c/core/12.1.0.1.0/oui/bin/runInstaller -ignoreSysPrereqs -attachHome -waitForCompletion -nowait
ORACLE_HOME=/u01/oracle/agent12c/sbin ORACLE_HOME_NAME=sbin12c1 -force Attach Home Logs
Location:/u01/oracle/agent12c/core/12.1.0.1.0/cfgtoollogs/agentDeploy/AttachHome.log Attach home for sbin home completed successfully.

Updating home dependencies…
Executing
command: /u01/oracle/agent12c/core/12.1.0.1.0/oui/bin/runInstaller -ignoreSysPrereqs -updateHomeDeps -waitForCompletion
HOME_DEPENDENCY_LIST=”{/u01/oracle/agent12c/sbin:/u01/oracle/agent12c/core/12.1.0.1.0}” -invPtrLoc /u01/oracle/agent12c/core/12.1.0.1.0/oraInst.loc -force Update Home Dependencies
Location:/u01/oracle/agent12c/core/12.1.0.1.0/cfgtoollogs/agentDeploy/UpdateHomeDeps.log Update home dependency completed successfully.

Performing the agent configuration…
Executing
command: /u01/oracle/agent12c/core/12.1.0.1.0/oui/bin/runConfig.sh ORACLE_HOME=/u01/oracle/agent12c/core/12.1.0.1.0
RESPONSE_FILE=/u01/oracle/agent12c/core/12.1.0.1.0/agent.rsp ACTION=configure MODE=perform COMPONENT_XML=
{oracle.sysman.top.agent.11_1_0_1_0.xml} RERUN=true
Configuration Log
Location:/u01/oracle/agent12c/core/12.1.0.1.0/cfgtoollogs/cfgfw/CfmLogger.log Agent Configuration completed successfully

The following configuration scripts need to be executed as the “root” user. #!/bin/sh
#Root script to run
/u01/oracle/agent12c/core/12.1.0.1.0/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as “root”
3. Run the scripts
Agent Deployment Successful.
Agent deployment log location:
/u01/oracle/agent12c/core/12.1.0.1.0/cfgtoollogs/agentDeploy/agentDeploy_.log Agent deployment completed successfully.
dgtest:/u01/oracle/stage/12cagent>

Get unix admin to run root.sh from /u01/oracle/agent12c/core/12.1.0.1.0

Ends.

Posted in EM Grid Control | Tagged: | 1 Comment »

Warning The database discovery finished with some warnings: Can’t resolve a non-optional query descriptor property DiscoveryRoots (DiscoveryRoots)

Posted by Arjun Raja on July 24, 2012

Warning The database discovery finished with some warnings: Can’t resolve a non-optional query descriptor property
[DiscoveryRoots] (DiscoveryRoots)

I installed the Oracle 12c agent using the silent mode – downloaded the zip file to the server where the agent was
being installed .

I noticed none of the databases or listeners had been discovered in the Cloud control web page even after the agent
install was successful.

While trying to manually discover them via Cloud control I received the message

Warning The database discovery finished with some warnings: Can’t resolve a non-optional query descriptor property
[DiscoveryRoots] (DiscoveryRoots)
I checked the log file on the agent server.

cd $AGENT_HOME/sysman/log

view gcagent.log

Noticed the following errors during installation –

2012-07-23 14:41:50,055 [42:F5077C5B:HTTP Listener-42 – /emd/main/ (DispatchRequests)] INFO – (begin processing requests for
OMS@6488096@middba3=>[134302570780001])
2012-07-23 14:41:50,056 [42:F5077C5B] INFO – >>> Dispatching request: PutFileRequest
(/u01/oracle/agent12c/install/logs/oracle.sysman.oh_12.1.0.1.0_DISCOVERY_52.zip len
gth=302837 BIN) <<<
2012-07-23 14:41:50,130 [89:68BCA6D1:JobReader-GCThread-36-89] WARN – JobReader encountered an exception:java.io.IOException: Broken pipe 2012-07-23 14:41:50,136 [42:F5077C5B] INFO – >>> Reporting exception: oracle.sysman.emSDK.agent.client.exception.PerformOperationException: Unable to create file /u01/oracle/agent12c/install/logs
/oracle.sysman.oh_12.1.0.1.0_DISCOVERY_52.zip: No such file or directory

I checked the path mentioned in the error and realised there was no directory install/logs under /u01/oracle/agent12c.

Created those directories and ran a discovery again and it worked.

Posted in EM Grid Control | Tagged: | Leave a Comment »

DEINSTALL 12c CLOUD CONTROL

Posted by Arjun Raja on July 16, 2012

Since my cloud control set-up on AIX was still in test mode, I decided to de-install it and then install the new version with the bundle patch included.

I copied the new Oracle 12c cloud control software with the bundle patch for AIX and unzipped it.

Using the Graphical interface to deinstall….

Launch the de-installer from the staging area.

cloud:/u01/oracle/stage/newoms> ./runInstaller -deinstall
Starting Oracle Universal Installer…

Deinstall in this order.

1. On the Inventory screen, select the plug-in homes, and click Remove. 2. On the Inventory screen, select the sbin home, and click Remove. 3. On the Inventory screen, select the Management Agent, and click Remove.
4. On the Inventory screen, select the Web Tier home , and click Remove. 5. On the Inventory screen, select the remaining plug-ins homes, and click Remove.
6. On the Inventory screen, select the jdk home, and click Remove. 7. On the Inventory screen, select the oms home, and click Remove. 8. On the Inventory screen, select the common home, and click Remove.

Oracle Home
“/u01/oracle/Middleware/agent/plugins/oracle.sysman.oh.discovery.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/agent/plugins/oracle.sysman.emas.discovery.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/agent/plugins/oracle.sysman.db.discovery.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/agent/plugins/oracle.sysman.csa.discovery.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/agent/plugins/oracle.sysman.beacon.agent.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/agent/plugins/oracle.sysman.emrep.agent.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/agent/plugins/oracle.sysman.emas.agent.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home “/u01/oracle/Middleware/agent/sbin” is being deinstalled ..

Oracle Home “/u01/oracle/Middleware/agent/core/12.1.0.1.0” is being deinstalled ..

Oracle Home “/u01/oracle/Middleware/Oracle_WT” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/plugins/oracle.sysman.db.oms.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/plugins/oracle.sysman.xa.oms.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/plugins/oracle.sysman.emas.oms.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home
“/u01/oracle/Middleware/plugins/oracle.sysman.mos.oms.plugin_12.1.0.1.0” is being deinstalled ..

Oracle Home “/u01/oracle/Middleware/jdk16” is being deinstalled ..

Oracle Home “/u01/oracle/Middleware/oms” is being deinstalled ..

Oracle Home “/u01/oracle/Middleware/oracle_common” is being deinstalled ..

Finally only ORACLE_HOME remains

(Embedded image moved to file: pic24355.gif)

Posted in Uncategorized | Leave a Comment »