Difference between revisions of "Snippets"
From dbawiki
(→Restart ITM Monitoring agent) |
(→Restart ITM Monitoring agent) |
||
| Line 13: | Line 13: | ||
<pre> | <pre> | ||
$ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM -r itmora -i $ORACLE_SID -t or add | $ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM -r itmora -i $ORACLE_SID -t or add | ||
| + | </pre> | ||
| + | This one should also be done in order that rc.d scripts know to start the agent as itmora instead of root | ||
| + | <pre> | ||
| + | $ITM_HOME/smitools/scripts/kciedit -h /opt/IBM/ITM -r itmora -i $ORACLE_SID -t or add | ||
</pre> | </pre> | ||
Restart the agent | Restart the agent | ||
Revision as of 15:07, 31 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
This one should also be done in order that rc.d scripts know to start the agent as itmora instead of root
$ITM_HOME/smitools/scripts/kciedit -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 -o SRV2R
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> /