|
目前,不支持 H2 的大整数/时区数据库迁移脚本。这些迁移脚本针对其他受支持的数据库进行了详细说明。如果存在现有 H2 数据库且需要进行时区修正,则必须迁移至受支持的数据库,例如 PostgreSQL 或 MS SQL。如果应用程序将在未进行时区修正的情况下运行,则可在 H2 上升级至 ThingWorx 的最新版本。请注意,您将跳过前面提到的设置 ThingWorx 服务器时区部分。
|
如果必须升级 Java 版本,请在升级 Java 前先升级 ThingWorx。 |
如果不能执行此操作,则升级将失败,您必须再次部署较旧版本 (如果进行了架构更新,则需要回滚/恢复数据库),并添加缺失的索引值或从数据表中移除自定义索引,然后再执行升级。 |
仅在使用 InfluxDB 1.7.x (用于 ThingWorx 8.5.x 或 9.0.x) 至 InfluxDB 1.8.x (用于 ThingWorx 9.1.x 或 9.2.x) 升级 ThingWorx 时需要此部分中的步骤。 |
validation.properties 文件将在启动 ThingWorx 时创建。如果要保留所做的任何更改,将文件保存在 ThingworxStorage 目录之外的位置,然后继续移除 esapi 目录。启动时,ThingWorx 将重新创建该文件,您可以将自定义正则表达式重新添加到自动生成的 validation.properties 文件中。 有关其他信息,请参阅本主题。 |
所有升级均需且仅需本部分中的步骤 1。 如果是 ThingWorx 8.4.x 或 8.5.x --> 9.0.x、9.1.x 或 9.2.x 版本的升级,请执行本部分中的其余步骤。 如果是 ThingWorx 9.0.x 或 9.1.x --> 9.1.x 或 9.2.x 版本的升级,请跳过本部分中的其余步骤。 |
无需运行 thingworxPostgresSchemaUpdate9.0-to-9.1.bat 脚本,因为 9.1 中不存在架构更新。虽然出于完整性目的,update 文件夹中包含了脚本,但该脚本却为空脚本且仅适用于执行自动升级过程的用户。 |
仅当从 ThingWorx 8.4.x 或 8.5.x 升级至 9.0.x、9.1.x 或 9.2.x 时,才需执行本部分中的其余步骤。如果从 ThingWorx 9.0.x 升级至 9.1.x 或 9.2.x.,则可跳过本部分中的其余步骤。 |
如果已使用 UTC 运行 ThingWorx,则对于大整数更改,仍需运行迁移,但可同时为 sourceTZ 和 targetTZ 参数 (在以下步骤中的某些脚本中可用) 提供 UTC 值。 |
在为以下数据迁移脚本指定时区时,所指定的时区名称必须与 pg_timezone_names() 脚本所显示的正式名称之一完全匹配。 |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxPostgresModelTablesDataUpdate.bat [-h ^<server^>] [-p ^<port^>] [-d ^<thingworx-database-name^>] [-u ^<thingworx-database-username^>] [-r ^<password^>] [-m ^<azure-managed-instance-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] 示例: thingworxPostgresModelTablesDataUpdate.bat -sourceTZ US/Eastern -targetTZ Etc/UTC |
出于性能方面的原因,这些脚本实际上不会在这些表中创建原始数据的副本。相反,这些脚本会将这些现有的表从 "<original-table-name>" 重命名为 "<original-table-name>_backup"。由此可避免执行实际复制数据的过程,因为这一过程可能会比较耗时。对这些现有的表 (进而成为备份表) 进行重命名后,即会以原始名称创建新表。这些新表为空,并且与原始表具有相同的作用 (因为它们的名称与原始表相同)。这些新表将在后面的步骤中用迁移数据进行填充。 |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxPostgresDataTableDataUpdate.bat [-h ^<server^>] [-p ^<port^>] [-d ^<thingworx-database-name^>] [-u ^<thingworx-database-username^>] [-r ^<password^>] [-m ^<azure-managed-instance-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] 示例: thingworxPostgresDataTableDataUpdate.bat -sourceTZ US/Eastern -targetTZ Etc/UTC |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxPostgresStreamDataUpdate.bat [-h ^<server^>] [-p ^<port^>] [-d ^<thingworx-database-name^>] [-u ^<thingworx-database-username^>] [-r ^<password^>] [-m ^<azure-managed-instance-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] thingworxPostgresValueStreamDataUpdate.bat [-h ^<server^>] [-p ^<port^>] [-d ^<thingworx-database-name^>] [-u ^<thingworx-database-username^>] [-r ^<password^>] [-m ^<azure-managed-instance-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] 示例: thingworxPostgresStreamDataUpdate.bat -sourceTz US/Eastern -targetTZ Etc/UTC -chunkSize 5000 thingworxPostgresValueStreamDataUpdate.bat -sourceTz US/Eastern -targetTZ Etc/UTC -chunkSize 5000 启动这两个迁移脚本后,请不要继续执行下一步操作,直到这些迁移脚本以及数据表迁移脚本 (在上一步中开始运行) 已成功完成运行。 |
尽管此脚本确实会对升级过程中创建的临时数据库对象执行一些清理操作,但此脚本并*不*会删除在上述步骤中创建的任何备份表,也不会修改这些备份表中的任何数据。此行为是有意而为之的,可确保数据不会遭到意外删除。如果要删除这些备份表,则必须手动执行此操作。 |
必须针对 ThingWorx 数据库运行以下命令。 |
所有升级均需且仅需本部分中的步骤 1。 如果是 ThingWorx 8.4.x 或 8.5.x --> 9.0.x、9.1.x 或 9.2.x 版本的升级,请执行本部分中的其余步骤。 如果是 ThingWorx 9.0.x 或 9.1.x --> 9.1.x 或 9.2.x 版本的升级,请跳过本部分中的其余步骤。 |
无需运行 thingworxMssqlSchemaUpdate9.0-to-9.1.bat 脚本,因为 9.1 中不存在架构更改。虽然出于完整性目的,update 文件夹中包含了脚本,但该脚本却为空脚本且仅适用于执行自动升级过程的用户。 |
仅当从 ThingWorx 8.4.x 或 8.5.x 升级至 9.0.x、9.1.x 或 9.2.x 时,才需执行本部分中的其余步骤。如果从 ThingWorx 9.0.x 升级至 9.1.x 或 9.2.x.,则可跳过本部分中的其余步骤。 |
如果已使用 UTC 运行 ThingWorx,则对于大整数更改,仍需运行迁移,但可同时为 sourceTZ 和 targetTZ 参数 (在以下步骤中的某些脚本中可用) 提供 UTC 值。 |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxMssqlModelTablesDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-d ^<thingworx-database-name^>] [-r ^<password^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] 示例: thingworxMssqlModelTablesDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC |
出于性能方面的原因,这些脚本实际上不会在这些表中创建原始数据的副本。相反,这些脚本会将这些现有的表从 "<original-table-name>" 重命名为 "<original-table-name>_backup"。由此可避免执行实际复制数据的过程,因为这一过程可能会比较耗时。对这些现有的表 (进而成为备份表) 进行重命名后,即会以原始名称创建新表。这些新表为空,并且与原始表具有相同的作用 (因为它们的名称与原始表相同)。这些新表将在后面的步骤中用迁移数据进行填充。 |
运行下面的数据表脚本时,将显示以下预期警告:Warning! The maximum key length for a clustered index is 900 bytes. The index 'data_table_indexes_pkey' has maximum length of 902 bytes. For some combination of large values, the insert/update operation will fail. |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxMssqlDataTableDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-d ^<thingworx-database-name^>] [-r ^<password^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] 示例: thingworxMssqlDataTableDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC -chunkSize 5000 |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxMssqlStreamDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-d ^<thingworx-database-name^>] [-r ^<password^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] thingworxMssqlValueStreamDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-d ^<thingworx-database-name^>] [-r ^<password^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] 示例: thingworxMssqlStreamDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC -chunkSize 5000 thingworxMssqlValueStreamDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC -chunkSize 5000 |
尽管此脚本确实会对升级过程中创建的临时数据库对象执行一些清理操作,但此脚本并*不*会删除在上述步骤中创建的任何备份表,也不会修改这些备份表中的任何数据。此行为是有意而为之的,可确保数据不会遭到意外删除。如果要删除这些备份表,则必须手动将其删除。 |
所有升级均需且仅需本部分中的步骤 1 和步骤 2。 如果是 ThingWorx 8.4.x 或 8.5.x --> 9.0.x、9.1.x 或 9.2.x 版本的升级,请执行本部分中的其余步骤。 如果是 ThingWorx 9.0.x 或 9.1.x --> 9.1.x 或 9.2.x 版本的升级,请跳过本部分中的其余步骤。 |
平台中存在的权限数量可能会影响完成升级所用的时间。较多的权限可能会增加完成升级所用的时间。 |
无需运行 thingworxAzureSchemaUpdate9.0-to-9.1.ps1 脚本,因为 9.1 中不存在架构更新。虽然出于完整性目的,update 文件夹中包含了脚本,但该脚本却为空脚本且仅适用于执行自动升级过程的用户。 |
用法: ./thingworxAzureSchemaUpdate8.4-to-8.5.ps1 -d ^database^ -h ^server^ -l ^username^ [-i ^serverInstance^] [-p ^port^] [-o ^option^] 示例: ./thingworxAzureSchemaUpdate8.4-to-8.5.ps1 -d thingworx -h test.sqldatabase.net -l sqlAdmin |
仅当从 ThingWorx 8.4.x 或 8.5.x 升级至 9.0.x、9.1.x 或 9.2.x 时,才需执行本部分中的其余步骤。如果从 ThingWorx 9.0.x 升级至 9.1.x 或 9.2.x.,则可跳过本部分中的其余步骤。 |
如果已使用 UTC 运行 ThingWorx,则对于大整数更改,仍需运行迁移,但可同时为 sourceTZ 和 targetTZ 参数 (在以下步骤中的某些脚本中可用) 提供 UTC 值。 |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxAzureModelTablesDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-r ^<password^>] [-d ^<thingworx-database-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] 示例: thingworxAzureModelTablesDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC -chunkSize 5000 |
出于性能方面的原因,这些脚本实际上不会在这些表中创建原始数据的副本。相反,这些脚本会将这些现有的表从 "<original-table-name>" 重命名为 "<original-table-name>_backup"。由此可避免执行实际复制数据的过程,因为这一过程可能会比较耗时。对这些现有的表 (进而成为备份表) 进行重命名后,即会以原始名称创建新表。这些新表为空,并且与原始表具有相同的作用 (因为它们的名称与原始表相同)。这些新表将在后面的步骤中用迁移数据进行填充。 |
运行下面的数据表脚本时,将显示以下预期警告:Warning! The maximum key length for a clustered index is 900 bytes. The index 'data_table_indexes_pkey' has maximum length of 902 bytes. For some combination of large values, the insert/update operation will fail. |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxAzureDataTableDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-r ^<password^>] [-d ^<thingworx-database-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] 示例: thingworxAzureDataTableDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC -chunkSize 5000 |
在运行脚本前,请在文本编辑器中打开脚本,以确保其默认环境值 (例如服务器、端口、时区等) 均正确无误且满足当前环境。如果脚本内定义的任何默认值不适用于当前环境,请通过指定一个或多个命令行自变量来覆盖运行脚本时的默认值。 |
用法: thingworxAzureStreamDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-r ^<password^>] [-d ^<thingworx-database-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^> thingworxAzureValueStreamDataUpdate.bat [-h ^<server^>] [-i ^<server-instance^>] [-p ^<port^>] [-l ^<login-name^>] [-r ^<password^>] [-d ^<thingworx-database-name^>] [-sourceTZ ^<source-timezone^>] [-targetTZ ^<target-timezone^>] [-chunkSize ^<chunk-size^>] 示例: thingworxAzureStreamDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC -chunkSize 5000 thingworxAzureValueStreamDataUpdate.bat -sourceTZ "Eastern Standard Time" -targetTZ UTC -chunkSize 5000 |
尽管此脚本确实会对升级过程中创建的临时数据库对象执行一些清理操作,但此脚本并*不*会删除在上述步骤中创建的任何备份表,也不会修改这些备份表中的任何数据。此行为是有意而为之的,可确保数据不会遭到意外删除。如果要删除这些备份表,则必须手动将其删除。 |
Java 11 对于 ThingWorx 9.2.0 及更高版本而言必不可少。有关详细信息,请参阅系统要求。 |
仅在使用 InfluxDB 1.7.x (用于 ThingWorx 8.5.x 或 9.0.x) 至 InfluxDB 1.8.x (用于 ThingWorx 9.1.x 或 9.2.x) 升级 ThingWorx 时需要此部分中的步骤。 |
应用程序日志错误 | 解决方案 |
---|---|
Error in copying permissions: Problems migrating database | 除 MSSQL 升级时会显示此迁移错误外,当存在任何已配置运行时权限且名称包含超过 256 个字符的已迁移服务、属性或事件名称时,也会显示此错误。要修复此错误,请将所有服务、属性和事件名称限制为 256 个字符以下。 |
[L: ERROR] [O: c.t.p.m.BaseReportingMigrator] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] Thing: <Name of Thing>, has a property which conflicts with one of the following system properties: isReporting,reportingLastChange,reportingLastEvaluation. Please refer to the ThingWorx Platform 8.4 documentation on how to resolve this problem. | 作为添加到 ThingWorx Platform 8.4 中的“事物状态”功能的一部分,以下属性之前已添加到可报告事物形态中,且用于对实现此形态的事物进行状态评估: • isReporting • reportingLastChange • reportingLastEvaluation 如果事物、事物模板或事物形态中已存在上述属性名称之一,则在启动此平台时,应用程序日志中将出现以下错误。要解决此问题,必须移除每个受影响实体中发生冲突的属性,并更新任何关联的实体 (例如“混搭”或“服务”) 以适应此更改。如果没有此更新,则关联的事物无法正确显示其报告状态,也无法进行更新/保存。正确更新这些实体后,系统会显示平台特定的报告属性,并将其用于评估设备是否已连接并实现通信。 |
[L: ERROR] [O: c.t.p.m.BaseReportingMigrator] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] ThingTempate: <Name of ThingTemplate>, has a property which conflicts with one of the following system properties: isReporting,reportingLastChange,reportingLastEvaluation. Please refer to the ThingWorx Platform 8.4 documentation on how to resolve this problem. | |
[L: ERROR] [O: c.t.p.m.BaseReportingMigrator] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] ThingShape: <Name of ThingShape>, has a property which conflicts with one of the following system properties: isReporting,reportingLastChange,reportingLastEvaluation. Please refer to the ThingWorx Platform 8.4 documentation on how to resolve this problem. |