Home Dashboard Directory Help
Search

Trace Data collector - Duplicate data in snapshots.trace_data by Brian Callaghan


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 758038
Opened: 8/13/2012 6:49:52 PM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

We have configured a trace data collector from a script generated by profiler
We have been seeing duplicate entries in snapshots.trace_data each with its own snapshot_id.
After checking the SSIS package SqlTraceUpload.dtsx and performing a profiler trace on the MDW database we noitced 2 calls were made to snapshots.sp_trace_update_info for each trace collector configured, per iteration . On the second call when there was an event count of 0 we also saw the last_event_sequence was 0. This figure was written to [snapshots].[trace_info]
Details
Sign in to post a comment.
Posted by Microsoft on 8/14/2012 at 10:22 AM
Brian,
Thanks for reporting this issue. We shall look into this issue and getback

Thanks
Sethu Srinivasan {MSFT]
Sign in to post a workaround.
Posted by Brian Callaghan on 8/13/2012 at 6:52 PM
Altered the procedure [snapshots].[sp_trace_update_info]
At the bottom of the proc change

UPDATE [snapshots].[trace_info]
    SET
        last_snapshot_id = @snapshot_id,
        last_event_sequence = @last_event_sequence,
        is_running = @is_running,
        event_count = ISNULL(event_count,0) + @event_count,
        dropped_event_count = @dropped_event_count
    WHERE
        trace_info_id = @trace_info_id;

TO

UPDATE [snapshots].[trace_info]
    SET
        last_snapshot_id = @snapshot_id,
        --last_event_sequence = @last_event_sequence,
        last_event_sequence = case when @event_count = 0 then last_event_sequence else @last_event_sequence end,
        is_running = @is_running,
        event_count = ISNULL(event_count,0) + @event_count,
        dropped_event_count = @dropped_event_count
    WHERE
        trace_info_id = @trace_info_id;