I'm doing some research about the DCM (Differential Change Map) page in SQL Server 2016. This is what I discovered so far:
- page type: 16
- each DCM page covers a GAM interval
- each data file has a DCM page starting with page_id 6
When I analyzed a database containing filestream data I discovered something strange. I used following query to retrieve the file_id of the file containing the filestream data:
select file_id from sys.database_files where type_desc='FILESTREAM'
Next I used DBCC Page
to analyze the DCM page of this file
dbcc traceon(3604,1)
dbcc page(33,65537,6,3)
dbcc traceoff(3604,1)
In the 'Allocation Status' I saw that the DIFF pointed to (1:6).
Allocation Status
GAM (1:2) = ALLOCATED
SGAM (1:3) = NOT ALLOCATED
PFS (1:1) = 0x44 ALLOCATED 100_PCT_FULL
DIFF (1:6) = CHANGED
ML (1:7) = NOT MIN_LOGGED
Does this mean that a file with FILESTREAM data always points to a DCM page in data file containing the filestream table?
I think this is because a file with FILESTREAM data doesn't contains data pages but serves as a container for the files.
Is my conclusion correct?