Hello all,
I am using the following version of SQL Server 2012
Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
Feb 10 2012 19:39:15
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
And getting the error:
Invalid object name 'sys.dm_db_stats_properties'
When running the following query:
SELECT
OBJECT_NAME([sp].[object_id]) AS [Table],
[sp].[stats_id] AS [Statistic ID],
[s].[name] AS [Statistic],
[sp].[last_updated] AS [Last Updated],
[sp].[rows],
[sp].[rows_sampled],
[sp].[unfiltered_rows],
[sp].[modification_counter] AS [Modifications]
FROM [sys].[stats] AS [s]
OUTER APPLY sys.dm_db_stats_properties ([s].[object_id],[s].[stats_id]) AS [sp]
Can someone help me? I thought the DMV was available from SQL Server 2012 SP1?