The SQL Module is able to perform all the standard functions of the SQL Web Service. This page discusses the configuration of the SQL Module in the Gateway Client. The supported operations for this module are PING, GET, PROCESS, ACK, CHECK.
The SQL Client Module section (below) is placed in the "modules" section of the main XML configuration in order to activate and configure the SQL Module. The section below is a basic configuration and as a result will execute the standard SQL procedure, which is to GET a new batch, PROCESS it, and then ACK it.
<sql-module enabled="true" priority="1">
<status-database>oracle.database</status-database>
<target-database>hsql.database</target-database>
<insert-database>oracle.database</insert-database>
<sql-web-service>sql-test</sql-web-service>
</sql-module>
Additional configuration XML may be added to customize the execution of the SQL Module. The example below displays how one would go about processing a batch (via SQLPlus).
<sql-module enabled="true" priority="1">
<status-database>oracle.database</status-database>
<target-database>hsql.database</target-database>
<insert-database>oracle.database</insert-database>
<sql-web-service>sql-test</sql-web-service>
<sql-step>
<sql-step-name>PROCESS</sql-step-name>
<sql--batchid>6123456123456</sql-batchid>
</sql-step>
</sql-module>
The valid steps that can be run as specified in the "sql-step-name" are listed below:
PING - Ping SQL web service
GET - Get new batch from SQL web service
PROCESS - Process batch using SQLPlus locally
ACK - Acknowledge batch receipt to SQL web service
CHECK - Check for local unacknowledged batches
Note that only the PROCESS and ACK steps require the "sql-batchid" element to be present, otherwise it is ignored.