2009-01-08

ORACLE GRID CONTROL

Install repository:
  1. get full version Grid Control 10.2.0.1.0 (10.2.0.2.1 for Windows) and install, newer versions are installed against 10.2.0.1.0
  2. unpack files straight to directory with file runInstaller, in the other case error: OUI-10133 invalid staging area appear
  3. when on machine was instaled database do not forget remove /etc/oraInst.loc which describe path to previous inventory
  4. install missing libraries:
    • openmotif2.1
    • ysstat
    • control-center
    • compat-db
  5. run runInstaller
  6. at the end files was generated:
    • /usr/bin/dbhome, /usr/local/bin/dbhome
    • /usr/bin/oraenv, /usr/local/bin/oraenv
    • /usr/bin/coraenv, /usr/local/bin/
Install agent on every monitoring hosts
CHECK STATUS, START AND STOP:
EMCTL (Enterprise Manager tool starts,stops and manages security for Oracle Enteripise Manager)
[agent_path]/bin/emctl status | start | stop agent #check status, start, stop AGENT - perl application [oms_path]/bin/emctl
status iasconsole
[oms_path]/opmn/bin/opmnctl status -l | startall | stopall #check status, start, stop AS - java application

LOCAL EM - not GRID:
Must remember that EM is installed in directory ORACLE_HOME/hostname_sid so when ex hostname was changed it must be change in files:
/sysman/config/emca.properties #repo config
/sysman/config/emd.properties #AGENT config
/sysman/config/emoms.properties #repo config
/sysman/emd/targets.xml #AGENT config

DBCONSOLE (for LOCAL EM) - not GRID:
set ORACLE_HOSTNAME (beware it is casesensitive, sometimes password for DBSNMP inside quotation mark)
emca -deconfig dbcontrol db -repos drop #drop all directory and repository from db
emca -config dbcontrol db -create #create directory and repository in db
emca -config dbcontrol db -repos recreate -SID [sid] -PORT [port] -ORACLE_HOME [oracle_home] -DBCONTROL_HTTP_PORT [port]
emca -config all db -repos recreate;
emctl getemhome

during changing hostname:
from
oracle_home/oc4j/j2ee/OC4J_DBConsole_[oldhostname]_sid
oracle_home/[oldhostname]_sid
to newhostname_sid
and changes in files:
/sysman/config/emca.properties
/sysman/config/emd.properties
/sysman/config/emoms.properties
/sysman/emd/targets.xml
/hostname_sid/config/emca.properties
/hostname_sid/config/emd.properties
/hostname_sid/config/emoms.properties
/hostname_sid/emd/targets.xml

set ports:
emca -reconfig ports [-DBCONTROL_HTTP_PORT [port]] [-RMI_PORT [port]] [-JMS_PORT [port]] [-AGENT_PORT [port]]
ISQLPLUS:
isqlplusctl start | stop http://hostname:5560/isqlplu

EM DIRS
ORACLE_HOME/cfgtoollogs
ORACLE_HOME/oc4J
ORACLE_HOME/opmn
ORACLE_HOME/sysman

check reposidory database:
SELECT * FROM sysman.mgmt_targets;
SELECT * FROM sysman.mgmt_versions;

GRID:
when Management Service (MS) was changed so it must reconfigure Agent but it is not necessary to make changes in Management Service, but restart Agent only

