Friday, September 12, 2014

Removing a agent from oracle 12c OEM & Remove Monitoring target from OMS


Removing a agent from oracle 12c OEM & Remove Monitoring target from OMS

Stop the agent on the target server

#1 set the environment variables on the agent server

#2 stop the agent
oracle@bhudb01> emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 4 
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping agent ..... stopped.

#3 Login to the oms server and login to system

oracle@ bhuoms:~> emcli login -username=sysman
Enter password :

Login successful
oracle@ bhuoms:~>

oracle@bhuoms:~> emcli delete_target -name="bhudb01.isihost.com:3872" -type="oracle_emd" -delete_monitored_targets

Target "bhudb01.isihost.com:3872:oracle_emd" deleted successfully

#4 you can De-install using Graphical(OUI) & silent one.

I am going to use GUI method

Connect to the Agent server
Make sure the agent is down.
$ cd $AGENT_HOME/12.1.0.4.0/oui/bin
$ ./runInstaller

You will get the OUI, click on the deinstall products

Step#1  chose the sbin & other plugin homes.
Step#2  remove the agent
Step#3 exit the OUI and clean the $AGENT_HOME location.

If you want you can go ahead with the different agent installation; my case I am hitting a bug where I am asked to installed 32bit agent on the 64bit server.


Thursday, September 4, 2014

To Modify the Database setting in the OMS12c


To Modify the Database setting in the OMS12c

You can modify service name, sid , port number, include load balancer & failover environment

Step#1
Set the environmental variables

RAC Environment without standby DB: I am using Hostname

$OMS_HOME/bin/emctl config oms -store_repos_details -repos_conndesc '(DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oemhost1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=oemhost2)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrepsrvc))(FAILOVER_MODE=(TYPE=select)(METHOD=basic)))' -repos_user sysman

RAC Environment without standby DB: I am using scan name
emctl config oms -store_repos_details -repos_conndesc '(DESCRIPTION=(ADDRESS_LIST=(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=cluster-scan)(PORT=1526)))(LOAD_BALANCE=ON)(CONNECT_DATA=(SERVICE_NAME=OEM12C.company.com)))' -repos_user sysman

Single node environment without standby DB

emctl config oms -store_repos_details -repos_conndesc '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= oemhost1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emgc.nonprod)))' -repos_user sysman

Step#2 Stop the entire OMS

$ emctl stop oms –all

Step#3 Start the entire OMS

$ emctl start oms

To verify the repository Details through emctl command

$ emctl config oms -list_repos_details
Oracle Enterprise Manager Cloud Control 12c Release 4 
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Repository Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Bhuvan-em12c)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emgc.nonprod)))
Repository User : sysman


Wednesday, September 3, 2014

Identify Port Owner & Pid



To check whether port is used on the server and who is using it currently

I am checking for the port 3872

$ netstat -an |grep 3872
tcp        0      0 :::3872                     :::*                        LISTEN  

To check who is using this port on a Linux Server

$ /usr/sbin/lsof -i :3872
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    5426 oracle   65u  IPv6  25327      0t0  TCP *:oem-agent (LISTEN)


Currently this port is used by the Oracle user for the OEM-Agent.


I got this error message while trying to deploy the Oracle agent12c from the OEM12c

Failed SEVERE: Agent free port check failed