4 Basic Operations and Status Check
4-14
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
Checking the Status using a Get DB Connection Status Instruction
You can check the connection status and information of each DB Connection using a
DB_GetConnectionStatus (Get DB Connection Status) instruction.
Connection status of the DB
Connection status (Closed, Connected, or Disconnected) of the DB
Connection
information
of the DB
Connection
Connected time Total time when the DB is connected.
This value is cleared when the status changes from Closed to Connected.
Disconnected time Total time when the DB is disconnected.
This value is cleared when the status changes from Closed to Connected.
Number of normal
executions
Number of times when an SQL statement is normally executed.
Including the number of times when a spooled SQL statement is resent.
This value is cleared when the DB Connection Service is started.
Number of error
executions
Number of times when an SQL statement execution failed.
This is the number of times when an SQL statement is not spooled, but
discarded. The number of times when a statement is spooled is not included.
This value is cleared when the DB Connection Service is started.
Number of SQL statements stored in the Spool memory.
This value returns to 0 when the Spool data is cleared.
Spool usage Use rate of the Spool memory for the DB Connection in percentage (%).
This value returns to 0 when the Spool data is cleared.
Disconnection
date/time
Date and time when the DB is disconnected due to a network failure, server’s
problem, or other causes.
*1
This value is cleared when the DB Connection Service is started.
SQL status Error code defined in SQL Standards (ISO/IEC 9075) to be shown when a
network failure or an SQL Execution Error occurred.
*2
This value is cleared when the DB Connection Service is started.
Error code Error code that is specific to DB vendor to be shown when a network failure or
an SQL Execution Error occurred.
*2
When a network error has occurred, 0 is displayed for error code in some
cases. When 0 is displayed, check its SQL status.
This value is cleared when the DB Connection Service is started.
Error message Error message that is specific to DB vendor to be shown when a network
failure or an SQL Execution Error occurred.
*2
This value is cleared when the DB Connection Service is started.
*1 The date and time information follows the time zone set when the power supply to the Controller is
turned ON. After you change the time zone, cycle the power supply.
*2 The value may differ by unit version of the CPU Unit.
The value of connection error to SQL Server was changed in the unit version 1.08 of the CPU Units.