5 Other Functions
5-4
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
5-2 Spool Function
This section describes spooling of unsent SQL statements in the DB Connection Service.
5-2-1 Overview
When a failure occurred in information exchange between DB Connection Service and DB, the
unsent SQL statements are stored in a memory area and resent when the problem is solved.
You can set whether to enable or disable the Spool function for each DB Connection.
5-2-2 Spooling System
The following figure shows the spooling system.
DB Connection
Instruction
a. SQL statement is automatically
spooled in the case of failure.
2. Recovery (DB reconnected)
Dedicated area for the Spool function or
EM Area (non-volatile memory)
b. When communications are recovered (i.e. when
the DB is reconnected), the SQL statements in the
Spool memory are resent automatically or by
executing an instruction.
a. When a failure occurred in information exchange between DB Connection Service and DB,
the unsent SQL statements are automatically stored in the Spool memory (a dedicated area
for the Spool function for an NX-series Controller and the EM Area for an NJ-series
Controller).
b. When communications are recovered from the failure and the DB is reconnected, the SQL
statements in the Spool memory are resent automatically or by executing an instruction.
5-2-3 Applicable Instructions and Spooling Execution Conditions
Applicable Instructions
The following two instructions are applicable to this function.
ï‚– DB_Insert (Insert DB Record) instruction
ï‚– DB_Update (Update DB Record) instruction
Precautions for Correct Use
Only the processing for inserting or updating records is spooled. For the other processing,
you need to execute the instruction again.