It is currently Fri Jul 25, 2014 5:41 am

Post new topic Reply to topic  [ 2 posts ] 
 Configuration Files Corruption 
Author Message

Joined: Tue Nov 03, 2009 8:32 pm
Posts: 42
Post Configuration Files Corruption
I have a set of FactorySQL 4.2.12 running in redundancy mode, recently, The Master Server, started showing incorrect behavior, The Front End interface would take forever to Load, the groups were not triggering properly, If I would stop the FactorySQL service, everything on the server would be OK, but when factorySQL was started, it would seem as if the OS would Hangup for moments and Front End would be terribly slow in cases of loading property windows etc. Needless to say that it was a disaster. I tried using system restore but that didnt help either. The Front End Log file had entries like (Failed to Upgrade internal database....)

Now once I uninstalled and reinstalled FactorySQL (and deleted the folder from the program files), everything became ok.

So I am assuming that the configuration files were corrupted. Can you please comment as to how to avoid this or recover from this, without reinstalling.

Sun Apr 17, 2011 3:25 am

Joined: Sun Apr 02, 2006 3:43 pm
Posts: 2462
Post Re: Configuration Files Corruption
It is possible that the internal db became corrupted, but more often we've seen this caused by the logging system putting too much data in there. The problem is that error logging gets stored to the same db as configuration, and if the user sets it to log for many days, or if the system that trims the data hits an error for some reason, the file can grow to be very large, and can sometimes cause problems.

If you make sure that "debug" logging is not on and that you limit the records to 1000 as it is set by default, you shouldn't have a problem.

Still, we have seen actual corruption in some cases. It's rare, and has always been limited to the error log table.

In any case, the internal database system that we use (sqlite) does a good job of isolating corruption. If you have a FactorySQL system_database.fdb file that isn't working correctly, you can usually recover fairly easily by using the included sqlite3.exe tool to "dump" the database and then load it into a new file.

For example:
...Inductive Automation\FactorySQL> Utilities\sqlite3.exe system_database.fdb .dump > outfile.sql

...Inductive Automation\FactorySQL> Utilities\sqlite3.exe new_database.fdb < outfile.sql

Of course, FactorySQL should be stopped before you do this. Then move the old file, and rename the new file to "system_database", and restart FactorySQL.


Colby Clegg
Inductive Automation
Software Development

Mon Apr 18, 2011 8:19 am
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: