Difference between revisions of "Snippets"
From dbawiki
(→Restart ITM Monitoring agent) |
(→Restart ITM Monitoring agent) |
||
| Line 12: | Line 12: | ||
Add an instance to be monitored | Add an instance to be monitored | ||
<pre> | <pre> | ||
| − | $ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM -r itmora -i | + | $ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM -r itmora -i $ORACLE_SID -t or add |
</pre> | </pre> | ||
Restart the agent | Restart the agent | ||
Revision as of 09:47, 12 July 2013
Restart ITM Monitoring agent
To see if the Oracle module is installed
export ITM_HOME=/opt/IBM/ITM $ITM_HOME/bin/cinfo -i
See which instances have been setup to be monitored
export ITM_HOME=/opt/IBM/ITM $ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM list
Add an instance to be monitored
$ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM -r itmora -i $ORACLE_SID -t or add
Restart the agent
export ITM_HOME=/opt/IBM/ITM $ITM_HOME/smitools/scripts/StartAgent.sh restart all or $ITM_HOME/smitools/scripts/StartAgent.sh start or
Check the agent is running
ps -ef | grep koragent
Reconfigure agent
export ITM_HOME=/opt/IBM/ITM $ITM_HOME/bin/itmcmd config -A or
Create a comma separated list of columns from a select statement
Method 1:
SELECT parent_id,
RTRIM(XMLAGG(XMLELEMENT(e,child_id || ',')).EXTRACT('//text()'),',') AS "Children"
FROM parentChildTable
WHERE parent_id = 0
GROUP BY parent_id
/
or
SELECT parent_id,
LISTAGG(child_id, ',') WITHIN GROUP (ORDER BY child_id) AS "Children"
FROM parentChildTable
WHERE parent_id = 0
GROUP BY parent_id
/
Method 2 (undocumented and cannot therefore be relied on to continue working in the same manner):
SELECT wmsys.wm_concat(<column_name>) FROM <table_name> /