Install new SQL sender

From PlcWiki

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
-
''Old'' SQL sender have some issues, for example sometimes there is a lock file and data don't come into database or on rework station can be tmp file and data again don't go into database. Solution for both cases is install new sql sender.
+
''Old'' SQL sender have some issues, for example sometimes there is a lock file and data doesn't come into database or on rework station can be a tmp file and data again doesn't go into the database. Solution for both cases is to install a new sql sender.
First of all with plc_service_list -s what kind of sender is there, old one is '''plc_sql_sender''' and new one is '''sqlsenderdirq.pmc''' and '''sqlsender.pmc''' (since new one using dirq there are two services).
First of all with plc_service_list -s what kind of sender is there, old one is '''plc_sql_sender''' and new one is '''sqlsenderdirq.pmc''' and '''sqlsender.pmc''' (since new one using dirq there are two services).

Current revision as of 08:00, 11 January 2021

Old SQL sender have some issues, for example sometimes there is a lock file and data doesn't come into database or on rework station can be a tmp file and data again doesn't go into the database. Solution for both cases is to install a new sql sender.

First of all with plc_service_list -s what kind of sender is there, old one is plc_sql_sender and new one is sqlsenderdirq.pmc and sqlsender.pmc (since new one using dirq there are two services).

If there is old one, you can install new one with yum

[root@plcpcorework01 var]# yum install clever_sqlsender

that should be all. You can check plc_service_list - s again and you should see both new services. If there is old slq file in var folder, you can send it into database manually. First of all you need to edit that file and add ; at the end (or start) of every row. Every row is sql command but ; is missing. After you add it, you can use command from this example:

[root@plcpcorework01 var]# cat /usr/local/plc/var/plc_RE.sql.tmp | mysql -h plcpcosql plc
Personal tools