文档首页 > > 工具指南> Migration Tool SQL语法迁移工具> 日志参考> SQL迁移日志

SQL迁移日志

分享
更新时间: 2019/08/09 11:20

SQL Migration Tool(migrationtool.jar)支持以下类型的日志记录:

  • 活动日志
  • 错误日志
  • 成功读
  • 成功写
说明:
  • 如果用户指定了日志路径,所有日志都会保存在该路径下。
  • 如果未指定日志路径,Migration Tool会在TOOL_HOME路径下创建log文件夹,用于存储所有日志。
  • 为控制磁盘空间用量,日志文件的大小上限为10 MB。用户最多可拥有10个日志文件。
  • 工具日志不记录敏感数据,如查询。

活动日志

Migration Tool将所有日志和错误信息保存到migrationtool.log文件中。该文件位于log文件夹中。migrationtool.log文件包含执行迁移的用户、迁移的文件、时间戳等详细信息。活动日志的记录级别为INFO。

migrationtool.log的文件结构如下:

2018-09-01 14:54:26,011 INFO CLMigrationUtility:145 MigrationTool is initiated by testmigration
2018-09-01 14:54:26,019 INFO PropertyLoader:98 Successfully loaded Property file : config/application.properties
2018-09-01 14:54:26,019 INFO ApplicationPropertyLoader:36 Application properties have been loaded Successfully
2018-09-01 14:54:26,024 INFO PropertyLoader:98 Successfully loaded Property file : config/features-teradata.properties
2018-09-01 14:54:26,024 INFO FeatureLoader:36 Features have been loaded Successfully
2018-09-01 14:54:26,108 INFO MigrationService:178 Migration process start time : Sat Sep 01 14:54:26 CST 2018
2018-09-01 14:54:26,121 INFO TeradataMigrationService:395 Number of Available Processors: 8
2018-09-01 14:54:26,121 INFO TeradataMigrationService:404 Configured simultaneous processes in the Tool : 3
2018-09-01 14:54:26,122 INFO PropertyLoader:98 Successfully loaded Property file : config/teradata-set-table.properties
2018-09-01 14:54:26,122 INFO PropertyLoader:98 Successfully loaded Property file : config/teradata-date-format.properties
2018-09-01 14:54:26,126 INFO MigrationProcessor:95 File name: /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql is started
2018-09-01 14:54:26,129 INFO FileHandler:187 File /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql will be read with charset :us-ascii
2018-09-01 14:54:26,150 INFO FileHandler:704 File /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql will be written with charset : us-ascii
2018-09-01 14:54:26,185 INFO TeradataQueryHandler:71 Position: 1
2018-09-01 14:54:26,218 INFO TeradataQueryHandler:71 Position: 2
2018-09-01 14:54:26,234 INFO FileHandler:704 File /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql will be written with charset : us-ascii
2018-09-01 14:54:26,239 INFO MigrationProcessor:167 File name: /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql is processed successfully
2018-09-01 14:54:26,240 INFO PropertyLoader:323 Successfully updated Property file : config/teradata-set-table.properties
2018-09-01 14:54:26,241 INFO PropertyLoader:323 Successfully updated Property file : config/teradata-date-format.properties
2018-09-01 14:54:26,241 INFO MigrationService:196 Total number of SQL files in Input folder : 1
2018-09-01 14:54:26,241 INFO MigrationService:200 Number of queries failed : 0
2018-09-01 14:54:26,241 INFO MigrationService:203 Number of files failed : 0
2018-09-01 14:54:26,241 INFO MigrationService:208 Number of files migrated successfully : 1
2018-09-01 14:54:26,241 INFO CLMigrationUtility:158 Log file : migrationtool.log and the file is present in the path : ./log
2018-09-01 14:54:26,242 INFO CLMigrationUtility:162 Error Log file : migrationtoolError.log and the file is present in the path : ./log
2018-09-01 14:54:26,242 INFO CLMigrationUtility:166 Migration process end time : Sat Sep 01 14:54:26 CST 2018
2018-09-01 14:54:26,242 INFO CLMigrationUtility:172 Total process time : 226 ms
2018-09-01 15:34:55,901 INFO CLMigrationUtility:145 MigrationTool is initiated by testmigration
2018-09-01 15:34:55,910 INFO PropertyLoader:98 Successfully loaded Property file : config/application.properties
2018-09-01 15:34:55,911 INFO ApplicationPropertyLoader:36 Application properties have been loaded Successfully
2018-09-01 15:34:55,916 INFO PropertyLoader:98 Successfully loaded Property file : config/features-teradata.properties
2018-09-01 15:34:55,916 INFO FeatureLoader:36 Features have been loaded Successfully
2018-09-01 15:34:56,002 INFO MigrationService:178 Migration process start time : Sat Sep 01 15:34:56 CST 2018
2018-09-01 15:34:56,013 INFO TeradataMigrationService:395 Number of Available Processors: 8
2018-09-01 15:34:56,013 INFO TeradataMigrationService:404 Configured simultaneous processes in the Tool : 3
2018-09-01 15:34:56,014 INFO PropertyLoader:98 Successfully loaded Property file : config/teradata-set-table.properties
2018-09-01 15:34:56,014 INFO PropertyLoader:98 Successfully loaded Property file : config/teradata-date-format.properties
2018-09-01 15:34:56,019 INFO MigrationProcessor:95 File name: /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql is started
2018-09-01 15:34:56,022 INFO FileHandler:187 File /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql will be read with charset :us-ascii
2018-09-01 15:34:56,043 INFO FileHandler:704 File /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql will be written with charset : us-ascii
2018-09-01 15:34:56,077 INFO TeradataQueryHandler:71 Position: 1
2018-09-01 15:34:56,115 INFO TeradataQueryHandler:71 Position: 2
2018-09-01 15:34:56,133 INFO FileHandler:704 File /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql will be written with charset : us-ascii
2018-09-01 15:34:56,138 INFO MigrationProcessor:167 File name: /home/testmigration/18.1_PI_1_TD/MigrationTool/DTS/DTSffix.sql is processed successfully
2018-09-01 15:34:56,140 INFO PropertyLoader:323 Successfully updated Property file : config/teradata-set-table.properties
2018-09-01 15:34:56,140 INFO PropertyLoader:323 Successfully updated Property file : config/teradata-date-format.properties
2018-09-01 15:34:56,140 INFO MigrationService:196 Total number of SQL files in Input folder : 1
2018-09-01 15:34:56,141 INFO MigrationService:200 Number of queries failed : 0
2018-09-01 15:34:56,141 INFO MigrationService:203 Number of files failed : 0
2018-09-01 15:34:56,141 INFO MigrationService:208 Number of files migrated successfully : 1

