Cleaning up Community Server 2008 statistics...

cs_Referrals and cs_Urls need to have [DatabaseName].Owner in front of it...

The SQL reads like so:

DELETE FROM cs_Referrals
WHERE UrlID IN
(

    SELECT UrlID FROM cs_Urls

    WHERE Url LIKE 'http://google.%'

      OR Url LIKE 'http://%.yahoo.%'

      OR Url LIKE 'http://yahoo.%'

      OR Url LIKE '%/Search/%'

      OR Url LIKE '%/Search?%'

      OR Url LIKE 'http://search.%'

      OR Url LIKE 'http://bloglines.%'
)

 

DELETE FROM cs_Urls

WHERE Url LIKE 'http://google.%'

  OR Url LIKE 'http://%.yahoo.%'

  OR Url LIKE 'http://yahoo.%'

  OR Url LIKE '%/Search/%'

  OR Url LIKE '%/Search?%'

  OR Url LIKE 'http://search.%'

  OR Url LIKE 'http://bloglines.%'

Published Wed, 6 Mar 2013 @ 10:57 PM by chuacw
Related articles:

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Enter the following code to ensure that your comment reaches the intended party:
Enter the numbers you see in the image: