用于查询表中最新跟踪更改的看似有效的代码Fields
:
DECLARE @Begin_LSN BINARY(10), @End_LSN BINARY(10)
SET @Begin_LSN = sys.fn_cdc_get_min_lsn('Fields')
SET @End_LSN = sys.fn_cdc_get_max_lsn()
SELECT * FROM cdc.fn_cdc_get_all_changes_ordering_Fields (@Begin_LSN, @End_LSN, N'all')
GO
生成以下错误消息:
Msg 313, Level 16, State 3, Line 5
An insufficient number of arguments were supplied for the procedure or function cdc.fn_cdc_get_all_changes_ ... .
但是,如果我检查实际值,它们似乎都是有效的(不为空),查询
SELECT @Begin_LSN, @End_LSN, N'all';
返回
0x00000000000000000000 0x00002594000002130001 all