调用sys.fn_dump_dblog时,AWS DMS CDC SQL Server源无法启动

问题描述 投票:0回答:1

AWS DMS正在从SQL Server 2014标准版进行复制。将任务简化为一个简单的表格。所有表都有主键,并且在服务器上启用了复制。

任务开始没有恢复,尝试启动时失败,以下是在日志中:

[SOURCE_CAPTURE ]D: Going to execute: ', select top 1 [Current LSN], from sys.fn_dump_dblog (NULL, NULL,NULL, 0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), where operation='LOP_BEGIN_XACT', and [Begin Time]>= cast('2018-09-05T09:47:08' as datetime), ' (sqlserver_log_queries.c:4172)

[SOURCE_CAPTURE ]D: Failed to execute statement: '' [1022502] (ar_odbc_stmt.c:2478)'

[SOURCE_CAPTURE ]D: RetCode: SQL_ERROR SqlState: 22007 NativeError: 242 Message: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value. Line: 1 Column: -1 [1022502] (ar_odbc_stmt.c:2484)

如果我重新创建查询:

select top 1 [Current LSN], * from sys.fn_dump_dblog (NULL, NULL,NULL, 0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL) where operation='LOP_BEGIN_XACT' and [Begin Time]>= cast('2018-09-05T09:47:08' as datetime)

然后在它运行的SSMS中运行它但不返回值。

基于错误; '将nvarchar数据类型转换为日期时间数据类型会导致超出范围的值',这让我觉得这个问题与'[Begin Time]> = cast('2018-09-05T09)有关:47:08'作为日期时间''

有没有人遇到过这个?

它是否特定于SQL Server版本?

我可以在复制任务的配置中做些什么吗?

我可以对SQL Server的复制分发进行更改吗?

sql-server amazon-web-services cdc dms
1个回答
1
投票

找到了解决方案。这是我想到的'演员'

将用户的语言更改为us_english

USE [master]
GO
ALTER LOGIN my_dms_user WITH DEFAULT_LANGUAGE = us_english
GO
© www.soinside.com 2019 - 2024. All rights reserved.