help trying to get back data from the db..
363124Apr 6 2009 — edited Apr 10 2009I've RTFM (doesn't mean I understand it though :) )
I'm trying to understand getting data back from the db. I've got this most of the way there, I believe. When I alter the following to use the bind variable I get
SQL = "/* OracleOEM */
SELECT USERNAME AS JSUSERNAME
, STATUS"...
LOGIN = user/<PW>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host.domain)(PORT=1521))(CONNECT_DATA=(SID=somedb)))
2009-04-06 14:26:30,994 Thread-105762 ERROR fetchlets.sql: ORA-01036: illegal variable name/number
When I hard code it, I get only the response and information metrics, no DBInformation metrics show.
<!-- $Header: emdb/sysman/admin/metadata/sungardhe_jobsub.xml 2009/03/31 Brandon Cole, Idaho State University Exp $ -->
<!DOCTYPE TargetMetadata SYSTEM "../dtds/TargetMetadata.dtd">
<TargetMetadata META_VER="1.0" TYPE="sungardhe_jobsub">
<Display>
<Label NLSID="sungardhe_jobsub_name">SungardHE Job Submission Daemon</Label>
</Display>
<Metric NAME="Response" TYPE="TABLE">
<Display>
<Label NLSID="sungardhe_jobsub_resp">Response</Label>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="Status" TYPE="STRING">
<Display FOR_SUMMARY_UI="TRUE">
<Label NLSID="sungardhe_jobsub_resp_status">Status</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="scriptsDir" SCOPE="SYSTEMGLOBAL">scriptsDir</Property>
<Property NAME="perlBin" SCOPE="SYSTEMGLOBAL">perlBin</Property>
<Property NAME="command" SCOPE="GLOBAL">%perlBin%/perl</Property>
<Property NAME="script" SCOPE="GLOBAL">%scriptsDir%/emx/%TYPE%/sungardhe_jobsub_resp.pl</Property>
<Property NAME="args" SCOPE="GLOBAL">%SID%</Property>
<Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
<Property NAME="delimiter" SCOPE="GLOBAL">|</Property>
<Property NAME="ENV_MACHINE" SCOPE="INSTANCE">MachineName</Property>
</QueryDescriptor>
</Metric>
<Metric NAME="Information" TYPE="TABLE">
<Display>
<Label NLSID="sungardhe_jobsub_info">Information</Label>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="Vendor" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="sungardhe_jobsub_product_vendor">Vendor</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Version" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="sungardhe_jobsub_product_version">Version</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="scriptsDir" SCOPE="SYSTEMGLOBAL">scriptsDir</Property>
<Property NAME="perlBin" SCOPE="SYSTEMGLOBAL">perlBin</Property>
<Property NAME="command" SCOPE="GLOBAL">%perlBin%/perl</Property>
<Property NAME="script" SCOPE="GLOBAL">%scriptsDir%/echoBack.pl</Property>
<Property NAME="args" SCOPE="GLOBAL">SunGard Higher Education|8.1</Property>
<Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
<Property NAME="delimiter" SCOPE="GLOBAL">|</Property>
</QueryDescriptor>
</Metric>
<Metric NAME="DBInformation" TYPE="TABLE">
<Display>
<Label NLSID="DBInformation">DBInformation</Label>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="USERNAME" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="USERNAME">Username</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="STATUS" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="STATUS">Status</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="LOGON_TIME" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="LOGON_TIME">LogonTime</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="SQL">
<!--
<Property NAME="SQLINPARAM1" SCOPE="INSTANCE">sungardhe_jobsub_user</Property>
-->
<Property NAME="MachineName" SCOPE="INSTANCE">MachineName</Property>
<Property NAME="Port" SCOPE="INSTANCE">Port</Property>
<Property NAME="SID" SCOPE="INSTANCE">SID</Property>
<Property NAME="UserName" SCOPE="INSTANCE">UserName</Property>
<Property NAME="password" SCOPE="INSTANCE">password</Property>
<Property NAME="STATEMENT" SCOPE="GLOBAL">
SELECT USERNAME
, STATUS
, LOGON_TIME
FROM V$SESSION
WHERE USERNAME = UPPER('GENLPRD')
</Property>
</QueryDescriptor>
</Metric>
<!--
========================================================
==
== Instance Properties
==
========================================================
-->
<InstanceProperties>
<InstanceProperty NAME="MachineName" CREDENTIAL="FALSE" OPTIONAL="FALSE">
<Display>
<Label NLSID="MachineName">Database host machine name</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="OracleHome" CREDENTIAL="FALSE" OPTIONAL="FALSE">
<Display>
<Label NLSID="OracleHome">Oracle home path</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="SID" CREDENTIAL="FALSE" OPTIONAL="FALSE">
<Display>
<Label NLSID="SID">Database SID</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="Port" CREDENTIAL="FALSE" OPTIONAL="FALSE">
<Display>
<Label NLSID="Port">Port</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="UserName" CREDENTIAL="FALSE" OPTIONAL="FALSE">
<Display>
<Label NLSID="UserName">UserName</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="password" CREDENTIAL="TRUE" OPTIONAL="FALSE">
<Display>
<Label NLSID="password">password</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="Role" CREDENTIAL="FALSE" OPTIONAL="TRUE">
<Display>
<Label NLSID="role">Role</Label>
</Display>
</InstanceProperty>
<InstanceProperty NAME="sungardhe_jobsub_user" CREDENTIAL="FALSE" OPTIONAL="FALSE">
<Display>
<Label NLSID="sungardhe_jobsub_user">Job Submission DB Username</Label>
</Display>
</InstanceProperty>
</InstanceProperties>
</TargetMetadata>