Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following example sends one query to retrieve data.

<queries connection-pool="pw" single-connection="true">
     <free-query id=“501”>
     <!-- meta-data is optional -->
          <meta-data>
               <fetch-rows value=“10000” /> <!-- number of rows to retrieve -->
               <skip-rows value=“0” /> <!-- number of rows to skip -->
               <timeout value=“30” /> <!-- maximum time to wait for database execution -->
          </meta-data>
          <query-text value="SELECT * FROM PS_PWTR_TABLE_RANGE WHERE PWTR_TABLE_NAME = ?” />
          <bind-variable id=“1” value=“PW_NTAC_ACTIONS_M” type=“string” />
     </free-query>
</queries>

The following example sends several queries to retrieve data.

<queries connection-pool=“pw” single-connection=“false”> <!-- with single-connection set to false, queries are performed in parallel -->
     <free-query id=“601”>
     <!-- meta-data is optional -->
          <meta-data>
               <fetch-rows value=“1” /> <!-- number of rows to retrieve (fetching only one row) -->
               <skip-rows value=“0” /> <!-- number of rows to skip -->
               <timeout value=“30” /> <!-- Maximum time to wait for database execution -->
          </meta-data>
     <!-- bind variables are optional -->
          <query-text value="SELECT * FROM PW_PWII_INSTANCE_ID” />
     </free-query>
     <free-query id= “602”>
     <!-- meta-data is optional -->
          <meta-data>
               <timeout value=“45” /> <!-- Maximum time to wait for database execution -->
          </meta-data>
          <query-text value=“UPDATE PS_PWSE_SCHEDULED_EVENTS SET PWSE_START_TIMESTAMP = SYSDATE+4/1440, PWSE_STATUS = ‘UPDATE’ WHERE PWSE_ID = 6” />
     </free-query>
     <free-query id=“603”>
     <!-- meta-data is optional -->
          <meta-data>
               <timeout value=“45” /> <!-- Maximum time to wait for database execution -->
          </meta-data>
          <query-text value="SELECT * FROM PS_PWTR_T” />
     </free-query>
     .
     .
     .
</queries>

Retrieve Response Examples

The following example shows a retrieve response to one query executed without errors.

<rowsets>
     <rowset id="501">
          <row rownum="1">
               <PWTR_PWII_ID>1005</PWTR_PWII_ID>
               <PWTR_TABLE_NAME>PW_NTAC_ACTIONS_M</PWTR_TABLE_NAME>
               <PWTR_START_TIMESTAMP></PWTR_START_TIMESTAMP> <!-- indication of null -->
               <PWTR_END_TIMESTAMP></PWTR_END_TIMESTAMP>
               <PWTR_LAST_PARTITION_TIMESTAMP>2008-08-01 00:00:00.0</PWTR_LAST_PARTITION_TIMESTAMP>
          </row>
          <row rownum="2">
               <PWTR_PWII_ID>1011</PWTR_PWII_ID>
               <PWTR_TABLE_NAME>PW_NTAC_ACTIONS_M</PWTR_TABLE_NAME>
          <PWTR_START_TIMESTAMP>2003-08-02 12:00:00.0</PWTR_START_TIMESTAMP>
               <PWTR_END_TIMESTAMP>2003-08-23 23:00:00.0</PWTR_END_TIMESTAMP>
               <PWTR_LAST_PARTITION_TIMESTAMP>2008-08-01 00:00:00.0</PWTR_LAST_PARTITION_TIMESTAMP>
          </row>
          <rowset-info>
               <affected-rows>2</affected-rows>
               <more-rows>false</more-rows> <!-- indication that all the rows where fetched -->
          </rowset-info>
          <error>
               <code>0</code> <!-- rowset level error indication that there ware no errors with the query -->
          </error>
     </rowset>
     <error> <!-- rowsets level error, indication that there were no problems with the database connection -->
          <code>0/code>
     </error>
</rowsets>

The following example shows a retrieve response to several queries. Note that some queries have encountered an error during execution.

<rowsets>
     <rowset id="601">
          <row rownum="1">
               <PWII_ID>1005</PWII_ID>
               <PWII_INSTANCE_NAME>network_instance</PWII_INSTANCE_NAME>
               <PWII_TECHNOLOGY>NT</PWII_TECHNOLOGY>
               <PWII_SERVER>my_server</PWII_SERVER>
          </row>
          <rowset-info>
               <affected-rows>1</affected-rows>
               <more-rows>true</more-rows> <!-- indication that there are more rows to fetch -->
          </rowset-info>
          <error>
               <code>0</code> <!-- rowset level error indication that there ware no errors with the query -->
          </error>
     </rowset>
     <rowset id="602">
          <rowset-info>
               <affected-rows>1</affected-rows>
               <more-rows>false</more-rows>
          </rowset-info>
          <error>
               <code>0</code> <!-- rowset level error indication that there ware no errors with the query -->
          </error>
     </rowset>
     <rowset id="603">
          <error>
               <code>8200</code> <!-- indication that there was an error performing the query -->
               <description>com.precise.shared.retriever.RetrieverJDBCException: ERROR could not execute the sql command in query id : 502 for sql text : SELECT * FROM PS_PWTR_T</description>
               <external-code>942</external-code>
               <external-description>ORA-00942: table or view does not exist</external-description>
          </error>
     </rowset>
     <error>
          <code>0</code>
     </error>
</rowsets>

The following example presents an error connecting to the database.

<rowsets>
     <error>
          <code>9100</code>
          <description>ERROR at statement 72000</description>
          <external-code>1034</external-code>
          <external-description>ORA-01034: ORACLE not available</external-description>
     </error>
</rowsets>


Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
Newtabfooter
aliasIDERA
urlhttp://www.idera.com
 | 
Newtabfooter
aliasProducts
urlhttps://www.idera.com/productssolutions/sqlserver
 
Newtabfooter
aliasPurchase
urlhttps://www.idera.com/buynow/onlinestore
 | 
Newtabfooter
aliasSupport
urlhttps://idera.secure.force.com/precise/
 | 
Newtabfooter
aliasCommunity
urlhttp://community.idera.com
 
|
 
Newtabfooter
aliasResources
urlhttp://www.idera.com/resourcecentral
 | 
Newtabfooter
aliasAbout Us
urlhttp://www.idera.com/about/aboutus
 
Newtabfooter
aliasLegal
urlhttps://www.idera.com/legal/termsofuse