Mike’s Dump

December 18, 2006

I fought the spam and the, spam won…

Filed under: Home — mikesdump @ 1:41 pm

almost.

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

And

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

Damn auto-commit!

Luckily I had set up a backup process long ago.

After the restore I was a little more careful.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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

Blog at WordPress.com.

%d bloggers like this: