Deploying FactorySQL and Oracle - Small problems

I’ve just arrived from our client’s factory. Although the system has been left working, I found a few bugs (or are they features? :slight_smile: ) on the process:

  1. I created a tag on KepServer with a name that started with a number (like 05TT456). When associating it with a group on FSQL, the name is prepended with an underscore (like _05TT456). Is this normal behavior? This changes the Oracle column names, and we needed the tags to have the same names everywhere.

  2. I created a tag on KepServer that is a Byte (Siemens S7 Ethernet driver). FSQL tells me on the OPC pane that it is a Short(2). Is this (2) the number of bytes of the tag? When associating it with a group on FSQL, it maps the tag’s type to a String in FSQL and a VARCHAR2(255) on Oracle. It should be an Integer, right? I know I can choose for it to be an Integer on the Groups pane (I did it and it worked fine), but I’m trying to automate the tag import process as much as possible. Having the person configurating FSQL changing the type of 4000 tags is not an option… maybe this can be addressed with the mapping on the Oracle.xml file?

  3. Whenever I try to create a new group with a table name that has been created automatically by FSQL and then dropped from the database, FSQL does a mess of the creation. It fails creating the table, but the table is created (and apparetly well) on Oracle. And when I try to start the group anyway, I get errors on trying to write NULL to the index column…

Any ideas so I can attack these issues?
Thanks!

[quote]'ve just arrived from our client’s factory. Although the system has been left working, I found a few bugs (or are they features? :slight_smile: ) on the process:

  1. I created a tag on KepServer with a name that started with a number (like 05TT456). When associating it with a group on FSQL, the name is prepended with an underscore (like _05TT456). Is this normal behavior? This changes the Oracle column names, and we needed the tags to have the same names everywhere. [/quote]

Beginning the name with an underscore a feature. It was implemented because most SQL databases won’t allow a column name to begin with a number. Oracle most likely does allow it. We’re looking into the option of creating a more flexible definition of what is legal and what isn’t based on different SQL database syntax and how to best autocorrect it when draging and dropping. I’ll work with you on getting this ready for your large project. In the meantime, exporting groups to .CSV, using a spreadsheet, then re-importing should allow you to do this in a timely manner.

This we’re unable to replicate. I’ll call you and check out your installation remotely. There is a definition in the oracle.xml file that maps ints, VT_I2, to integer. If FactorySQL is correctly reporting the type from the OPC server, then the FactorySQL OPC item type should be INT(2), which should properly translate to Oracle INTS. I’d like to check out your setup.

Oracle does not have “autoincrementing keys” like most SQL databases and FactorySQL depends on this. FactorySQL instead creates sequences and triggers in addition to the table (this is all defined in the .XML file). The first table that you created was probably correct. After dropping the table, FactorySQL probably created the table properly, but not the sequences and triggers.

When dropping the autocreated table, x in Oracle, also drop the associated sequence and trigger x_sequence and x_trigger. FactorySQL will then be able to create everything for you.