Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

sys.dm_tran_top_version_generators

Updated: 5 December 2005

Returns a virtual table for the objects that are producing the most versions in the version store. sys.dm_tran_top_version_generators returns the top 256 aggregated record lengths that are grouped by the database_id and rowset_id. sys.dm_tran_top_version_generators retrieves data by querying the dm_tran_version_store virtual table. sys.dm_tran_top_version_generators is an inefficient view to run because this view queries the version store, and the version store can be very large. We recommend that you use this function to find the largest consumers of the version store.


sys.dm_tran_top_version_generators

Column name Data type Description

database_id

int

Database ID.

rowset_id

bigint

Rowset ID.

aggregated_record_length_in_bytes

int

Sum of the record lengths for each database_id and rowset_id pair in the version store.

Because sys.dm_tran_top_version_generators might have to read many pages as it scans the entire version store, running sys.dm_tran_top_version_generators can interfere with system performance.

Requires VIEW SERVER STATE permission on the server.

The following example uses a test scenario in which four concurrent transactions, each identified by a transaction sequence number (XSN), are running in a database that has the ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT options set to ON. The following transactions are running:

  • XSN-57 is an update operation under serializable isolation.
  • XSN-58 is the same as XSN-57.
  • XSN-59 is a select operation under snapshot isolation.
  • XSN-60 is the same as XSN-59.

The following query is executed.

SELECT
    database_id,
    rowset_id,
    aggregated_record_length_in_bytes
  FROM sys.dm_tran_top_version_generators;

Here is the result set.

database_id rowset_id            aggregated_record_length_in_bytes
----------- -------------------- ---------------------------------
9           72057594038321152    87
9           72057594038386688    33

The output shows that all versions are created by database_id 9 and that the versions generate from two tables.

Release History

5 December 2005

New content: Added an example.
Term Definition

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.