5 Other Functions
5-19
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
5
5-4 How to Prevent Losing SQL Statements
Necessary Actions against Power Interruption
You need to take an action against power interruption according to when power interruption
occurs.
This section describes the necessary actions using the following figure.
DB Connection Instruction
2) Reading DB Map
Variable
When spooling is enabled
5) Spooling the data when failure occurred
5)’ Spooling the data when Instruction Execution
Timeout occurred
6) Normal response
received
Dedicated area for the Spool function
or EM Area
(non-volatile memory)
The numbers in the following table are corresponding to the numbers in the above figure.
Power interruption timing during execution of
a DB Connection Instruction
Action
1) Executed
(When instruction
execution is
started)
Until the DB Connection Service
reads the present value of the
DB Map Variable after Execute
of the DB Connection Instruction
changed from FALSE to TRUE
_DBC_SEND_SENDING:
Sending SQL statement
Resend by user program
2) Reading DB Map
Variable
Until the DB Connection Service
sends the SQL statement to the
DB after the service started
reading the present value of the
3) Sending SQL
statement
Until the transmission is
completed since immediately
before the DB Connection
Service sends the SQL
4) Response from
DB
Until the response from DB is
received after the SQL statement
5) Spooling the
data when failure
occurred
While the SQL statement is
being spooled because a failure
has occurred
(when spooling is enabled)
5)’ Spooling the
data when
Instruction
Execution Timeout
While the SQL statement is
being spooled because an
Instruction Execution Timeout
has occurred.
(when spooling is enabled)
6) Normal response
received
After normal response is
received from the DB
_DBC_SEND_COMPLETE:
SQL statement transmission
Action not required
6)’ Data spooled After the SQL statement is
spooled
(when spooling is enabled)
_DBC_SEND_SPOOLED:
SQL statement spooled
Resend by Spool function
(auto resend or manual