cdc.fn_cdc_get_all_changes Invalid object name

Good people, tell me, what's the problem?

Added by

CREATE TABLE InventoryStudents (ID intidentity(1,1) notnull primarykey, StudentsName varchar(200) notnull, StudyYear smallint null) EXECUTE sys.sp_cdc_enable_table @source_schema=N'dbo', @source_name=N'InventoryStudents', @role_name=N'cdc_Admin', @capture_instance=N'HR_InventoryStudents', @supports_net_changes=1, @filegroup_name=N'PRIMARY' DECLARE @from_lsn binary(10),@to_lsn binary(10) SET @from_lsn=sys.fn_cdc_get_min_lsn('HR_InventoryStudents') SET @to_lsn=sys.fn_cdc_get_max_lsn() SELECT*FROM cd.fn_cdc_get_all_changes_HR_InventoryStudents (@from_lsn,@to_lsn,N'all') 

    1 answer 1

    cdc.fn_cdc_get_all_changes_экземпляр_отслеживания , where tracking_instance is the value that indicates the tracking instance if the changed data tracking system is enabled for the source table.

    Source of

    • Added to the question. - reactor