Hendry's "Oracle and SQL Server DBA Stuff"

Oracle and SQL Server Database Solutions for DBA's please visit http://hendrydba.com for the latest posts. Thanks

Archive for the ‘OCM for Oracle 11GR2’ Category

Uninstall and Install ORACLE CONFIGURATION MANAGER (OCM) for Oracle 11Gr2 and also for Oracle10g

Posted by Hendry chinnapparaj on August 19, 2011

OCM DeInstall Steps for AIX


# Please do this for ALL Oracle Homes that have had OCM installed previously.


– The only env variable needed for the below to work for each home is ORACLE_HOME. Set this as required manually (or use already configured aliases). It is also fine to be set to the agent home too.

export ORACLE_HOME=/u01/oracle/product/…   or

export ORACLE_HOME/u01/oracle/agent[10|11]g


– Stop OCM if running. Look for a nmz process relating to the Oracle Home as above in ps -ef output.

Ps –ef|grep nmz

$ORACLE_HOME/ccr/bin/emCCR stop


– If OCM database collections were previously done (presence of ORACLE_OCM user in db is enough to confirm this), FOR EACH DATABASE on the server set the env and execute the below as SYS. Otherwise goto next step.

SQL> @?/ccr/admin/scripts/dropocm.sql  <–  this drops the ORACLE_OCM user and does other things too.


– If OCM collections were previously done (presence of below deployPackages file is enough to confirm this), execute the below IN EACH ORACLE HOME. Otherwise goto next step.

$ORACLE_HOME/ccr/bin/deployPackages -d $ORACLE_HOME/ccr/inventory/core.jar


– Remove the previous OCM install folder FROM EACH ORACLE HOME.

rm -rf $ORACLE_HOME/ccr



OCM Install Steps for AIX


ftp the latest OCM Patch p5567658_1035_AIX64-5L.zip to the Aix server in binary mode to /u01/oracle/stage

login as oracle (or equiv) software owner

# OCM Install for all Oracle Homes


– Set the env for the Oracle Home and run the below to start the install.

cd /u01/oracle/stage

unzip -d $ORACLE_HOME /u01/oracle/stage/p5567658_1035_AIX64-5L.zip


cd $ORACLE_HOME/ccr/bin


./setupCCR -s 18070588 duty.dba@xyz.com


NONE (this is case sensitive too)


Provide password


– Make required OCM customisations.

./emCCR automatic_update off

./emCCR set collection_interval=”FREQ=DAILY; BYHOUR=18; BYMINUTE=10″  <–  change BYHOUR and BYMINUTE to be some time preferably evenings within 6-7pm and record the details in  spreadsheet. For existing deployments please reuse current set times.


– Add in below 3 lines of text to OCM properties file to exclude IP and MAC address collection.

vi $ORACLE_HOME/ccr/hosts/<hostname>/config/collector.properties  <–  add in hostname in lowercase before using this line. There should be content in the file already.





– Cycle OCM to pickup this exclusion.

$ORACLE_HOME/ccr/bin/emCCR stop

$ORACLE_HOME/ccr/bin/emCCR start


# OCM Install into each database if Oracle Home is a DB Home


– Instrumenting the Database for Configuration Collection

cd $ORACLE_HOME/ccr/admin/scripts

./installCCRSQL.sh collectconfig -s <Oracle Sid>  <–  change Oracle Sid before using this line.

Successfully installed collectconfig in the database with SID=<Oracle Sid>.


– Repeat above line for other databases in this Oracle Home.


– Run new manual collection to pickup database(s) content

cd $ORACLE_HOME/ccr/bin

./emCCR collect


# Go back and do the above for ASM or other Homes (e.g. Agent Home) if present – but with a collection time ideally 5 mins before or after the DB Home.


# Remove the OCM install zipfile once the change is complete.




Posted in OCM for Oracle 11GR2 | Leave a Comment »