Troubleshooting
Ignition historian create table fails after a disabled restore
Short answer
The double in the failing CREATE TABLE means the MSSQL JDBC driver has no translator selected: a restore with the disable option checked disabled every translator, so generic type names reach SQL Server unchanged and the statement fails to parse. Enable the translators, select the MSSQL translator under Connections > Databases > Settings, restart the gateway, and the sqlt_data partition table creates.
On this page
- Read the failure before changing anything
- Why the restore disabled the translation
- Fix: enable the translators and select the MSSQL one
- Worked example: the November 2025 partition on a restored 8.3 gateway
- Confirm the repair, not just the connection
- What not to do first
- If you restore the gateway again, do it isolated
- Questions asked
The double token in the failing CREATE TABLE is the whole fault. The historian hands its JDBC driver a generic type name and expects the driver's translator to rewrite it into a SQL Server keyword. After a gateway restore with the disable option checked, every translator comes up disabled, the MSSQL driver is left with no translator selected, and the generic name double reaches SQL Server verbatim. SQL Server's floating-point column keyword is float, so the statement fails to parse and the historian logs Incorrect syntax near ','. Enable the translators, select the MSSQL translator on the Connections > Databases > Settings page, restart the gateway, and the sqlt_data partition table creates on the next write, without rebuilding the connection, the provider or any table.
Read the failure before changing anything #
The exception chain names the failing operation. The store-and-forward pipeline flushes recorded history to the connection, the historian's TagHistoryDatasourceSink asks the partition manager for the current month's partition, and the partition manager issues the create:
CREATE TABLE sqlt_data_1_2025_11 (tagid int,intvalue bigint,floatvalue double,stringvalue varchar(255),datevalue datetime,dataintegrity int,t_stamp bigint,PRIMARY KEY (tagid,t_stamp))
The gateway wraps this in com.inductiveautomation.ignition.gateway.storeforward.exceptions.DataStorageException; the root cause from the driver is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ','. Read it as three facts:
- The stack runs through
AbstractDirectorPartitionManager.createPartitionTable— the historian is provisioning its storage schema, not failing a login or a routine insert. floatvalue doubleis a generic type token that was never translated on its way to the database.Incorrect syntax near ','is a parse rejection: the database refused the statement's grammar and never reached an object-rights check.
Separate this from two neighbors before touching anything. A connection showing FAULTED on the gateway status page is SQL Server connection faults after an upgrade, a different repair. A missing grant fails at execution and names the missing right, the territory of SQL historian database permissions: the full six rights. A parse error on generated DDL is neither of those.
Why the restore disabled the translation #
The reported case is an Ignition 8.3 gateway restored to a new machine from a .gwbk with the disable option checked, writing to SQL Server 2022 Standard on the same versions the project was developed on, so nothing on the database side changed. The disabled restore exists to bring a gateway up without its components acting on other systems; on this gateway it also left every entry on the Translators tab disabled. With all translators disabled, the Translator field on the MSSQL driver under Connections > Databases > Settings sits blank, and a driver with no translator does no type rewriting: the historian's generic names go to the database exactly as written.
That is why the first two repairs attempted in the reported case achieved nothing. Recreating the database connection and recreating the historian provider both leave the translators disabled and the field blank. The translator mechanism serves every backend, and the MySQL counterpart of this failure is historian table creation failing on MySQL over ODBC, a different connection type with its own checks.
Fix: enable the translators and select the MSSQL one #
- In the gateway webpage, open Connections > Databases > Settings and read the Translator field on the MSSQL driver. A blank field is the confirmation.
- Open the Translators tab on the same settings page and enable the disabled translators. The MSSQL entry should show a populated Data Type Mapping at the bottom of its listing; that mapping is what turns a generic type into a SQL Server keyword.
- Return to the driver settings and select the MSSQL translator for the MSSQL driver, then do the same for every other driver in use. The restore disabled all of them, not only this one.
- Save, then restart the gateway so the corrected configuration loads.
- Let the historian flush its stored data or trigger a normal tag-history write, and watch the logs. The partition
CREATE TABLEcompletes.
Worked example: the November 2025 partition on a restored 8.3 gateway #
Inputs, each from the reported case:
- Gateway: Ignition 8.3, restored on a new machine from a
.gwbkwith the disable option checked. - Backend: SQL Server 2022 Standard, versions matching the original machine.
- Failing object: the November 2025 partition
sqlt_data_1_2025_11, created by the historian on first write to that month. - Driver state after the restore: Translator field blank; every translator on the Translators tab disabled.
Rule in words: the historian declares each storage column with a generic type, and the driver's selected translator rewrites those declarations into the backend's own type keywords before execution. No selected translator means no rewrite; the generic token is sent as-is.
The arithmetic, on the logged statement: it declares 7 columns, whose type tokens in order are int, bigint, double, varchar(255), datetime, int, bigint. Of those 7 tokens, 6 are valid SQL Server column types and 1, the double on floatvalue, is not. One invalid token against six valid ones localizes the fault to the type-name conversion: the schema the historian wants is sound, the connection and credentials work, and only the translation step is missing.
Result: with the translators enabled, the MSSQL translator selected on the driver and the gateway restarted, sqlt_data_1_2025_11 created successfully on the next flush.
Decision: on a gateway restored with the disable option checked, treat Incorrect syntax near ',' on a historian CREATE TABLE as a blank Translator field until the settings page proves otherwise. If the field is blank, fix it there; do not rebuild the connection, the provider or the tables.
Confirm the repair, not just the connection #
- In SQL Server, verify the partition table exists with the historian's columns and the two-column primary key on
tagidandt_stamp. - Verify the syntax exception does not recur when the historian creates later partitions.
- Read values back through a tag-history query for the affected tags and time range. A connection that tests healthy proves login only; a created partition plus a stored, readable value is the real proof.
What not to do first #
- Do not drop historian tables or recreate the database to force a clean schema. A missing translator is unaffected by both, and dropped tables take retained history with them.
- Do not hand-edit a partition's column types. Each new partition comes from the historian's schema and the active translator, so the fault repeats on the next month's table and an edited table can disagree with the generated ones.
- Do not reach for a second restore before checking the Translator field. Enabling a translator directly is the narrower repair.
If you restore the gateway again, do it isolated #
An enabled restore on the live network points real database connections and tag writes at production systems the moment it starts, which is exactly what the disabled restore was meant to prevent. The sequence that honors both goals: restore on a network-isolated system, disable the specific connections and components there, then reconnect to the network. Treat a second restore as a deliberate rollback rather than a repair, because it returns the gateway to the backup state and nothing since.
Questions asked
Does recreating the database connection or the historian provider fix it?
No. Both were recreated in the reported case before the cause was found, and the error persisted, because a rebuilt connection still inherits a blank Translator field while the translators remain disabled. Enable the translators first, then reselect the translator on the driver; only if the field is correctly filled and the failure continues is the connection itself worth rebuilding.
Is it safe to restore the gateway again without the disable option?
Restoring again resets the gateway to whatever the .gwbk contains, so it discards the translator fix and any other change made since the backup, and it is not a selective cure for other recurring post-restore symptoms. If the disabled restore was chosen to keep the gateway from writing to other systems, restore on a network-isolated machine and disable individual connections there first. After any restore, recheck the Translator field rather than assuming it carried over.
Can I just edit the created table and change double to float myself?
No. Editing one partition fixes that table only. The historian generates each new partition from its schema and the driver's translator, so the next monthly partition fails the same way, and a hand-edited table can disagree with the generated ones. Fix the translator so every partition is created correctly in the first place.
The Translator field is filled in, but the CREATE TABLE still fails. What next?
Capture the new statement and exception and check whether floatvalue is still emitted as double. On the Translators tab, confirm the MSSQL entry is enabled and its Data Type Mapping is populated, then confirm the running driver is assigned that translator after a restart. A repeat with the translator correctly in place points at the mapping itself, not at the restore.