第25行开始清除事务和命令distribution cleanup job2

 

sp_MSdistribution_delete以发布库(@publisher_database_id)为单位清除:

  1. 第15行,得到改发布库的需要清除的最大序列号(@max_cleanup_xact_seqno)
  2. 地20行,调用sp_MSdelete_publisherdb_trans来删除这些数据,所以早于@max_cleanup_xact_seqno的数据都会被删除

distribution cleanup job2

 

 

sp_MSdelete_publisherdb_trans是真正执行删除操作的存储过程。该存储过程删除msrepl_commands,并通过调用sp_MSdelete_dodelete来删除msrepl_transactions

相关文章:

  • 2022-01-12
  • 2021-07-06
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-12
  • 2021-07-05
  • 2021-08-11
  • 2021-04-17
  • 2021-08-19
  • 2021-08-21
相关资源
相似解决方案