Posts

Script to search guid in LDAP using ldapsearch for multiple uid

Image
Script to search guid in LDAP using ldapsearch for multiple uid   cd <Location> (/app/oracle/Middleware/mw6/OracleIDM/bin) ( echo "" echo "------------------------------" date echo "##Output will be generated to file <filename>##" echo -n "Enter application uid separated by ':' eg.(MON:APPS)" read AppsUser arr=$(echo $AppsUser | tr ":" "\n") for Uid in $arr do ldapsearch -v -h "<hostname>" -p <portno.Default:3060> -D "<ldaplogin>" -w"<password>"  -b "" -sub "((|uid=$Uid*))" uid guid done )2>&1 | tee -a <filename>  

Script to check Datasource connections -Weblogic WLST scripting

Image
Script to check DataSource Connections using WLST scripting: The connection status can be checked using Python script. Ensure the indents are correct. Url of datasource , port number can be found out at config.xml file Export the following: export ANT_HOME=/app/oracle/Middleware/mw6/modules/org.apache.ant_1.7.1 export CLASSPATH=$ANT_HOME/lib:$ANT_HOME/bin export CLASSPATH=$ANT_CONTRIB/lib:$CLASSPATH export ANT_CONTRIB=$MW_HOME/modules/net.sf.contrib_1.1.0.0_1-0b2 export CLASSPATH=$ANT_CONTRIB/lib:$CLASSPATH . /app/oracle/Middleware/mw6/wlserver_10.3/server/bin/setWLSEnv.sh Save the below as *.PY connect('weblogic','<weblogicpassowrd>', 't3://<url of datasource>') serverRuntime() dsMBeans = cmo.getJDBCServiceRuntime().getJDBCDataSourceRuntimeMBeans() dsName="<datasource name>" for ds in dsMBeans:         if (dsName == ds.getName()):                   print 'DS name is: '+ds.getName()                   print

Troubleshoot OEM 12c Cloud Control Agent and Target

Image
Troubleshoot OEM Agent and Target: Error: Target Metadata Loader Failed at Startup If an OEM agent is down, it should restart automatically. Else we can start manually from backend. ./emctl status agent ./emctl start agent ./emctl stop agent If start agent fails with error: Target Metadata Loader Failed at Startup Possible reasons: targets.xml might be missing or corrupted If corrupted take a backup of existing targets.xml file ./emctl config agent listtargets (Could fail with targets.xml is missing) File Location: <Middlewarehome>/agent12c/agent_inst/sysman/emd Solution:Recreate targets.xml file 1. Manually Create targets.xml file. vi targets.xml 2.Add the below to the file <Targets> </Targets> 3. Start emctl agent (Agent might be blocked for a while) 4. From OEM frontend, navigate to agents page 5. Select the probematic agent 6. Under agents dropdown select agent "Resynchronize" (This will resync targets to targets.xml file) 7.

Troubleshoot OEM 12c Cloud Control Metric Alerts

Image
How to troubleshoot OEM Metric Alerts: Commands to Troubleshoot OEM Metric Alerts from Backend in Linux: Check location of emctl in a server: grep emagent To find status of a Metric: ./emctl status agent target '<TargetName>',<TargetType>|grep '<MetricName>' Eg. ./emctl status agent target 'Dev_EBS',oracle_ebs|grep '<MetricName>' To find the schedule of a Metric: ./emctl status agent scheduler | grep '<MetricName>' To check the latest threshold count: ./emctl getmetric agent '<TargetName>',<TargetType>,<MetricName> Eg. ./emctl getmetric agent 'Dev_EBS','oracle_ebs', '<MetricName>' To Run Collection: ./emctl control agent runCollection '<TargetName>':<Target_type> '<MetricName>' './emctl control agent runCollection 'Dev_EBS':oracle_ebs '<MetricName>' To upload latest collectio