DISCOVER_STORAGE_TABLES Rowset

 

Applies To: SQL Server 2016 Preview

Allows the client to determine the tables that are included in an Analysis Services database running in Tabular or SharePoint mode.

The DISCOVER_STORAGE_TABLES rowset contains the following columns.

Column nameType indicatorLengthDescription
DATABASE_NAMEDBTYPE_WSTRSpecifies the database name that contains the tables.

The DISCOVER_STORAGE_TABLES rowset can be restricted by using this column. If this column is not used to restrict the rowset, the current database is used.
CUBE_NAMEDBTYPE_WSTRSpecifies the cube or model that contains the tables.

The DISCOVER_STORAGE_TABLES rowset can be restricted by using this column.
MEASURE_GROUP_NAMEDBTYPE_WSTRThe name of the measure group.
PARTITION_NAMEDBTYPE_WSTRThe name of the partition.
DIMENSION_NAMEDBTYPE_WSTRThe name of the dimension.
TABLE_IDDBTYPE_WSTRThe ID of the table that is used to store the table attributes.
TABLE_PARTITIONS_COUNTDBTYPE_ WSTRThe table partition count.
HINT_TABLE_TYPEDBTYPE_ WSTRThe hint of the table type.
ROWS_COUNTDBTYPE_UI4The number of rows in the partition.
RIVIOLATION_COUNTDBTYPE_UI4The number of rows with referential integrity violations.

The DISCOVER_STORAGE_TABLES rowset can be restricted on the columns listed in the following table.

Column nameType indicatorRestriction State
DATABASE_NAMEDBTYPE_WSTROptional.
CUBE_NAMEDBTYPE_WSTROptional.
MEASURE_GROUP_NAMEDBTYPE_WSTROptional
PARTITION_NAMEDBTYPE_WSTROptional

The following code sample returns a list of the storage tables and the number of rows in each, from the default database on the current connection.

SELECT TABLE_ID, ROWS_COUNT  
FROM $system.DISCOVER_STORAGE_TABLES  
ORDER BY TABLE_ID DESC  
  

Analysis Services Schema Rowsets

Community Additions

ADD
Show: