FactorySQL Service won't start

We have been evaluating the demo, and are now having problems getting the FactorySQL service running. The Kepware demo is working and reading PLC values that we are trying to bring into FactorySQL and log to an Oracle database. Initially, we had problems getting FactorySQL to create a table in Oracle with the “store time/date stamp” and “store opc quality code”. Automatically create table was selected. It asked if it should add the columns, and when we said yes, it threw an invalid alter table option. We manually added the t_stamp and quality_code columns, and it then worked correctly. This issue sometimes happens, sometimes doesn’t. We aren’t sure exactly what causes this yet.

Anyway, once we created the columns by hand in Oracle, we used FactorySQL to log to the table using a block group. We wanted to add another column for OPC time stamp (to see if it differed from the Oracle time stamp; we want to update on every execution, not just on changes to the value), so we added the block data item for timestamp to the group. After starting to the block group back up, FSQL did create the extra column in Oracle and started logging. The service then failed and will not get back up and running. We have tried killing the FSQL tray program, rebooting, using different ports, etc, and the service will not start. In the Windows Services program, if we start the service, it will stop itself after a minute or so. Here is the error message from Windows Event Log (System): “The FactorySQL service terminated unexpectedly. It has done this n time(s).”

If we open the FactorySQL Connection Settings and test the connection, we see “Unable to Connect! Error Verifying Connection: No connection could be made because the target machine actively refused it 127.0.0.1:5505”

I’m guessing we may have seriously offended the FactorySQL service to where it won’t initialize to a point where anything can connect to it. I’m not sure if it has to do with the other intermittent Oracle issues we had been seeing, but obviously we’d like to know what has happened and how to recover from it. If you need any further details please let me know.

Thanks,

Dan

All of that is indeed strange. For the first problem, it has been noticed recently that the Oracle translator file is incorrect in the ALTER statement for more than one modification at a time. This has been fixed for the next update, but if you want to change it yourself you can edit “…Program Files\Inductive Automation\FactorySQL\databases\Oracle.xml” and change the lines:

<AlterString>ALTER TABLE {tablename} {alterdef}</AlterString> <AlterColumnDef>, ADD {colname} {type}</AlterColumnDef>
to…

<AlterString>ALTER TABLE {tablename} ADD ({alterdef})</AlterString> <AlterColumnDef>, {colname} {type}</AlterColumnDef>

Ultimately, though, you have a much larger problem than that. Indeed it sounds like something has gone drastically wrong in the configuration.

In the install directory, you’ll find a “system_database.fdb” file. If you could, please email that to support AT inductiveautomation.com

In the mean time, to get the service up and running again, you can just rename that file (and restart the service). You’ll lose what you’ve done so far (until we can fix the file/problem), but at least you’ll be back up and running.

Regards,