Musipedia does exactly this (except that it uses "R" instead of "S"), as a colleague pointed out this morning. Sadly, its database seems rather small; also, it appears not to find fragments which don't begin at the very start of the song, making it unhelpful if all you can remember is a couple of bars from the middle. I tried both my fragments in there and it didn't find either.