rowversion store MSSQL

sakuraime 2,326 Reputation points
2020-11-03T04:48:23.983+00:00

I would like to ask something about rowversion store

  1. If MSSQL ADR is not enable , the rowversion will actually be store in tempdb ?
  2. what's the meaning of column version_sequence_num ? I don't understand the explain of MS library
  3. rowset_id is actually the objectname / index name ?
  4. record image first part ? record impage 2nd part ??? what's that mean ?
  5. how long the version of the record will be removed after the transaction is committed. ?

36968-rowversion.jpg

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,671 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cris Zhan-MSFT 6,626 Reputation points
    2020-11-04T09:55:57.983+00:00

    Hi @sakuraime ,

    1.If MSSQL ADR is not enable , the rowversion will actually be store in tempdb ?
    if ADR is not enabled, row versions are kept in tempdb as always.
    https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server

    2.what's the meaning of column version_sequence_num ?
    I think the column means the row versions created by a transaction on an object. View the examples in sys.dm_tran_version_store (Transact-SQL), the transaction XSN-57 created three row versions from one table.

    3.rowset_id is actually the objectname / index name ?
    I think you are right.

    4.what's that mean ?
    Based on the record length the version record can be split into two pages. If the length is more than 8192 bytes the second part of record image is not null in the your output. You can use sys.dm_tran_version_store to get the number of version records or size of version store.
    https://www.sqlservergeeks.com/sys-dm_tran_version_store/

    1. Please refer to following post.
      When are the unnecessary row versions being removed from the version store

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Hot issues in October—Users always get connection timeout problem when using multi subnet AG via listener. Especially after failover to another subnet


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.