This article covers loggers related to Databases that were introduced in Ignition version 7.8.X.
Loggers in this article:
DatabaseConnectionManager
A series of loggers for monitoring database connections and individual queries.
DatabaseConnectionManager.{DatabaseConnectionProfileName}
- Logger where {DatabaseConnectionProfileName} is denoted as the name of an existing database connection profile. This logger will report any connection issues sent back from the database server itself.
-
DEBUG log that provides the error sent back from a failed connection to a MySQL database:
Database connection validity test failed.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server....
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server....
Caused by: java.net.ConnectException: Connection refused: connect
...
-
DEBUG log that provides the error sent back from a failed connection to a MySQL database:
DatabaseConnectionManager.{DatabaseConnectionProfileName}.Selects and DatabaseConnectionManager.{DatabaseConnectionProfileName}.Updates.
-
{DatabaseConnectionProfileName}.Updates are also provided per database connection. These allow you to monitor specific queries down to the exact syntax being executed against a database. It will not provide values of dynamic parameters.
-
TRACE log from Updates showing the full query entered from the Database Query Browser:
INSERT INTO test_table (NAME, TIMESTAMP) VALUES ('Taron','Wed Apr 24 09:11:47 PDT 2019')
-
TRACE log from Updates showing the full query entered from the Database Query Browser:
-
-
TRACE log from Updates showing the full query entered from the Database Query Browser with an illegal insert to an ID column. (Note: again, there is no warning of bad syntax stated in the logs, but the full query is still reported):
INSERT INTO test_table (ID, NAME, TIMESTAMP) VALUES (3,'Taron','Wed Apr 24 09:11:47 PDT 2019')
-
TRACE log from Updates showing the full query entered from the Database Query Browser with an illegal insert to an ID column. (Note: again, there is no warning of bad syntax stated in the logs, but the full query is still reported):
-
-
TRACE log from Updates showing INSERT and UPDATE to tag history tables:
UPDATE sqlth_sce SET "end_time"=? WHERE "scid"=? and "rate"=? and "start_time"<=? and "end_time">=?
INSERT INTO sqlt_data_1_2021_10("tagid", "intvalue", "floatvalue", "stringvalue", "datevalue", "dataintegrity", "t_stamp") VALUES(?,?,?,?,?,?,?) [Batch x1]
-
TRACE log from Updates showing INSERT and UPDATE to tag history tables:
-
-
TRACE log from Selects showing a SELECT statement for a running, real-time Easy Chart trending Tag history:
SELECT "tagid","intvalue","floatvalue","stringvalue","datevalue","t_stamp","dataintegrity" FROM sqlt_data_1_2021_10 WHERE "t_stamp">=? and "t_stamp"<=? and ("tagid"=?) ORDER BY "t_stamp" ASC, "tagid" ASC
-
TRACE log from Selects showing a SELECT statement for a running, real-time Easy Chart trending Tag history:
-
-
TRACE log from Selects that shows a default logger accompanying FaultedConnectionRetryDaemon for testing valid database connections. A simple SELECT will also be running every 10 seconds:
SELECT 1
-
TRACE log from Selects that shows a default logger accompanying FaultedConnectionRetryDaemon for testing valid database connections. A simple SELECT will also be running every 10 seconds:
DatabaseConnectionManager.FaultedConnectionRetryDaemon
- Monitors connection tests being made to existing databases every 10 seconds. Expect to see both an attempt to connect and a result of that test.
-
DEBUG log showing a successful connection request and response to an existing database server:
Running test for datasource "{DatabaseConnectionProfileName}" (Current status = Valid)
Completed test for datasource "{DatabaseConnectionProfileName}" in 0 ms, status is now: Valid
-
DEBUG log showing a successful connection request and response to an existing database server:
-
-
DEBUG log showing attempts to communicate to an existing, faulted connection. This log typically appears before the result of {DatabaseConnectionProfileName} when it returns an error:
Running test for datasource "{DatabaseConnectionProfileName}" (Current status = Faulted)
-
DEBUG log showing attempts to communicate to an existing, faulted connection. This log typically appears before the result of {DatabaseConnectionProfileName} when it returns an error:
Comments
0 comments
Article is closed for comments.