sys.dm_db_stats_properties?

Answered sys.dm_db_stats_properties?

  • Sunday, January 13, 2013 4:04 AM
     
     

    Trying to query sys.dm_db_stats_properties dmv in SQL 2008 but get error saying:

    Msg 208, Level 16, State 1, Line 1
    Invalid object name 'sys.dm_db_stats_properties'.

    select 
    s.name,
    p.object_id,
    p.stats_id,
    p.last_updated,
    p.rows,
    p.rows_sampled,
    p.steps,
    p.unfiltered_rows,
    p.modification_counter
    from sys.stats s
    CROSS APPLY sys.dm_db_stats_properties(s.object_id, s.stats_id) p
    where s.object_id = object_id('D2545')

    What am I doing wrong?

    Microsoft SQL Server 2008 (SP2) - 10.0.4064.0 (X64) 
    Feb 25 2011 13:56:11 
    Copyright (c) 1988-2008 Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )

All Replies