scripts/collector/sqlserver/sql/tableList.sql [216:273]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
					,[lock_escalation] = t.lock_escalation
					,[is_tracked_by_cdc]  =  t.is_tracked_by_cdc
					,[text_in_row_limit]  =  t.text_in_row_limit
					,[is_replicated]  =  t.is_replicated
					,[row_count]        = p.[rows]
					,[data_compression] = CASE WHEN p.data_compression_cnt > 1 THEN ''Mixed''
											ELSE (  SELECT DISTINCT p.data_compression_desc
													FROM sys.partitions p
													WHERE i.[object_id] = p.[object_id] AND i.index_id = p.index_id
													)
										END
					,[total_space_mb]   = CONVERT(NVARCHAR(255),(round(( au.total_pages                  * (8/1024.00)), 2)))
					,[used_space_mb]    = CONVERT(NVARCHAR(255),(round(( au.used_pages                   * (8/1024.00)), 2)))
					,[unused_space_mb]  = CONVERT(NVARCHAR(255),(round(((au.total_pages - au.used_pages) * (8/1024.00)), 2)))
					,[partition_type] = ISNULL(pf.type_desc,''NONE'')
					,[is_temp_table] = ''0''
				FROM sys.schemas s WITH (NOLOCK)
				JOIN sys.tables  t WITH (NOLOCK) ON (s.schema_id = t.schema_id)
				JOIN sys.indexes i WITH (NOLOCK) ON (t.object_id = i.object_id)
				LEFT JOIN (
					SELECT [object_id], index_id, partition_count=count(*), [rows]=sum([rows]), data_compression_cnt=count(distinct [data_compression])
					FROM sys.partitions WITH (NOLOCK)
					GROUP BY [object_id], [index_id]
				) p ON (i.[object_id] = p.[object_id] AND i.[index_id] = p.[index_id])
				LEFT JOIN (
					SELECT p.[object_id], p.[index_id], total_pages = sum(a.total_pages), used_pages = sum(a.used_pages), data_pages=sum(a.data_pages)
					FROM sys.partitions p WITH (NOLOCK)
					JOIN sys.allocation_units a ON p.[partition_id] = a.[container_id]
					GROUP BY p.[object_id], p.[index_id]
				) au ON (i.[object_id] = au.[object_id] AND i.[index_id] = au.[index_id])
				LEFT JOIN sys.partition_schemes ps WITH (NOLOCK) on (ps.data_space_id = i.data_space_id)
				LEFT JOIN sys.partition_functions pf WITH (NOLOCK) on (pf.function_id = ps.function_id)
				WHERE t.is_ms_shipped = 0 -- Not a system table
					AND i.type IN (0,1,5))
				SELECT
					''"' + @PKEY + '"'' AS pkey,
					''"'' + CONVERT(NVARCHAR(MAX), DB_NAME()) + ''"'' as database_name,
					''"'' + CONVERT(NVARCHAR(MAX), schema_name) + ''"'' as schema_name,
					''"'' + CONVERT(NVARCHAR(MAX), table_name) + ''"'' as table_name,
					''"'' + CONVERT(NVARCHAR(MAX), partition_count) + ''"'' as partition_count,
					''"'' + CONVERT(NVARCHAR(MAX), is_memory_optimized) + ''"'' as is_memory_optimized,
					''"'' + CONVERT(NVARCHAR(MAX), temporal_type) + ''"'' as temporal_type,
					''"'' + CONVERT(NVARCHAR(MAX), is_external) + ''"'' as is_external,
					''"'' + CONVERT(NVARCHAR(MAX), lock_escalation) + ''"'' as lock_escalation,
					''"'' + CONVERT(NVARCHAR(MAX), is_tracked_by_cdc) + ''"'' as is_tracked_by_cdc,
					''"'' + CONVERT(NVARCHAR(MAX), text_in_row_limit) + ''"'' as text_in_row_limit,
					''"'' + CONVERT(NVARCHAR(MAX), is_replicated) + ''"'' as is_replicated,
					''"'' + CONVERT(NVARCHAR(MAX), row_count) + ''"'' as row_count,
					''"'' + CONVERT(NVARCHAR(MAX), data_compression) + ''"'' as data_compression,
					''"'' + CONVERT(NVARCHAR(MAX), total_space_mb) + ''"'' as total_space_mb,
					''"'' + CONVERT(NVARCHAR(MAX), used_space_mb) + ''"'' as used_space_mb,
					''"'' + CONVERT(NVARCHAR(MAX), unused_space_mb) + ''"'' as unused_space_mb,
					''"' + @DMA_SOURCE_ID + '"'' as dma_source_id,
        			''"' + @DMA_MANUAL_ID + '"'' as dma_manual_id,
					''"'' + CONVERT(NVARCHAR(MAX), partition_type) + ''"'' as partition_type,
					''"'' + CONVERT(NVARCHAR(MAX), is_temp_table) + ''"'' as is_temp_table
				FROM TableData');
	END;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scripts/collector/sqlserver/sql/tableList.sql [363:420]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
				,[lock_escalation] = t.lock_escalation
				,[is_tracked_by_cdc]  =  t.is_tracked_by_cdc
				,[text_in_row_limit]  =  t.text_in_row_limit
				,[is_replicated]  =  t.is_replicated
				,[row_count]        = p.[rows]
				,[data_compression] = CASE WHEN p.data_compression_cnt > 1 THEN ''Mixed''
										ELSE (  SELECT DISTINCT p.data_compression_desc
												FROM sys.partitions p
												WHERE i.[object_id] = p.[object_id] AND i.index_id = p.index_id
												)
									END
				,[total_space_mb]   = CONVERT(NVARCHAR(255),(round(( au.total_pages                  * (8/1024.00)), 2)))
				,[used_space_mb]    = CONVERT(NVARCHAR(255),(round(( au.used_pages                   * (8/1024.00)), 2)))
				,[unused_space_mb]  = CONVERT(NVARCHAR(255),(round(((au.total_pages - au.used_pages) * (8/1024.00)), 2)))
				,[partition_type] = ISNULL(pf.type_desc,''NONE'')
				,[is_temp_table] = ''0''
			FROM sys.schemas s WITH (NOLOCK)
			JOIN sys.tables  t WITH (NOLOCK) ON (s.schema_id = t.schema_id)
			JOIN sys.indexes i WITH (NOLOCK) ON (t.object_id = i.object_id)
			LEFT JOIN (
				SELECT [object_id], index_id, partition_count=count(*), [rows]=sum([rows]), data_compression_cnt=count(distinct [data_compression])
				FROM sys.partitions WITH (NOLOCK)
				GROUP BY [object_id], [index_id]
			) p ON (i.[object_id] = p.[object_id] AND i.[index_id] = p.[index_id])
			LEFT JOIN (
				SELECT p.[object_id], p.[index_id], total_pages = sum(a.total_pages), used_pages = sum(a.used_pages), data_pages=sum(a.data_pages)
				FROM sys.partitions p WITH (NOLOCK)
				JOIN sys.allocation_units a ON p.[partition_id] = a.[container_id]
				GROUP BY p.[object_id], p.[index_id]
			) au ON (i.[object_id] = au.[object_id] AND i.[index_id] = au.[index_id])
			LEFT JOIN sys.partition_schemes ps WITH (NOLOCK) on (ps.data_space_id = i.data_space_id)
			LEFT JOIN sys.partition_functions pf WITH (NOLOCK) on (pf.function_id = ps.function_id)
			WHERE t.is_ms_shipped = 0 -- Not a system table
				AND i.type IN (0,1,5))
			SELECT
				''"' + @PKEY + '"'' AS pkey,
				''"'' + CONVERT(NVARCHAR(MAX), DB_NAME()) + ''"'' as database_name,
				''"'' + CONVERT(NVARCHAR(MAX), schema_name) + ''"'' as schema_name,
				''"'' + CONVERT(NVARCHAR(MAX), table_name) + ''"'' as table_name,
				''"'' + CONVERT(NVARCHAR(MAX), partition_count) + ''"'' as partition_count,
				''"'' + CONVERT(NVARCHAR(MAX), is_memory_optimized) + ''"'' as is_memory_optimized,
				''"'' + CONVERT(NVARCHAR(MAX), temporal_type) + ''"'' as temporal_type,
				''"'' + CONVERT(NVARCHAR(MAX), is_external) + ''"'' as is_external,
				''"'' + CONVERT(NVARCHAR(MAX), lock_escalation) + ''"'' as lock_escalation,
				''"'' + CONVERT(NVARCHAR(MAX), is_tracked_by_cdc) + ''"'' as is_tracked_by_cdc,
				''"'' + CONVERT(NVARCHAR(MAX), text_in_row_limit) + ''"'' as text_in_row_limit,
				''"'' + CONVERT(NVARCHAR(MAX), is_replicated) + ''"'' as is_replicated,
				''"'' + CONVERT(NVARCHAR(MAX), row_count) + ''"'' as row_count,
				''"'' + CONVERT(NVARCHAR(MAX), data_compression) + ''"'' as data_compression,
				''"'' + CONVERT(NVARCHAR(MAX), total_space_mb) + ''"'' as total_space_mb,
				''"'' + CONVERT(NVARCHAR(MAX), used_space_mb) + ''"'' as used_space_mb,
				''"'' + CONVERT(NVARCHAR(MAX), unused_space_mb) + ''"'' as unused_space_mb,
				''"' + @DMA_SOURCE_ID + '"'' as dma_source_id,
        		''"' + @DMA_MANUAL_ID + '"'' as dma_manual_id,
				''"'' + CONVERT(NVARCHAR(MAX), partition_type) + ''"'' as partition_type,
				''"'' + CONVERT(NVARCHAR(MAX), is_temp_table) + ''"'' as is_temp_table
			FROM TableData');
	END;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



