Showing posts with label emctl. Show all posts
Showing posts with label emctl. Show all posts

Wednesday, February 01, 2017

GridControl 12c switch repository database to RAC

This post may be useful if you consider scale out Oracle Enterprise Manager Cloud Control 12c with RAC database. Migration to the cluster is quite simple with rconfig utility. You can start with Oracle Database documentation or google for numerous posts about that process. I omit database migration by itself and describe the final steps only. In an ideal world, you always have a source instance and new shiny RAC, but in reality, you may not have enough resources and you have converted database in-place, as I've done?
Well, it means that you can't have both databases up and running at the same time. For my case original single instance repository has become a cluster node, which means OMS is down and emctl utility throws errors and doesn't change the configuration.Here you may find a few steps how to address this issue:
1. Open a new terminal connection and start AdminServer from the command line:
[oracle@host]$$MW_HOME/gc_inst/user_projects/domains/GCDomain/bin/startWebLogic.sh
It will throw a l-o-o-o-t of error messages about JPS database availability. Just keep it going until you 'd have your RUNNING state. Now you should be able to run $OMS_HOME/bin/emctl  normally nd update database connection descriptor using documentation steps. Just use another terminal window to keep AdminServer up and running.
2. OMS configuration doesn't understand format host:port:service, which means you have the only choice for cluster databases: SQL*Net service descriptors. Example for SCAN listeners would look like the sample command below:

[oracle@host]$ $OMS_HOME/bin/emctl config oms -store_rpos_details -repos_conndesc \
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=scan-listener.your.domain.com)(PORT=1521)))(CONNECT_DATA=(SERVICE=omsservice.yourdomain.com)))"  -repos_user sysman

3. Service Descriptor is the standard SQL*Net format with some limitations (at least on Linux platforms):
  • The descriptor is enclosed in double quotes. 
  • Descriptor shouldn't contain any spaces. 
Return to the first session and stop AdminServer with Ctrl-Break. Now you can start Grid Control as usual, repository connection points to the clustered repository.

Friday, January 30, 2015

EM GC 12c OMS repository switch

If you have plans to scale your Oracle Enterprise Manager Cloud Control 12c installation. On of the ways to improve performance and increase availability is migrate repository form single instance database to Real Application Cluster.
Database reconfiguration is incredibly simple with rconfig utility. Instructions are simple and you may use documentation or a numerous posts about.

I'd like to share some tips about the very last steps in situation when you can't have both database up together (in my case - single instance became a cluster node). you still can use emctl utility even when old repository is not available..

1. Open additional terminal window and start AdminServer from command line  
[oracle@host]$
$MW_HOME/gc_inst/user_projects/domains/GCDomain/bin/startWebLogic.sh 
It will throw a loot of error messages about JPS database availability, just keep it going  until server will not be in RUNNING state. From main terminal window run $OMS_HOME/bin/emctl to modify database connection as normal.

2. OMS interprets  database connection only as host:port:sid. It doesn't work for database services (unless you are going to use the connection to the single instance). For SCAN connection I used service descriptor. Sample command and parameters are below:

[oracle@host]$ $OMS_HOME/bin/emctl config oms -store_rpos_details -repos_conndesc \

"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=scan-listener.your.domain.com)(PORT=1521)))(CONNECT_DATA=(SERVICE=omsservice.yourdomain.com)))"  -repos_user sysman


3. Service Descriptor is standard SQL*Net format with some restrictions (at least on Linux platforms):
  • Descriptor is enclosed in double quotes. 
  • Descriptor doesn't contain spaces. 
After command execution just stop AdmiServer in the second terminal with Ctrl-Break and start Grid Control normally.