SQL monitor adapter event

The elements contained in the SQL monitor adapter event are different depending on the value for the <single-monitor-event> element defined in the adapter configuration.

The following table describes the elements of the SQL monitor adapter when the <single-monitor-event> element is true.



Elements of SQL monitor adapter event when < single monitor event > is true

Element

Description

<row>

Contains the values returned for one row of the query

<column>

Specifies the column name and the value returned in the response

<metadata>

Contains the summary information for the request

<target-name>

Specifies the host on which the query is executed

<query-executed>

Specifies the syntax of the query defined in the adapter request

<response-row-count>

Specifies the number of rows returned in the response

<response-column-count>

Specifies the number of columns returned for each row

<status>

Indicates the status of the request execution

Valid values: success, error

<error>

Contains the error message if an interruption occurs during the execution of a request

When the value of the <status> element is success, this element is absent.

The following figure shows an XML sample of the adapter event for the SQL monitor adapter when the <single-monitor-event> element is true.

XML sample of the SQL monitor adapter event when the < single-monitor-event > element is true


<sql-monitor-event>
  <row>
    <column name="movie_id">1</column>
    <column name="movie_name">Bruce Almighty</column>
    <column name="movie_type">5</column>
    <column name="movie_year">2003</column>
    <column name="movie_leadactor">1</column>
    <column name="movie_director">2</column>
    <column name="movie_running_time">102</column>
    <column name="movie_cost">10</column>
  </row>
  <row>
    <column name="movie_id">2</column>
    <column name="movie_name">Office Space</column>
    <column name="movie_type">5</column>
    <column name="movie_year">1999</column>
    <column name="movie_leadactor">5</column>
    <column name="movie_director">6</column>
    <column name="movie_running_time">90</column>
    <column name="movie_cost">3</column>
  </row>
  <metadata>
    <query-executed>select * from movie</query-executed>
    <target-name>target1</target-name>
    <response-row-count>2</response-row-ccount>
    <response-column-count>8</response-column-count>
    <status>success</status>
  </metadata>
</sql-monitor-event>

The following figure shows an XML sample of the adapter event for the SQL monitor adapter supporting a stored procedure.

XML sample of the SQL monitor adapter event supporting a stored procedure


<sql-monitor-event>
  <response-sets>
    <response-set index="1">
      <out-params>
        <column name="2">2</column>
      </out-params>
      <response-set-metadata>
       <out-param-count>1</out-param-count>
        <has-result-set>false</has-result-set>
        <status>success</status>
      </response-set-metadata>
    </response-set>
  </response-sets>
  <procedure-metadata>
    <response-set-count>1</response-set-count>
    <query-executed>{call customer_pkg.getCustomerCount(?, ?) }</query-executed>
    <status>success</status>
  </procedure-metadata>
</sql-monitor-event>

Note

You can also invoke a function or a stored procedure to return a cursor.

The following figure shows an XML sample of the of the SQL monitor adapter when the <single-monitor-event> element is false.

XML sample of the SQL monitor adapter single event when the < single-monitor-event > element is false


<sql-monitor-event>
  <row>
    <column name="movie_id">1</column>
    <column name="movie_name">Bruce Almighty</column>
    <column name="movie_type">5</column>
    <column name="movie_year">2003</column>
    <column name="movie_leadactor">1</column>
    <column name="movie_director">2</column>
    <column name="movie_running_time">102</column>
    <column name="movie_cost">10</column>
  </row>
  <metadata>
     <target-name>target1</target-name>
     <query-executed>select * from movie</query-executed>
     <row-number>1</row-number>
     <response-row-count>2</response-row-count>
     <response-column-count>8</response-column-count>
     <status>success</status>
  </metadata>
 </sql-monitor-event>

The following table describes the elements of the SQL monitor adapter when the <single-monitor-event> element is false.



Elements of SQL monitor adapter event when < single monitor event > is false

Element

Description

<row>

The values returned for one row of the query

<column>

The column name and value returned in the response

<metadata>

The summary information for the request

<target-name>

The host on which the query is executed

<query-executed>

The syntax of the query defined in the adapter request

<execution-milliseconds>

The duration of the request execution, in milliseconds

<row-number>

The reference number for the row information contained in this event

Each event generated contains information for a single row.

<response-row-count>

The number of rows returned in the response

<response-column-count>

The number of columns returned for each row

<status>

Indicates the status of the request execution

Valid values: success, error

<error>

Contains the error message if an interruption occurs during the execution of a request

When the value of the <status> element is success, this element is absent.

The following figure shows an XML sample of the adapter event for the SQL monitor adapter when the <single-monitor-event> element is false.

XML sample of the SQL monitor adapter two events when the < single-monitor-event > element is false


<sql-monitor-event>
 <row>
  <column name="movie_id">3</column>
  <column name="movie_name">Grand Canyon</column>
  <column name="movie_type">2</column>
  <column name="movie_year">1991</column>
  <column name="movie_leadactor">4</column>
  <column name="movie_director">3</column>
  <column name="movie_running_time">134</column>
  <column name="movie_cost">15</column>
 </row>
  <metadata>
  <target-name>target1</target-name>
  <query-executed>select * from movie</query-executed>
  <row-number>2</row-number>
  <response-row-count>2</response-row-count>
  <response-column-count>8</response-column-count>
  <status>success</status>
  </metadata>
</sql-monitor-event>
Was this page helpful? Yes No Submitting... Thank you

Comments