Slow Factory SQL

I am facing lot of issues with factory SQL .I am using SQL server 2000 SP 4 for Database , RS OPC gateway for OPC server. Yesterday my factory SQL crash i have configured redundant system but still it didn’t work. When i restarted my primary server and try to connect with factory SQL show me message “factory SQL service is starting and the dialogue box will disappear when it is started" and it take 1 to 2 hour to recover. After that i remove factory SQL on the primary server and reinstall factory SQL on it and from the previous back up i exported groups. Now whenever i start or stop groups it take 3-4 hours to complete the task.

Now primary is running on standalone.

On Secondary server (Now standalone) i am facing same issues. I disable redundancy and try to delete the project but though it has deleted the groups (Not folders) but still it is showing me message “Please Wait Operation in Progress” for the last 30 minutes.

There are few things i want to know.

  1. I think there is issue with third party OPC server .But my question is factory SQL design like that if there is issue with one group it will hang the complete FSQL.(I admit FSQL is much better than other logging software’s’)
  2. I am facing one issue. By mistake i created 2 folders with same name. Now when i delete one of them and save my project but when i open factory SQL front end it show me that folder again.
  3. I am getting “Write error” occured but at the next trigger grou[ executed without anu issue


Sorry, I just saw this post. It does sound like the most likely problem is that the OPC server is responding very slowly to the process of creating group subscriptions. This does affect the startup of FactorySQL, though there aren’t many options for better ways to handle it. We can’t create multiple subscriptions in parallel, due to how the connection to the OPC server works.

There are two other possible causes of slow startup times: first, since you’re using redundancy, the project is loaded from the database. If the database was responding slowly, this could cause the startup to take a while. However, I’ve never really seen this be an issue.

The second, more common problem, is that there is a lot of data stored up in the data cache. Processing this data can sometimes slow the system down. Look for “data_cache.fdb” in the install directory, and see how big it is. If it appears to be large (over a few MB), it might be causing problems.

As for the write error, I’m not sure why it’s displaying that. There are technically two result codes that get returned, and one may be success (the write status) while the second (the call result) is coming back as bad. You may be able to look at the diagnostic information in the OPC server to find more information.

To confirm that subscriptions are slow to create, or that my idea about the write error is correct, you could install the OPC Analyzer, and point a few of your groups to use that instead. This will pass the calls through to the opc server, but will show each call and how long it took.

As for the folder, I’m afraid you may need to export the project, perhaps to csv, clear the project in the database, and reload it. The folders appears to be stored inside of serialized objects, so there isn’t a way to delete them directly in the database. If you rename the folder, does the old name get created again?

Finally, what version of FactorySQL is this?


Sorry for late reply. I checked most of the issues are due to OPC Server and i am using Factory SQL 4.2.13 .I want to know one thing in a store procedure group i have 203 OPC Items .Normally how much time it will take to stop and start that group.

Talha Riasat


For a stored procedure group, I really don’t think it should take very much time to start. The group must make a subscription for opc, and then add the items, but otherwise it doesn’t have to do much else. That process might normal take 500ms or so, though it can definitely depend on the OPC server. It is possible that your opc server is trying to validate all of the items during that startup, instead of accepting them and sending bad quality later.

Did this problem start recently? Did the OPC get upgraded? If not, perhaps some devices are offline, and that is affecting other devices? OPC servers usually only use a few threads, and service the various devices in turn. If one is responding slowly, that can block operations (such as subscribing) for other devices.