Collections updated in the last 5 minutes

-- Collections updated in the last 5 minutes

SELECT [SiteID]

,[CollectionID]

,[CollectionName]

,[LastRefreshRequest]

,[EvaluationStartTime]

,[LastRefreshTime]

,[LastIncrementalRefreshTime]

,datediff(ss,EvaluationStartTime,LastRefreshTime) as 'Evaluation time in seconds'

,CASE RefreshType

WHEN 1 then 'No update'

WHEN 2 then 'Scheduled update'

WHEN 4 then 'Incremental update'

WHEN 6 then 'Scheduled and incremental update'

END AS 'Refresh Type explained'

,[RefreshType]

,[LastMemberChangeTime]

,[LastChangeTime]

,[LimitToCollectionID]

,[LimitToCollectionName]

,[BeginDate]

,[CurrentStatus]

,[CurrentStatusTime]

,[MemberCount]

,[LocalMemberCount]

FROM [dbo].[v_Collections]

where datediff(MINUTE, DATEADD(HH, DATEDIFF (hh, GETUTCDATE(),GETDATE()), EvaluationStartTime), getdate()) < 5 -- and SiteID not like 'SMS%'

ORDER BY [CollectionID]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s