Friday, March 30, 2012

rowmodctr & SMO.

From MSDN pg for sp_updatestats:

http://msdn2.microsoft.com/en-us/library/ms173804.aspx

'...In SQL Server 2005, sp_updatestats updates only those statistics that require updating based on the rowmodctr information in the sys.sysindexes compatibility view; therefore, preventing unnecessary updates of unchanged items...'

I was hoping that somewhere in the SMO namespace I would find a way to programmatically obtain rowmodctr info., (in order to determine when stats need updating), but I failed to find any method or property within the stats-related classes through which I could do this. If I've missed something, or there is another way to programmatically obtain the same, then any suggestions/comments would be gratefully received.

Many thanks,

Tamim.

Tamim, because that information is available in the system view your best bet is to use ADO.Net and issue the appropriate queries against the system views to get the details you need.|||Thanks Allen, that's exactly what I've done.

No comments:

Post a Comment