错误日志

Migration Tool仅将迁移过程中发生的错误记录到migrationtoolError.log文件中。该文件位于log文件夹中。migrationtoolError.log文件包含这些错误的日期、时间,文件详细信息(如文件名),以及查询位置等信息。错误日志的记录级别为ERROR。

migrationtoolError.log的文件结构如下:

2017-06-29 14:07:39,585 ERROR TeradataBulkHandler:172 Error occurred during processing of input in Bulk Migration. PreQueryValidation failed in not proper termination or exclude keyword. /home/testmigration/Documentation/Input/c005.sql for Query in position : 4
2017-06-29 14:07:39,962 ERROR TeradataBulkHandler:172 Error occurred during processing of input in Bulk Migration. PreQueryValidation failed in not proper termination or exclude keyword. /home/testmigration/Documentation/Input/c013.sql for Query in position : 11
2017-06-29 14:07:40,136 ERROR QueryConversionUtility:250 Query is not converted as it contains unsupported keyword: join select
2017-06-29 14:07:40,136 ERROR TeradataBulkHandler:172 Error occurred during processing of input in Bulk Migration. PreQueryValidation failed in not proper termination or exclude keyword. /home/testmigration/Documentation/Input/sample.sql for Query in position : 1
2017-06-29 14:07:40,136 ERROR TeradataBulkHandler:172 Error occurred during processing of input in Bulk Migration. PreQueryValidation failed in not proper termination or exclude keyword. /home/testmigration/Documentation/Input/sample.sql for Query in position : 3

成功读

在Migration Tool读取文件之后,该文件将被记录日志以进行跟踪。在某些情况下,用户可通过这些日志获取文件执行状态的信息。该文件位于log文件夹中。日志文件包括日期、时间、文件名等详细信息。此日志文件的日志记录级别为INFO。

successRead.log的文件结构如下:

2017-07-21 14:13:00,461 INFO readlogger:213 /home/testmigration/Documentation/is not in.sql is read successfully.
2017-07-21 14:13:00,957 INFO readlogger:213 /home/testmigration/Documentation/date quotes.sql is read successfully.
2017-07-21 14:13:01,509 INFO readlogger:213 /home/testmigration/Documentation/column alias replace.sql is read successfully.
2017-07-21 14:13:02,034 INFO readlogger:213 /home/testmigration/Documentation/sampleRownum.sql is read successfully.
2017-07-21 14:13:02,578 INFO readlogger:213 /home/testmigration/Documentation/samp.sql is read successfully.
2017-07-21 14:13:03,145 INFO readlogger:213 /home/testmigration/Documentation/2.6BuildInputs/testWithNodataSamples.sql is read successfully.

成功写

Migration Tool读取、处理文件并将输出写入磁盘。这个过程被记录到成功写日志文件中。在某些情况下,用户可通过此文件了解哪些文件已处理成功。在重新运行的情况下,用户可以跳过这些文件运行剩余的文件。该文件位于log文件夹中。日志文件包括日期、时间、文件名等详细信息。此日志文件的日志记录级别为INFO。

successWrite.log的文件结构如下:

2017-07-21 14:13:00,616 INFO writelogger:595 /home/testmigration/Documentation/is not in.sql has written successfully.
2017-07-21 14:13:01,055 INFO writelogger:595 /home/testmigration/Documentation/date quotes.sql has written successfully.
2017-07-21 14:13:01,569 INFO writelogger:595 /home/testmigration/Documentation/column alias replace.sql has written successfully.
2017-07-21 14:13:02,055 INFO writelogger:595 /home/testmigration/Documentation/sampleRownum.sql has written successfully.
2017-07-21 14:13:02,597 INFO writelogger:595 /home/testmigration/Documentation/samp.sql has written successfully.
2017-07-21 14:13:03,178 INFO writelogger:595 /home/testmigration/Documentation/testWithNodataSamples.sql has written successfully.
分享:

    相关文档

    相关产品

文档是否有解决您的问题?

提交成功!

非常感谢您的反馈,我们会继续努力做到更好!

反馈提交失败,请稍后再试!

*必选

请至少选择或填写一项反馈信息

字符长度不能超过200

提交反馈 取消

如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨

跳转到云社区