1. stop AGENT
2. $AGENT_HOME/sysman/config/emd.properties
REPOSITORY_URL
emdWalletSrcUrl
emdWalletDest
3. remove all files from:
$AGENT_HOME/sysman/emd/upload/*
$AGENT_HOME/sysman/emd/state/*
4. restart AGENT

when AGENT port (to get commands from MS) was changed:
1. stop AGENT
2. $AGENT_HOME/sysman/config/emd.properties
EMD_URL
3. start AGENT

set password for db which is monitored by AGENT:
1. stop AGENT
2. edit $AGENT_HOME/sysman/emd/targets.xml
<target TYPE="oracle_database" NAME="sid_hostname.domain">
<property NAME="OracleHome" VALUE="/u01/app/oracle/product/10.2.0/db_1"/>
<property NAME="UserName" VALUE="dbsnmp"/>
<property NAME="MachineName" VALUE="hostname.domain"/>
<property NAME="Port" VALUE="1521"/>
<property NAME="SID" VALUE="SID"/>
<property NAME="ServiceName" VALUE="SIDAGNDB"/>
<property NAME="password" VALUE="fdsafsffdsafsa" ENCRYPTED="TRUE"/>
<property NAME="Role" VALUE="NORMAL"/>
</Target>
3. change password for DMSNMP user in line:
<property NAME="password" VALUE="nowe_haslo" ENCRYPTED="FALSE"/>
4. start AGENT

limit disk size for AGENT to buffer data before sending to repository:
$AGENT_HOME/sysman/emd/upload
default is up to 50M or to 98% disk size
$AGENT_HOME/sysman/config/emd.properties
UploadMaxBytesXML
UplloadMaxDiskUsedPct

watchdog process - controling AGENT if it is on, and start it when not
$AGENT_HOME/bin/emwd.pl
ps aux|grep emwd

---------------------------------
${ORACLE_HOME}/bin/mkwallet -i welcome
${ORACLE_HOME}/sysman/config/monwallet
${ORACLE_HOME}/sysman/config/b64SiteCertificate.txt NZDST_CLEAR_PTP
------------------------------------

changing password in repository:
MANAGEMENT SERVICE
1. set repo
[$ORACLE_HOME/sysman/config/emoms.properties]
emdRepUser
emdRepPwd
emdRepConnectDescriptor
emdRepSID
emdRepServer
emdRepPort

2. stop MS
$ORACLE_HOME/bin/emctl stop oms
3. set passwd
$ORACLE_HOME/bim/emctl setpasswd oms
4. start MS
$ORACLE_HOME/bim/emctl start oms

change IAS password:
The ias_admin user is the administrative user for Oracle Application Server instances
This password is same as the SYSMAN password that you specified when you first installed the Grid Control in your environment.
After installing the Grid Control in your environment, if you change the SYSMAN password, ias_admin password will not be changed.
$ORACLE_HOME/bin/emctl set password

reset IAP password:
OMS_path/bin/emctl stop iasconsole
edit:
OMS_path/sysman/j2ee/config/jazn-data.xml
change lines:
<name>ias_admin</name>
<credentials>{903}fdsafsafsdafsadfsdafsd</credentials>
<credentials>!new_password</credentials>
OMS_path/bin/emctl start iasconsole
-------------------
spr.
agntstmp.txt
lastupld.xml
-------------------
change MS port:
1. stop MS
2. edit $ORACLE_HOME/sysman/config/httpd_em.conf
change all references to port 4889
3. send info to DCM tier
$ORACLE_HOME/dcm/bin/dcmctl updateconfig -ct ohs
4. edit $ORACLE_HOME/sysman/config/emoms.properties
oracle.sysman.emSDK.svlt.ConsoleServerPort=4889
5. start MS
6. reconfigure all AGENTS

AGENT logs:
edit:
$AGENT_HOME/sysman/config/emd.properties
lines:
LogFilewithPID
LogFIleMaxSize
LogFIleMaxRolls
TrcFileMaxSize
TrcFileMaxRolls

filelogs for AGENT
$AGENT_HOME/sysman/log/emagent.log
$AGENT_HOME/sysman/log/emagent.trc
$AGENT_HOME/sysman/log/emagent.nohup

settings in $Agent_HOME/sysman/config/emagantlogging.properies
log4j.appender etc.
for collecting stats:
emagentfetchlet.log
emagentfetchlet.trc

MS logs:
emoms.log
emoms.trc
$AS_HOME/sysman/log
settings in $AS_home/sysman/config/emomslogging.properies

AS logs
HTTP Server ORACLE_HOME/Apache/Apache/logs/error_log.timeORACLE_HOME/Apache/Apache/logs/access_log.time
OC4J ORACLE_HOME/j2ee/instance_name/logORACLE_HOME/j2ee/instance_name/application-deployments/application_name/application.log
OPMN ORACLE_HOME/opmn/logs
Web Cache ORACLE_HOME/webcache/logs

Errors:
ERROR host.HostOverviewDataObject getLogonInfo.2447 - Connection refused
oracle.sysman.emSDK.emd.comm.CommException: Connection refused
ERROR host.HostSummaryDataObject getHostSummary.815 - Connection refused
oracle.sysman.emSDK.emd.comm.CommException: Connection refused