|
I have a simple database, with cdc enabled for the database and all tables. I have made 1 insert in 1 table. Simple as simple can. Using Furthermore, all entries (besides my own insert entry) have a example (headers edited for readability, sorry if they're in the wrong place for you): Since These "empty" entries also do not correspond to any changes in the tables. Like I said, its a very simple database, so no running procedures or anything that do something every 5 minutes. Im running on SQL Server 2008R2, though the same issues appears to exist in SS2012. Anybody got a clue why this is happening? And how I can stop it from happening? Cheers Wouter
(comments are locked)
|
|
cdc.lsn_time_mapping will contain records also when there has been no activity. Use cdc.fn_cdc_get_netchanges together with sys.fn_cdc_map_time_to_lsn to get the changes for a given time period. See BOL: http://technet.microsoft.com/en-us/library/bb522511(v=sql.105) Magnus, thanks for your reply, your link doesnt seem to be working though. Also, getting the changes over a certain time period is not the problem, retrieving the date/time of the last change is. Since the function What is the point of the records when there has been no activity? Wouter
Sep 04 '12 at 07:55 AM
wouterp
The link is messed up by the editor. But if you copy the link text it will work. I don't know how the SQL Server team discussed when they designed it this way, but the BOL documentation for cdc.lsn_time_mapping says it contains records for non activity as well.
Sep 04 '12 at 08:01 AM
Magnus Ahlkvist
Seems a weird choice, to design something in such a way it generates meaningless records (and quite a lot too, every 5 minutes is fairly significant) and the function doesnt work, or am i missing something?
Sep 04 '12 at 08:13 AM
wouterp
BOL says: "Entries may also be logged for which there are no change tables entries. This allows the table to record the completion of LSN processing in periods of low or no change activity." Someone more into the bits and bytes of the SQL Server engine might be able to explain in more detail what it means.
Sep 04 '12 at 08:47 AM
Magnus Ahlkvist
(comments are locked)
|

