Tuesday, 29 December 2015


Steps for Clean restart OMS.
===========================


1.Shutdown all the OMS related processes

$<OMS_HOME>/bin/emctl stop oms -all -force

Kill if there are any stale processes running out of the installation path for OMS.

ps -ef | grep EMGC_ADMINSERVER
ps -ef | grep EMGC_OMS1
ps -ef | grep java

kill any of the above processes which are running from the OMS $ORACLE_HOME using 'kill -9 <PID>'

2. Checking for the invalid objects in the repository shows several objects in INVALID status:

SQL> select object_name, object_type, owner from dba_objects where status = 'INVALID';

Ensure that none of the SYSMAN, SYSMAN_RO and SYSMAN_MDS objects are invalid


3. Remove the *.DAT and *.lok files from the paths below:

$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/store/diagnostics/WLS_DIAGNOSTICS000000.DAT
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/store/default/_WLS_EMGC_OMS1000000.DAT
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/store/diagnostics/WLS_DIAGNOSTICS000000.DAT
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/store/default/_WLS_EMGC_ADMINSERVER000000.DAT

and

$ find . -name "*.lok"
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/config/config.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/ldap/ldapfiles/EmbeddedLDAP.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/tmp/EMGC_OMS1.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/ldap/ldapfiles/EmbeddedLDAP.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/tmp/EMGC_ADMINSERVER.lok

4. Go to the AdminServer directory which is in $EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data

5. Create a backup of ldap folder and delete the current one.

6. Go to the $EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data directory

7. Create a backup of ldap folder in this path and delete the current one.

8. Move all the logs from below locations to a new folder by creating a directory named old_logs_dir

$EM_INSTANCE_BASE/gc_inst/WebTierIH1/diagnostics/logs/OHS/ohs1
$EM_INSTANCE_BASE/gc_inst/WebTierIH1/diagnostics/logs/OPMN/opmn
$EM_INSTANCE_BASE/gc_inst/user_prolojects/domains/GCDomain/servers/EMGC_OMS1/logs
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/logs

9. start the OMS

$<OMS_HOME>/bin/emctl start oms 



Following steps applied to avoid unnecessary OEM alerts if  there is network latency i.e if network fluctuate for few seconds.

We need to increase the inactive time to 300 sec for the target in OEM repository so that it waits 300 sec and check it aback.

We need to run the following statements in OEM repository database as sysman user.
--it displays GUID for the given target agent.

$sqlplus

Sql>conn sysman/*******

select TARGET_GUID from MGMT_TARGETS where TARGET_NAME='<Target agent name>' and TARGET_TYPE='oracle_emd';

--it will display column with null value or 60

select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='<target GUID from above query>';

--Run the below update statement to update the inactive time to 300.

update MGMT_EMD_PING set max_inactive_time=300 where TARGET_GUID='<target GUID from 1st  query>';
commit;

--check whether updated or not.

select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='<target GUID from above query>';

Example :

select TARGET_GUID from MGMT_TARGETS where TARGET_NAME='ORACLEDBSER02:3872' and TARGET_TYPE='oracle_emd';
TARGET_GUID
----------------------------------
E4E50946B11639C9AA59A842E4E03CD5
select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='E4E50946B11639C9AA59A842E4E03CD5>';
max_inactive_time
-----------------------------

update MGMT_EMD_PING set max_inactive_time=300 where TARGET_GUID='E4E50946B11639C9AA59A842E4E03CD5';
1 row updated
commit;

select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='<target GUID from above query>';

max_inactive_time
-----------------------------

300