patternsqlMinor
What is MSrepl_tran_version? (MS SQL Server)
Viewed 0 times
sqlmsrepl_tran_versionwhatserver
Problem
So, I'm an "enterprise software developer" (welcome to hell, here's your accordion), meaning I'm not a DBA and I'm inheriting something that's been around for years and very few people have a crisp explanation for much at all.
My question: what, exactly, is msrepl_tran_version? We have it in all our tables (a rather large number), but I don't believe we're using replication. I guess we did at some point in the past, maybe.
However, we seem to be using this field for concurrent-update detection; at update time, we check this field to see if it's changed, and, if so, reject the user's change (error on the screen, force them to refresh, etc., etc.0
Does this field get updated magically, somehow? Should I be looking for a trigger? (I doubt it.) If we're not using replication, what do changes in this field affect? I can't seem to actually find a good overview explanation of what this column is.
TIA.
John.
My question: what, exactly, is msrepl_tran_version? We have it in all our tables (a rather large number), but I don't believe we're using replication. I guess we did at some point in the past, maybe.
However, we seem to be using this field for concurrent-update detection; at update time, we check this field to see if it's changed, and, if so, reject the user's change (error on the screen, force them to refresh, etc., etc.0
Does this field get updated magically, somehow? Should I be looking for a trigger? (I doubt it.) If we're not using replication, what do changes in this field affect? I can't seem to actually find a good overview explanation of what this column is.
TIA.
John.
Solution
what, exactly, is msrepl_tran_version? We have it in all our tables (a rather large number), but I don't believe we're using replication. I guess we did at some point in the past, maybe.
when you have configured Transactional replication with updatable subscriptions, replication adds the column msrepl_tran_version to every table. If the table is dropped from the publication, the msrepl_tran_version column is not removed.
Check with your DBA to see if you still have replication or not.
If you are not using Replication, then to see how this column gets updated, I would suggest you to use profiler.
IF this column is not being used anymore, you should be good to remove/drop it. Refer to my answer with script here.
when you have configured Transactional replication with updatable subscriptions, replication adds the column msrepl_tran_version to every table. If the table is dropped from the publication, the msrepl_tran_version column is not removed.
Check with your DBA to see if you still have replication or not.
If you are not using Replication, then to see how this column gets updated, I would suggest you to use profiler.
IF this column is not being used anymore, you should be good to remove/drop it. Refer to my answer with script here.
Context
StackExchange Database Administrators Q#49325, answer score: 4
Revisions (0)
No revisions yet.