What is the usage of sys.sysrowsets

  • Hi,

    I just wonder what is the usage of sys.sysrowsets in SQL Server? Microsoft said it “Exists in every database. Contains a row for each partition rowset for an index or a heap.” But what is a partition?

    Also what is the meaning of idmajor and idminor for this table? I try to find the object ID of a table(246486340) and then execute the query:

    Select * from sys.sysrowsets where idmajor = 246486340

    The results are two records:

    rowsetid ownertype idmajoridminornumpartstatusfgidfsrcrows

    72057603504865280 1 24648634011602582

    72057603612213248 124648634061202582

    But I think there should only be one record with that major id.

    Thanks

  • It's a hidden system table, so it's not directly for use (it can't even be queried). Rather use the system views like sys.partitions, sys.allocation_units and DMVs like sys.dm_db_partition_stats for such data.

    It's not documented at all, so you won't find any detail on what the major and minor ids are. Rather use the documented system views.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply