Home Dashboard Directory Help
Search

CHANGE_TRACKING_MIN_VALID_VERSION() returns value higher than CHANGE_TRACKING_CURRENT_VERSION() by alekpo


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 811766
Opened: 12/17/2013 12:57:04 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Hi,
I'm reposting bug: https://connect.microsoft.com/SQLServer/feedback/details/770014/change-tracking-min-valid-version-returns-value-higher-than-change-tracking-current-version/
I posted comment to closed issue and so there was no action taken to that one.

I have 3 questions regarding this issue:
1. Would it affect havily used system? (Some tables are not updated frequently)
2. Can I use function which I paste below instead of CHANGE_TRACKING_MIN_VALID_VERSION (function must support enabling/disabling change tracking on database/table level):
create function [dbo].[GetMinValidVersion](@objectid bigint)
returns bigint as
begin
    DECLARE @Result bigint;
    SELECT @Result =
    MAX(Res) from
    (
    select MIN(commit_ts)as Res from sys.dm_tran_commit_table
    union
    select begin_version from sys.change_tracking_tables where object_id = @objectid
    )A;
    RETURN @Result;
end
3. Would it help if I use compatibility level 100 till the time problem is resolved?

Regards,
Alek Poniatowski
Details
Sign in to post a comment.
Sign in to post a workaround.