The classic SDS relies on inordinate length, culminating in an atrocious inversion of initial letters (which AIN'T a pun!) - like the "Basques in one exit" story (in its many variations.)

My impression of a Shaggy Dog Story is different. It comes from the paradigm tale of a man who lost his dog - it was a very shaggy dog - and has promised a BIG reward, and the story chronicles the adventures of a man trying to find and retrieve this very very shaggy dog and claim the reward. It involves harrowing experiences, narrow escapes, near misses, anything you like to make the story longer, and then when the storyteller finally takes pity on the audience and brings the story to an end, Our Hero brings this enormously shaggy dog back to the man who offered the reward in the first place (this homeward journey with dog in tow can be another adventure in itself), and the owner says..."Oh, no, that's not my dog, my dog wasn't THAT shaggy!"

So a Shaggy Dog Story is any long convoluted story that ends in a major anticlimax. Sometimes it's an utter urrelevancy. Puns are nice but only incidental. The details of the saga are unimportant to being called an SDS, though they certainly add sparkle to the tale, but it's more the length and complexity, and then the letdown.

Selected punchlines include
--the extended search for the famous "Tiz" bottle that ends with a row of bottles that when gently struck sound out the notes "Mike on Tree Tiz..." (to the notes C, C, D, B...)
--the long-lost coat, sought and finally found by an anthropomorphized moth, that turns out to be synthetic, the final line being "Did you ever see a moth bawl?"
to name just two.

I'm confident you know others!