Invalid object name sys.dm_db_stats_properties.
Applies to: Microsoft SQL Server 2008Enterprise Edition SP4.
Problem Description.
I was working on an old customer database server and wanted to have information about
statistics, but when I tried to use the sys.dm_db_stats_properties DMV then I
was surprised to receive the following error:
Msg 208, Level 16, State 1, Line 12
Invalid object name 'sys.dm_db_stats_properties'
Cause.
I found that DMV was introduced on SQL Server 2008R2 Service Pack 2 and SQL
Server 2012 Service Pack1. However, I found the version of the SQL Server
instance I was working on was SQL Server 2008 as shown below:
Microsoft SQL Server 2008 (SP4-OD) (KB3144113) - 10.0.6547.0 (X64)
Feb 22 2016 19:04:50
Copyright (c) 1988-2008 Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
(VM)
On SQL Server 2008 that DMV was not available.