You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
报错:The db history topic or its content is fully or partially missing. Please check database history topic configuration and re-execute the snapshot.
#3937
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
使用flink-cdc-3.2.1实时同步sqlserver2019数据库到mysql8,SqlServer数据库是一个运行很久的数据库,数据库名称中包含特殊字符减号,同步作业报错,如标题。
我们在这个SqlServer上新建的数据库,数据库名称中没有特殊字符,同步作业可以正常实时同步。
出现这样问题,是什么原因,怎么解决?
下边是报错的flinksql:
CREATE TABLE t5(
uuid string ,
product_name string,
weight_date string,
car_no string,
consign_unit string,
gross_weight_id string,
PRIMARY KEY (uuid) NOT ENFORCED
)WITH(
'connector' = 'sqlserver-cdc',
'hostname' = '10.6.1.34',
'port' = '1433',
'username' = 'sa',
'password' = 'fsjldb',
'database-name' = 'db-web-pound',
'table-name' = 'dbo.db_measure_infos_20250305',
'server-time-zone'='Asia/Shanghai'
);
CREATE TABLE t6(
uuid string ,
weight_date string,
weight_time string,
PRIMARY KEY (uuid) NOT ENFORCED
)WITH(
'connector' = 'sqlserver-cdc',
'hostname' = '10.6.1.34',
'port' = '1433',
'username' = 'sa',
'password' = 'fsjldb',
'database-name' = 'db-web-pound',
'table-name' = 'dbo.db_weight_infos_20250305',
'server-time-zone'='Asia/Shanghai'
);
CREATE TABLE tt5(
id string,
weight_date string,
material_type string,
vehicles_license string,
dispatcher string,
one_test_time timestamp(3),
PRIMARY KEY (id) NOT ENFORCED
)WITH(
'connector' = 'jdbc',
'driver' = 'com.mysql.cj.jdbc.Driver',
'url' = 'jdbc:mysql://10.6.1.82:3306/logistics',
'table-name' = 'db_weight_one_real_time',
'username' = 'furnace',
'password' = 'furnace'
);
insert into tt5(id,weight_date,material_type,vehicles_license,dispatcher,one_test_time)
select
t5.uuid
,t5.weight_date
,t5.product_name
,t5.car_no
,t5.consign_unit
,TO_TIMESTAMP(CONCAT(t6.weight_date, ' ', t6.weight_time),'yyyy-MM-dd HH:mm:ss.SSS')
FROM t5
LEFT JOIN t6 ON t5.gross_weight_id = t6.uuid;
Beta Was this translation helpful? Give feedback.
All reactions