Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01 3.00 4.00

Summary:
Question: I am sending a report to a SQL server and I find that the system will slowly degrade over several days? 

Solution:
Connecting to a SQL Server or other database with the cicode functions SQLConnect() or DevOpen() will connect via the ODBC driver. From our experence this operation is very slow and resouce consuming (memory and CPU and network bandwidth). We have also found that a large number of ODBC drivers also leak memory every time you connect to the SQL server (see Q1551 for this problem with Oracle). That is every time you disconnect from the database the ODBC driver does not free all the memory it allocated when it connected. The result is that after connecting and disconnecting many times you can cause the performance of your computer to degrade and may even crash. It is quite typical to have a report in Citect which is runs very frequently (eg 20 times or more a day) which will cause this to occur.

The best solution to this problem is to connect to the SQL server when Citect starts up and only disconnect when you shut Citect down. Keeping the connection open to the SQL server will only use a small amout of resources on the SQL server and will greatly increase the performance of your Citect system. Most other applications which use SQL servers operate in this way, this is why the memory leaks in the ODBC drivers have not caused a problem to other users (and why they have not been fixed by the ODBC driver developers).

 

Keywords:
 

Attachments