After writing my first post in a couple months I decided to go through the comments on my blog and I found I have been getting killed with spam.
I know there are different things that I can/should be doing to guard against spam but for the most part my blog has been pretty clean for the past 1 1/2 years so I haven’t worried too much about it.
Being lazy, I wasn’t going to go through and delete a few hundred comments by hand because that would be crazy! I logged in through SQL and started going through the Community Server schema. I was pretty sure I was in the proper table and I started looking for patterns and deleting records.
I was alternating between:
SELECT * FROM CS_POSTS
DELETE FROM CS_POSTS WHERE �bla’ AND �bla’
Not too worried about blowing up my “production” blog I wasn’t being too careful. I was about 10 deletes in when I dropped the �WHERE’ clause from the above statement and clicked execute to see the remaining entries�
Whoops, that leaves�
DELETE FROM CS_POSTS
Luckily I had set up a backup process long ago.
After the restore I was a little more careful.