数据库ETL同步 cdc开启,Git同步url添加用户名密码
添加双主键
alter table TChargeRecordMainNew add constraint pk_name primary key (任务编码,序号)
-------------------------用于ETL数据库同步复制----------------------------------
--数据库开启dcd
EXECUTE sys.sp_cdc_enable_db;
--需要监听的表
EXEC sys.sp_cdc_enable_table 'dbo', 'TChargeRecordMainNew', @role_name = NULL, @supports_net_changes =1
EXEC sys.sp_cdc_enable_table 'dbo', 'TChargeRecordDetailNew', @role_name = NULL, @supports_net_changes =1
EXEC sys.sp_cdc_enable_table 'dbo', 'TChargeItem', @role_name = NULL, @supports_net_changes =1
-------------------------Git同步添加用户名密码----------------------------------------
网上一般没这个提示,但是我想到了。。哈哈,记录我的小成就。