10 June 2015

Roadtrip 2015

Day One: Sioux City, Iowa
Well, we're off again. Slightly more ambitious this year...up to Montana, Seattle, then down the coast to LA, and back. We hit the road this afternoon after I ditched work, just to get a few hours in of northward travel. I've been calling this whole trip Debra's Anxiety Exposure Tour because it includes no end of potentially scary things, volcanos, supervolcanos, remote islands, lots of places with bear, moose, rattlesnakes, etc. But I didn't expect anything scary tonight. So, of course, there were some crazy semi drivers that drove like maniacs to amp up her anxiety first, and then we drove straight into a massive wallcloud and spent 10 minutes parked under an overpass while large hail pelted down. But we got out OK and reached blue sky again. Good times! The kids did great, only watched 45 minutes of videos, and we didn't buy anything but petrol (a pattern unlikely to continue). We stopped in Sioux City, Iowa.

An otherwise unremarkable little spot but with some beautiful bluffs over the Missouri River. We visited the obelisk and memorial at the gravesite of Sgt. Floyd, the only member of Lewis and Clark's team to die on their trip.


I started trying to think up Pink Floyd jokes but the comedy potential seemed limited. Kids enjoyed the view of the river from the bluffs.


The poor chap snuffed it, folks think, from appendicitis. Became sort of a local hero around here due to his gravesite. Shine on, you crazy diamond.


It is quite massive and quite a sight from the highway. Family dwarfed below.


Tomorrow, off we go across South Dakota.

Day Two: Mount Rushmore
Well we got off to a decent start this morning, and had an uneventful trip north to Sioux Falls where we "hung a Louie", which sounds like the favored pastime of French revolutionaries, and sped off...and I do mean sped off, 80 mph speed limits seeming to come close to what Dr. Emmett Brown said would facilitate time travel, to the West. As it happens, we have a seven year old birthday girl, here modelling the splendidly boring landscape of a central Dakota rest stop:


The rain was constant but unthreatening, and we stopped at the Minuteman Missile National Historic Monument, as Cold War stuff and the amazing, mind boggling concept of nuclear deterrance is always of interest to me, but the new visitor center was kind of laughable...it just opened but the whole thing was basically a walkthrough exhibit of the printouts of the proposed exhibit designs. Maybe it'll get better in a few years.

Thence south through a loop of the Badlands. Amazing landscape, what we could see through the fog.


Probably gets really hot here in more clement weather, so in a way it was nice with the rain and overcast. Rivers of mud churned deeper in the valleys.


An unexpected surprise was several dozen bighorn sheep clustering around the roadway near the western side of the loop. Gretchen loved seeing the babies, here.


Exiting Badlands landed us in Wall, famous primarily for Wall Drug, which was an assault on the senses, in a good way (perhaps), but reminded us most of a northern analogue to our beloved (well, sort of beloved) Casa Bonita. It has no concept of excess, a sort of Disneyland without the classiness, but still lots of fun. Kids got some toys and I got a jackalope (not this one).


Animatronic T-Rex poured high-octane fear into Peter, I have to admit, I was amused. There ought to be a word, perhaps a variant of schadenfreude, for the joy and mirth that parents get when their otherwise fearless three-year-old quails in fear of a robot dinosaur. Kinderfaustenfreude? Leave it to the Germans.


Finally, to Rushmore. All of us, Americans, foreign visitors, miscellaneous/unaffiliated, walked happily up the beautiful path of the memorial after paying our $1100 (thereabouts) for parking. Wondering how beautiful the reveal of the mountain would be!


And then, as we walked into the main viewing area....behold!


Yeah, we knew they were up there, but that wasn't the point. It was amusing to witness the reactions of others, from hearty laughter (such as I exhibited, having foreseen this eventuality as we walked through the foggy path) to the soft, crestfallen swearing of the guys with $10,000 cameras with giant zoom lenses. I tried getting Debra to help me do the classic/classless overdone joke of me positioning my finger, via the magic of forced perspective, into the nostril of President Washington's likeness, but without the visibility it was a difficult and admittedly pointless endeavor.

Then we decided to walk around the trail at the memorial. Chipmunks all along the path. Or ground squirrels, I dunno. We brought our Peterson's guide to North American Mammals, but haven't identified them all, yet.


Then halfway along the path, the fog briefly lifted!


On the way back out, we spotted a red squirrel, having just entered into his range.


We ambled back into Keystone and had a nice dinner just outside of town at a restaurant where Gretchen dined on buffalo, I dined on elk, and the restauranteur dined on the entrails of my wallet. Lovely dinner, anyway. Now, to wind down...tomorrow we traverse Wyoming and see Yellowstone.

Day Three: Yellowstone
So we got up early...so early I cannot, at this point, properly recall exactly what decade I awoke in, at this point...and left our beautiful hotel in the Black Hills and headed westward. This was a pic of Gretchen in the taxidermy-heavy lobby of the hotel the previous evening, during a candy run.


So we headed west into Wyoming, there to enjoy the seemingly endless parade of roadwork projects and delays, but also some great scenery. While still in Keystone we spotted several mule deer does, identifiable by the larger ears and black tipped tail. Then into the hot/dry part of Wyoming, we eventually stopped at a rest stop that balanced the excellence of its playground against the piquant muddiness of its drinking water.


One thing we noticed along this stretch was the ubiquity of North America's antelope, the pronghorn. We must have seen almost hundreds in total today, although we were scanning heavily to spot them. Speed goats, they are called. We eventually ran smack into the Bighorn Mountains, careened right, and went through a northern pass. Here's a view of where we came from when halfway up the mountains.


The canyon area that followed was stunning but very hard to photograph, I found, so I won't post the pictures that I took, as their quality seems to undercut the massive beauty of the area...reminiscent of Zion National Park. Then back into the plains, and a stop at another rest stop that had an impromptu air museum / tourist trap:


Late in the day we got into Yellowstone finally, through the east entrance. Bison lounging around here and there, and some pretty alpine lakes and roadside waterfalls:


Lake Yellowstone was more pretty than I expected. All it was missing was a good salty tang to the breeze.


Clusters of cars clearly denoted anywhere animals got close to the roadways. Bison were thick in parts.


We went to Artist Point at the falls, and I took several subpar pictures, of which this is one. You wouldn't believe the quantity of subpar pictures taken here, mostly by endless busloads of Asian vacationers. Probably how Rome is with Americans.


A trio of cow elk feeding up by the Mammoth Hot Springs.


We decided to hike around the Lower Terraces at the Hot Springs.


Had to keep a firm watch on the boy...you stray off the terrace, there's lots of geothermal fun to be explored...


You can't see the spray of hot, steaming water out of the top of the formation in a still but its an impressive, otherworldly sight, and the kids were happy to do a little "hiking" if one can call it that.


Those poor trees picked a rotten spot to germinate.


This rock formation reminded me a bit of an Easter Island moai.


OK, we went from there to the northern entrance in Montana and to our hotel, where we ate another absurdly priced, but much needed, meal. Now I'm wrapping this one short as it is 9:20 and we all need sleep in a bad way. Radio silence for another day, most likely, as won't have any internet access up in Glacier National Park, I believe.

Day Four: Glacier National Park
Up early and down to the car to stow the luggage.


Then back into the hotel to eat the complimentary breakfast, under the watchful eyes of former cervids.


The drive was long and...long. Not as bad as yesterday, but Montana was an interesting sort of place...very large, not a lot of trees. We saw some elk and some more pronghorn on the way. Not to mention several hundred thousand magpies plucking meat from dead ground squirrels or prairie dogs (or the local equivalent) squashed along the roadway. After passing through the Blackfoot Reservation we veered west into Glacier at long last.


We parked and were a bit too early to check in. This is the view of the hotel while walking from the parking lot.


Bad picture, but the 100 year old hotel at Many Glacier is beautiful and massive, and I love the main hall here.


Log fire in the center of the lobby warmed up the kids a bit while we decided what to do next.


Since we couldn't check in yet, we decided to don the bear spray and bayonet and go out to the woods.


We did a mild 2.6 mile hike around the lake by the hotel. I call it mild, but for three year olds it was a pretty handy accomplishment.


Some plants and ferns Debra particularly liked, by the path:


The lake is a perfect example of an alpine lake, blue, clear, and thirst-provoking.


Glacier in the distance. No major animals (bear, moose) were encountered but we were on the lookout.


Towards the end of the hike the hotel once again swam into view and we knew we were on the home stretch.


Then I went up to get the car to drop off the luggage and finally check in, and oh, that view as you crested the hill.


The hotel, in its Swiss style, has a natural beauty that fits but certainly doesn't surpass its impressive surroundings.


Then we went to the dining room, which itself was very beautiful, and we kept it within two figures, I'll put it that way, but were ready at this point to revert to canned ravioli and the customary victuals of the cheapskate traveller. The waiter had this surreal automaton smile that he beamed at us, blindingly, in an unsettling fashion. Still, lovely food, lovely surroundings. Now, we are questioning whether to head back down to the lake's edge. Tomorrow is a long haul to the outskirts of Seattle, there to spend another 5 nights while I partake in a SQLskills training course, for work. Should be a relaxing time, relatively.

Day Five: Into Seattle
Most of this is pictures we ended up taking last night after I'd dumped my phone's content to disk, and then we decided to head out again. We bought a large bag of Skittles to share and settled in by the lake.


Later, after stopping by the waterfall, we decided, impetuously, to scale a stony outcrop with the kids. Well, I should say, the kids and I decided, and Debra, her natural reluctance softened by the state of being on vacation and/or a huckleberry margarita, cautiously acceded. We slowly scaled (the kids having whined about opportunities to climb on the rocks for what seemed a fortnight) and were greeted with a brisk drop-off near the summit.


Beautiful view at sunset.


We slowly scaled down and Debra was, well, not so keen on the adventure at that point, with the kids, but we got down fine and the kids were tired out, so mission accomplished. One last shot of Mt. Grinnell:


From a close inspection of this moose...just judging by the discolouration of the fur and antlers, and the wooden mount and nail with which it was affixed, this must be a very old chap indeed, maybe 100 years old or close.


A view from the third floor. We loved the style of this beautiful old hotel.


What we didn't love, however, was the guests, who callously disregarded the pleas, written in English, not to use the ancient, caterwaulling ice machine in the wee hours of the night, and let their prepubescent hellions run screaming through the halls at 11pm. We were in the main lobby area, and these rooms are hardly soundproofed, so it's understandable, but irritating nonetheless. We slept rather poorly, Debra constantly woken by the troupe of junior nocturnals outside our door, and me wracked with nightmares of the horrifying, heavy-lidded wraith of a waiter gleaming evil smiles at me. Seriously, that guy would look at me from across the room while walking in a 90 degree direction and that haunting smile would follow me. AND his name was spelled "DARREK", exactly the spelling you would give to a disturbingly obsequious cyborg waiter. QED.

The next morning, we had occasion to feel rather grateful for the clement weather the previous day...still, beautiful even if wreathed in fog.


Lots of mountain roads getting out of the Glacier area and Gretchen just barely managed to avoid offering up her breakfast. But we pulled off in a beautiful valley next to a mountain stream. Bitterly cold, but picturesque.


Idaho was nice enough in the panhandle, we ate lunch in Couer d'Alene. But into Washington, we were struck by how...aesthetically challenged most of the state is. It has all the beauty of eastern southern California. And Washington drivers manifested themselves of the same class as the Californian drivers you encounter once you pass Barstow on I-15. 660 miles or so today, and that was enough for me. Here's Gretchen at a surprisingly arid rest stop before we got into the relatively small strip of green, coastal Washington, past the Cascades.


We're ensconced in a somewhat comfortable upscale hotel in downtown Bellevue awaiting a week of rest, I mean, SQL server training. Will be nice to let one side of my brain rest (the side responsible for constant vigilance and instant response during hours of driving at 80 mph) and engage the other side of my brain, diving into database system internals.

Days Six Through Nine: Bellevue, Washington
Obviously I've neglected posting for a bit now, but we've been in the static middle phase of our vacation, where I've been in training from 10 hours a day, which has been a lot of fun. SQLskills Immersion events are probably among the more intense and deep training opportunities for people working with SQL Server, and it's been fun, although exhausting mentally. But learning deep RDBMS internals for 10 hours is a very different sort of exhaustion than driving for 10 hours, so it was welcome, and I'm feeling ready to get back to work and find things to fix.

Sadly most of my time this week has been apart from my family, but Debra has a phone now (!!!) so we have some pictures from their adventures. First day, Debra and the kids walked a good haul from the hotel room to the main downtown park. Apparently there were some crazy people there, including a Mister Yell-Nonsense-Words-To-Noone-In-Particular, which added to the excitement. But I gather a good time was had.


Meanwhile I was in class with Paul Randal, Kimberly Tripp, Jonathan Kehayias, and Erin Stellato. All exceptional teachers in their own area.


The family went to the local botanical garden the next day:


Day after that, to the beach park. One calls it a beach park, but as I understand, the "beach" in Bellevue is up against a freshwater lake, bordering Seattle, which has genuine sea on its western edge.


Meanwhile Paul Randal, during a session on wait stats, went into deep structural internals of SQL Server, since he wrote a good bit of it, and we learned about quantum exhaustion on SQL OS schedulers:


Then today (Thursday) the kids went to Cougar Mountain Zoo. I gather it was an eccentric sort of place, perhaps set up by an eccentric sort of person...very rigidly run, lots of rules, and an odd sense that everything anyone does is being scrupulously observed by the denizen of the mansion on the hill overlooking the small, private zoo. Apparently there were signs everywhere that mandated guest behavior, and everything was reported by zoo workers via radio to what assumedly was a central dispatch type thing. But the kids loved it!


Ermergerd RERNDER!!! Poronkäristys "on the hoof".


The kids queued up to see the wolf cubs.


Tomorrow, one last day of training and we head back into the final leg of vacation, first landing just south of Mount Rainier.

Day Ten: Mount Rainier
So Friday was the final day of training in Seattle, but given the availability of the last two sessions on Pluralsight, I was keen to get out a bit early to get to our next destination. Being a person of notably pale complexion, I naturally suffer from the effects of the stress of not being on time. And the session went longer than when I had Debra to meet me in the parking lot, so I worried a bit for 10 minutes, and then finally extricated myself. Found my loved ones waiting patiently and raced with them out of downtown Bellevue into...horrible, unrelenting traffic. Then as I was a few minutes into the drive I realized...BUGGER...I had left my notes and coursework in the classroom. We turned around, and eventually got back to the hotel, I retrieved my mislaid binder under the amused/sympathetic eyes of Kim Tripp and Paul Randal, and then off again...straight into the traffic. Good Lord, what awful traffic. It was as bad as LA has ever been in my recent memory, which isn't that good.

We were stuck behind a chap in a Mercedes who was either availing himself of enough of Washington's newly legal smoked flora to qualify as an honorary member of the Choom Gang, or had partaken of a lunch of salmon and decided after the fact that he would prefer it was smoked salmon, because the clouds of smoke this guy was spewing out of his sunroof was enough to impart a smoke ring on a Texas brisket. Debra and I spoke back and forth about how vigorously we HATE CITIES and their accompanying traffic, but eventually we got through and the stress levels started to subside as we got out into the country, and the trees.

Then, we took a wrong turn! This in itself wouldn't be a huge issue, it just depends on scale. We took the wrong turn towards eastern Washington (instead of continuing south, around Rainier) and ran across a host of beautiful mule deer (does and a button buck). After a half hour we started wondering, and I pulled over and examined the map...realizing my error. Back the same way, an hour lost! I raced the clock to get to our destination before the sun went down. Then, it hove into view in all its horrible majesty:


We finally arrived at the inn, just south of Rainier. It loomed rather large. As I've mentioned, this is sort of the centerpiece of the Anxiety Exposure Tour, with two members of our party feeling severe anxiety at being this close to one of the most dangerous volcanoes in the world.


To the south, a ridge of beautiful and less dangerous looking summits.


The hotel has been around for over 100 years, and is charming, albeit not so well maintained when you get to the actual rooms. Many Glacier hotel has it beat, but still, its in a lovely setting and that's what you pay for.


We checked into our amazingly snug room (at least, for four people...felt a bit like we were in Hobbiton), but the view (of the aforementioned southern mountains) was quite lovely and we left the blinds open all night. Incidently, it seemed daylight started around 3am...unfortunate since we were up til 10 or 11PM.


Then a stop by the gift shop to get Gretchen her Prizes for Bravery and Valour in the Face of a Very Scary Volcano (wolf stuffed animal and some stone carved animals...Peter got a wooden pencil...he's saving up for the Star Wars store in Tomorrowland). Then into the dining room which was beautiful, and the food, once we at long last received it, was good enough, albeit overpriced. The wait staff was comically bad...first taking my order for an IPA, never delivering it, then charging for it...then refusing for 15 minutes (until I intervened) to pick up the check/payment...OK, I'm grousing like an old woman at a seaside resort who objects to the...whatever old women at seaside resorts tend to object to...but still, it was an amusing situation and one of the very few situations where I was drawn to actual complaining about service. But still, I left him a decent tip...I guess I can't help avoiding conflict or impoliteness.

So then, having been robbed off the sunset by the lazy/forgetful waiter who kept me at my table for a half hour after I had finished eating (no I'm not bitter...well, at least not any more bitter than the 80 International Bittering Units in the Deschutes Inversion IPA that I ordered and never received), I trotted off to the car to put on the parking permit. Lovely mountain air.


Day Eleven: North California Coast
So we got up quite early (5am), checked out, loaded up the car, and went for a brief hike under the watchful eyes of the volcano gods.


The flowers up at Mt Rainier are pretty...I don't have an eye for flowers. But the female contingent assured me of their quality. The red ones, if I recall from our hikes at Glacier, are Indian Paintbrush.


Up the hill! Go go go! (I had had a complimentary Americano at the cafe at this point, plus some drip coffee.)


The volcano gods smiled on her bravery and extended mercy.


The boy, of course, wanted to get in the shot.


The hint of danger about this place, combined with its incredible natural beauty, makes it breathtaking.


Then down through Washington. We got gas in Vancouver just north of Portland, because we learned that it is illegal to pump your own gas in Oregon, and I'll be, if not damned, then at least put into some sort of purgatory before I let some other chap pump gas for me. So we tried to get through Oregon on one tank. We noticed something about Oregon, whereas in Washington everyone has a Subaru (Fight The Power! Think For Yourself!), in Oregon the drivers were evenly divided between Suburus, Volvos, hybrids, and those who purchased an exemption by installing a roof rack. We tried to eat lunch in Portlandia, hunting for food trucks, but we just got lost in the Weird that is the place, having been scowled at by a person in a hybrid, and then turning around in a recycling center parking lot, all the while avoiding all the Fred Armisens on bikes that litter the place. I prefer Portland delivered in amusing vignettes on TV.

Then we barely avoided running out of gas while driving through southern Oregon through Grant's Pass, into the coastal redwoods. We drove through a sweet-smelling but slightly ominous few miles of dense smoke where fires must have been raging nearby, and then past a small town that had a Chinese restaurant...King's Chinese Restaurant in Cave Junction, as it happens. The sign below the sign said "Pregnancy Center In Back" which was slightly disturbing, or at least confusing. Finally...I could smell it.


The family was cold so we didn't stay too long.


Glorious cool breeze coming in off the water.


Tomorrow, south through San Francisco to the central coast, where we will once more feel at home in our old haunts.

Day Twelve: Central Coast
Today we rose reasonably early, supped on free hotel breakfast, including some vaguely inedible turkey "sausage" that seemed to adopt the term ironically. Then south ho, but not for long, as we pulled off into Redwood National Forest. I sold this trip to the kids as a visit to Endor so we were all on alert looking for Ewoks, stormtroopers on speeder bikes, and AT-ST walkers. After dousing ourselves in a 50 gallon drum of mosquito repellent we ventured into the mossy forest on one of the trails.


Some rather large old trees.


This one was creatively named "Big Tree".


It's a unique sort of forest, almost tropical...a cold rainforest, basically. Or, literally, I guess you would say.


We had a lot of ground to cover so we didn't hike much, everyone back into the car and back onto the 101. No time to stop for every little thing we ERMERGERDSTOPTHECAR!!!


Once I pried myself away from the elk (Debra made threats of violence to me if I dared to call them at such close range), we kept on, eventually feeling at home again in stop and go traffic in Marin county. I had this silly, romantic notion that we would pick up In-N-Out, then stop by at the northern section of the Golden Gate bridge and eat it there, maybe take a picture of the kids, that sort of thing...all very Californian and iconic. Oh, was I in for a treat.

So after finally getting through the excessive traffic, we eventually found an In-N-Out in Mill Valley, which was a zoo in the non-literal sense. Burgers in hand, back onto the highway and just a bit further to the bridge...at which point...they stopped numbering the highway exits! We knew we wanted 442, but they were no longer numbered. So we got off accidentally early, and proceeded to drive the entire length of Sausalito, which was a carnival, also in the non-literal sense, filled with bikers (I refuse to give them the unearned dignity of the term cyclists) either obeying or not obeying the archaic, inscrutable traffic laws of that intensely congested little town. Never again, Sausalito. But eventually we got through without running down any drunk pedestrians or bicycle enthusiasts...to find that the parking lots were full...of course they were!...and so we just kept on across the Golden Gate bridge. No worries, though; the best laid plans of mice and men OFT GANG AGLEY. And when your plans gang agley, then you adapt with the agleying. Who knows what Robbie Burns was actually talking about.


San Francisco was awful...at least to someone like me who has a natural abhorrence of congested trafficky throngs of sweltering humanity packed into a few square miles of overpriced, dirty concrete...but I know, I know, de gustibus non est disputandum and chacun et son gout and other random foreign phrases. So to say more politely...not to my taste, which is basically applicable to any city. We got through it though, and paused in Monterey to pick up some various fruit at the Trader Joe's there. Perhaps the relief of escaping traffic made me fall in love with the quaint, also overpriced little town there, but I definitely warmed up to it more. Carmel was also quite lovely. I'm sure, priced accordingly.

Then onto PCH for a windy road past Big Sur to our destination. Debra in the rear-view mirror, standing in as a photographer while I made fake engine noises and pretended to be shifting a manual transmission in my not-real Lotus Elise, skipping lightly around the turns.


We didn't stop much, except for the relative stoppage of getting behind an El Monte RV that decided that 15 mph was the correct speed to take on the Pacific Coast HIGHWAY!!! Eventually the Unsurprisingly Female driver (Debra was so annoyed at them that she didn't even punch me in the arm when I made that observation/connection) realized, 30 minutes later, that they were the head of the conga line and politely used a pull-out to let us pass. But beautiful country up here, and fun driving...for the driver, at least.


We did stop to take this shot and a few others. It was a beautiful time of day. Gretchen however was starting to feel the effects of not taking her motion sickness pill so I had to cool the Lotus fantasy and drive a bit slower.


However, we got to the elephant seal rookery without her losing her lunch, so that's a bonus!


They aren't the most elegant looking...or sounding...or smelling...but Gretchen loves them.


Then to San Simeon Pines for a late checkin. Feels a bit like home...first place we really know on our long trip.

Day Thirteen: Solvang
Slower start today. After spending the morning killing invading ants in the bathroom (the place has a slightly rustic vibe), we got up and went to the beach across the street. Gretchen liked these plants at the hotel.


Walking down to the beach.


Trio of the local lagomorphs.


We clambered on the rocks and looked at the tidepools, lots of crabs about.


Then back to the hotel for some croquet.


After checking out, we went to a local beachside park before hitting the road again.


Then onto the 1/101 towards Solvang, stopping to pick up supplies for our boating trip tomorrow in San Luis, and having a late lunch of pancakes at Paula's Pancake House in Solvang. On the way we listened to music, and a funny thought struck me about Michael Jackson's "Don't Stop Til You Get Enough". It starts out with barely intelligible Jacksonian mumblings, intended as whispered sweet nothings I suppose whispered in someone's ear, and it is immediately followed by a high pitch, almost screamed "WHOOOOOOOO!!!" leading into the main song. The idea of MJ actually shrieking a WHOOOOOO into someone's ear at close range, as they leaned in to hear what the barely audible mumbled whispers were, was kind of amusing to me.

That aside, we went shopping and yes, the kids' toylust was sated once more. Gretchen insists this is not a rabbit but a baby jackalope.


And Peter is now outfitted for battle with bears, Saxons, and dragons.


Tomorrow, a boat trip to Santa Cruz island, and then to Anaheim.

Day Fourteen: Santa Cruz Island
Today we hoisted ourselves up earlier than usual in Solvang, and made haste down the 101 towards Ventura, there to catch our boat out to the Channel Islands. Half of our party was somewhat ill-attuned to the rougher movements out on the water, but Pete enjoyed it.


We stopped briefly after a spotting of an ocean sunfish (no followup sighting) so we walked out to look.


Santa Cruz finally hove into view. Debra and Gretchen rejoicing to be back on dry ground.


One of the things we were looking forward to most is the chance to see the rare island fox...a small cat-like fox still barely on the endangered list, that doesn't seem to fear humans. Right off the boat as we meandered in the valley, there one was.


The ravens were entertaining (and enterprising...quite the reputation for stealing food from campers). Very loud birds and larger than what you often see on the mainland, at least the ones we saw.


We spent a bit of time at the beach...Gretchen running away from the waves.


Beautiful cliffs over the beach.


Kids had fun here, although it does get a bit warm in the sun.


We spotted another pair of island foxes as we found a place to eat a lunch of jerky, nuts, and dried fruit.


Gretchen cautiously trailed the pair but we left them as they proceeded on past this tree.


Then up the hills towards Cavern Point. Nice hike, although at the higher elevations the vegetation is sparser and the sun is brutal, while at the same time, the winds are high. Being the only one to eschew sunscreen, I roasted to a rich vermillion like a langostino in a seafood boil.


But what a view. As always, the small pixelated two-dimensional version pales in comparison.


Worth the climb. At this point the vegetation almost had a tundra-like composition, lichens and scrubby vegetation. I didn't get too close to the edge, I had no desire to experience the drop firsthand.


A raven swung round by us, and, propelled by cliff-funneled winds, made a supreme Harrier style VTOL landing, wings outspread and rigid, slowly hovering in place and descending. He then hopped off the edge abruptly and bid us adieu.


We walked along the trail that rimmed the northeast point of Santa Cruz.


This was the view of the harbour and beach where we landed, from up on the trail.


Eucalyptus trees are everywhere down in the once-inhabited valley, introduced here for one reason or another. We rested a while by this one, while walking down towards the canyon.


We didn't get too far but got to this open spot before deciding to return to the beach, where the kids could play at water's edge.


On the way back, another island fox.


At the beach I found a rocky spot of shade under a cliff to relax at for a bit while Debra did the yeoman's work of keeping tabs on the children, preventing drowning, etc. Wasn't long before our rescue party arrived in sight!


We loaded onto the boat while listening to the commands of the captain who sounded incredibly like a Brent Ozar doppelganger, and bid goodbye to the island.


Then the next few hours were in traffic, lovely traffic. But we got to Anaheim eventually, which was wonderful, and quickly checked in and marched down the street to Pizza Press, which was a very nice establishment over all...friendly workers, an amusingly ingenious approach to pizza (efficiency of a Subway/Chipotle applied to pizza), and most importantly, good beer.


Caught the fireworks at 9:30 and then into bed, Disneyland tomorrow.

Day Fifteen: Disneyland
Today, that great wallet-lightening overdose of nostalgia that is Walt Disney's original park. We rose early, of course, and ate breakfast at our hotel opposite the entrance of the park. Then over to buy tickets early and stand in line. They usually let you in a bit early to the Main Street area so at 7:45 we were winging it towards the central hub.


Then to await "rope drop". Being married to a Disneyphile (more accurately, Disneyland-phile) makes one well-acquainted with all the lingo.


Through the castle to Fantasyland, our usual first stop.


Peter Pan was closed for remodelling, so we went on Dumbo first. Peter particularly liked it...it affords a nice view of Fantasyland.


Then onto Casey Junior's Wild Ride. Pete insisted on the cage car, and Gretchen decided we would be island foxes.


Then we rode a few in quick succession...Pinocchio and Snow White, both of which are horrifying to small children, but ah well, that's what dark rides are for. Then onto the carousel.


The children wanted to sit in the static teacup...a sign of things to come.


Then we did Alice in Wonderland, and after that the kids insisted on the tea cup ride. Debra had swore it off after nearly getting sick on it one time from the motion, but she assented. Kids loved it and Debra pulled through...


Then we went to "Toon Town" in order to introduce the kids to roller coasters. Gadget's Go-Coaster was the modest, short coaster they have there that was a good introduction, and the kids were addicted instantly, we had to ride it twice in succession. We didn't spend much time in Toon Town but the kids enjoyed it. Just needs a bit more shade.


Then we piled onto the train and rode it around the park to New Orleans Square, where we got off and got into a modestly quick line for Pirates of the Caribbean, a great and classic ride if a bit polluted by annoying Johnny Depp movie tie-ins.


Then off to one of our favorites, the Jungle Cruise in Adventureland.


We got pineapple ice cream and awaited the next show at the Tiki Room. Amused at how much Pete loved the Tiki Room.


Then we got a bit of lunch at Rancho Del Zocalo, the resident Mexican restaurant. It was decent enough, but the kids menu food was hopelessly bland (an obvious tactical decision given so many kids refuse to eat anything spicy). Debra got a taco salad that was the best option, it seems...we'll remember that for the next time. Then, having gotten the order of things correct for once, we left the restaurant and THEN went to the petting zoo:


Stayed there for a bit, found some shade in a cabin apparently devoted to crayons and coloring, and the kids got to see the goats, donkeys, and a horse. Then we decided to throw caution to the wind and try to ride Big Thunder Mountain, a much more substantial coaster-type ride. Peter had to be 40" tall, which he just barely managed. Good time was had by all, nobody flew off the train. Then, churros procured, we ventured back across the street for a large, multi-hour midday nap. WE SHALL RETURN.


The kids were almost impossible to wake at 4PM when we finally started trying to do so. Eventually we got them up and grudgingly walking back over to Disneyland. We went straight to Trader Sam's, the tiki bar under the shadow of the Disneyland Hotel, where we ordered tiki drinks all-around, with a kid-friendly tiki punch for the little ones, along with a Hawaiian flatbread and a raw tuna poke salad.

Then onto the monorail towards Tomorrowland. We did Buzz Lightyear's Astro Blasters which was a slow, traversing ride where you get to shoot with a laser blaster (Pete enjoyed, unsurprisingly, and spoke greatly of his exploits against the robots upon exit). We had picked up a FastPass for Star Tours and had some time to kill, so then we got in line for Astro Orbiter, which is basically like a slightly taller version of Dumbo with the rocket them. Pete was in his element. He tucked in at the front and gripped the control mechanism firmly and there was no joking around or goofing any more...he was deadly serious.


Then we got onto Star Tours which was a fun experience for everybody...just barely made the height limit, again. Pete was almost in a daze at the various sights in the line.


Then our evening plans fell into a sort of entropic condition...we didn't have a firm plan for what to do but we had accomplished much of what we intended, so we ambled about a lot. Debra and Pete did the shooting gallery while me and Gretchen hunted for a souvenir for her. We walked over to see Splash Mountain running a 75 minute wait time, so we rode Winnie the Pooh instead. Peter was quite pleased to find a non-scary dark ride. We then piled onto the train once again and completed the loop over to Fantasyland. The teacups were a popular hit, so we did it again, this time with the pretty lighting:


The parades were happening and the cast members were in crowd control mode, clubbing unruly guests with nightsticks and firing rubber bullets into the happy visiting...well, it wasn't that bad. But in our effort to get to Main Street, we were routed strangely through a back alley, which was exciting in a strange way. Seeing the warty, pimpled backside of Disneyland.


While the parade still rolled on, we stayed in one of the massive gift shops along the street and finally Gretchen found something she was happy with. I honestly have no idea what it is, some sort of pink thing that has buttons. I was tired. Then we went and got some ice cream next door, and eventually wormed our way back to the entrance to Main Street for the fireworks...we were a bit further than Debra would have liked, but hey, always room for improvement.


Then over to the hotel to wind down and get to sleep, before which I managed to slice my thumb open trying to cut zip-ties with a pocket knife to free Peter's new toy (a very cool Han Solo blaster). We did have the foresight to remove the batteries over night. Tomorrow...our return journey begins, and we head towards the Grand Canyon.

/*Technical difficulties, as I left my heart in San Luis Obispo (well not really, but we do love that area) and my iPhone cable in Anaheim, so I can't sync my phone and do much blogging. But we've got another two days to slog through, homeward, and I'll integrate our travel logs into the post once we alight at our destination and I can offload from my phone. To be continued!*/

Day Sixteen: The Grand Canyon
We woke up after a not-very-long night of exhausted sleep, and after bidding a fond farewell to the upper slopes of the Matterhorn across the street over a breakfast waffle, we checked out and headed northeast. The traffic was quite reasonable, and we made decent enough time, getting up to Barstow and turning right onto the 40. California is, in this particular aspect, not the most beautiful region, but we've seen its better parts so, fair enough.

We had made our way past Needles and were making good time...we stopped in Kingman, as we have many times before, for the last ritualistic lunch of In-N-Out on a homeward journey. We've begin to pale on the zeal of the most ardent In-N-Out fans, I admit. Debra actually said "the fries are not good" before I harshly reprimanded her and had her amend her statement to "the fries aren't the greatest, necessarily, according to one person's opinion". I admit I feel something close to agreement on her statement, and their insistence on using the damne'd, godforsaken SPREAD instead of mustard and ketchup, and where are the pickles I ask you?? But still, a native-born son never forgets his deep familial loyalties, and In-N-Out is priced in the true fast food market (vs the premium burger joint) and in that arena it cleans up handily.

Outside of Kingman we had a little fun when, due to the non-linear behavior of the Nissan Versa gas gauge, heavy use of air conditioning, steep inclines, 80mph cruise control, and perhaps a smidgen of my inattentiveness, we came bally close to running out of gas. I noticed when we dipped below a quarter tank, but we had a good distance to go before we reached Seligman, where the "estimated miles left" on the dash had devolved into a blinking triple hyphen of "you're on your own, buster". Still, I paid the highway robbery prices happily and we headed out again, turning north in Williams and trotting happily off to the Grand Canyon. I had a weird premonition where I sang the theme song of one of the more annoying of my son's train-themed TV shows, except with "elk" in place of chug, and strangely within seconds we spotted a herd in the trees to the left, with some young bulls visible. First time I've spotted a bull elk (at least, when antlers are visible) in the proper wild.

Anyway, we checked in and I immediately noticed how relatively empty the place was...it was crowded in comparison to, say, Santa Cruz Island, but fell far short of the packed insanity we experienced when last here in October of 2010. We walked the rim a bit at first.


Gretchen is good with heights, yet still cautious.


We spotted a chipmunk, or ground squirrel, or whatever this little chap is, along the rim. They are incredibly tame, due to the constant traffic of people from Europe and Asia who may be understandably unable to comprehend the English signs specifically forbidding, on pain of law, the feeding of the wildlife.


We ate dinner and were very pleased by the service and the food, and headed along the rim. Lovely view that night.


We went to an older rock building (now transformed into, what else, a gift shop) west of the lodge, along the rim.


Peter immediately commenced climbing upon the rocks (far from the edge, of course, given the watchful eye of his mother).


Gretchen likewise, albeit in her more calm way.


Then we decided to do a bit of the Bright Angel Trail, really only a half mile or so. KIDS ON THE INSIDE AT ALL TIMES.


You have to view this in full resolution to see, but I took many pictures, most of which were blurry due to range and low lighting, of a pair of mule deer on an outcrop in the canyon. Lord knows how they got there, but they seemed at ease. Certainly surer of foot than most humans.


We stopped at the first tunnel and headed back.


Light was beginning to fade at this point.


We passed by the old stone gift shop and saw a squirrel (also viciously unafraid of humans) trying to bust his way into the place with a slim jim or something.


He gave me a surly look and said I'd best clear off, if I knew what was good for me. Since I wasn't in possession of my .25 caliber Marauder (The Squirrel Reaper) I heeded his advice.


We went to the gift shop afterward and enforced the Last Toy of Vacation rule, and the Boy got a canteen, which he is still very enamoured of, and Gretchen got a stuffed Great Horned Owl.

This is the lobby, and I have fond and embarrassing memories of huddling on the bench to the left of the fireplace in 2010, long before I began my career as a DBA, trying to connect to the lobby-only wifi to connect back into work, where apparently there was some problem with the accounting software. In retrospect it was that most silly of SQL issues...creating databases in the default full recovery mode, without creating transaction log backups, and eventually the log fills up and everything shuts down. It amazes me that it actually took as long as it did to fill up the drive, but it did, and I trolled about for a while, picking up bad advice here and there, and eventually I did something that fixed the problem temporarily, I'm sure. So...slightly embarrassing to recollect, but still, there was a specific spot a lesson was learned, and so it is fun to see it again after I've come so much further.


Then we went and sat outside to watch the stars come out. They were slow in coming so we went inside, and Debra and the kids went out a bit later...but the darkness was a bit on the scary side to the younger contingent so back in they came.


Day Seventeen: Navajo Lands and Southern Colorado
We packed up and left early...of course, not before I snatched another glimpse of the raison d'etre for that cluster of establishments on the South Rim.


Spotted some floppy-eared mulies on the way out. Debra says they are her favorite deer...mostly because of the big-ear thing. But for the moment, whitetails are my local so they have my loyalty and lethal devotion.


We stopped VERY briefly at Desert View where I basically ran from the car in an effort to snatch a quick glimpse of whatever the Desert View was...I got halfway down the path, saw the view tower, and took a picture, and ran back...somewhat of a foreshadowing of the day's events, unfortunately, but we got through.


still, on the run back to the car I stopped briefly to view the beautiful, fruit laden boughs of the junipers...made me think fondly forward to this winter when I will make another sahti, a Finnish beer brewed with juniper boughs and berries.


Then into Navajo country. We came across Tuba City, which, had I Navajo blood and political aspirations, I would immediately concoct a long-term scheme to get elected mayor, dissolve the city council, and consolidate my power. The end game being, turn the place into a sort of Mecca for tubas...with daily tuba orchestra performances and every household with able-bodied adults being required to have a tuba hung over the door for quick access if the Strategic Tuba Reserve needed to be called up in an emergency. I'm sure Tuba City derives from Tuuvi or some other Navajo word, but such is the version of reality I should like to imagine.

There's some really beautiful scenery in the Navajo lands, but one spot that was relatively boring was the Four Corners. Basically it is a monument to lazy cartographers who got tired of painstakingly mapping out riverine borders and said "screw it, let's just grid this bastard out". We had intended to stop in and and do silly pictures hopping from Utah to Colorado to Arizona to New Mexico, as just about everybody intends to, but we saw the Navajo nation was interested in a fee for this arguably modest privilege, so we turned around and kept on.

We headed into Mesa Verde and began a long and windy climb up the mesa. The view was beautiful, if a bit flat and underwhelming in iPhone 2D.


Sadly, at this point, Gretchen had begun to succumb to an unpleasant illness...we weren't sure...still aren't completely sure, to be honest, if it was a stomach bug, motion sickness, desert related allergies causing drainage and stomach problems, or some strange concatenation of all of the above, but she was pretty miserable, so we stopped at the Far View area and got some food. Debra was in a hurry to get going, and bade me rush along to the site. I did so, speeding a bit more than the park service would prefer, and snatched a hasty picture of the Cliff Palace, then sped back up, as I'd started to wonder if Gretchen was dehydrated and wanted to make sure she was getting water (of course, Debra was taking great care of her!). We'll come back here at some point and actually dig in a little deeper.


Gretchen was in a low ebb most of the rest of the day and we tried making things as good as possible for her, windows down, etc. The San Juan mountains were incredibly beautiful, but also somewhat trying to someone with a tendency towards motion sickness and who is already feeling sick. Although this picture hardly captures it, it felt like a Poor Man's Yosemite, around this point.


I had a funny moment when I was going a scalding 5mph over the speed limit, and shot past a highway patrolman...I was immediately struck by horrified guilt, and watched in my rear view mirror for the inevitable...his lights went on, and I pulled over and waited. His lights went off...and I still waited. Eventually, he turned around and followed, I knowing the inevitable had sought me for its own. He walked up to the car and I placed my hands on the wheel to prevent undue nervousness of the officer. He peered in (while Pete was loudly shrieking something or other) and asked if anything was wrong. I nervously said nothing and quickly confessed to the cardinal sin of driving 5mph over and assuming his lights were an indication for me to pull over. As I recall he was just using them to turn out of there, and thought I needed something when I pulled over. Anyway, he was probably amused at the ease of this Missourian willing to hand himself over to the mercy of the law without even a modest pursuit, and we trotted off after he advised us to be careful, and we thanked him. We eventually got to Alamosa. Gretchen perked up a lot in the hotel room, but wasn't eating well. Anyway, we slept well in general that night.

Day Eighteen: Home
Today actually went much better than perhaps we expected...Gretchen was squeamish at breakfast and we feared the worst, given an almost 11 hour drive time (which inevitably gets extended by all the breaks for gas, food, and restroom stops). We rigged up a blanket around her window to shield her from the sun, which worked very well, and I gave up hopes of fuel efficiency gladly and most of the morning we rode with windows down and the air conditioner on. We sped past the Great Sand Dunes National Park, which was on our agenda, but I reluctantly at first, but happily in retrospect, acceded to relegate to a future visit in light of Gretchen's discomfort and our long day. Given what it is, it was really just a facade for any number of cat litter box metaphors for me on this blog anyway, and we'd seen enough beautiful landscapes this trip to last quite a while.

But Gretchen did seem to do amazingly well, so we're still not sure what it was...but she started eating and drinking, and she did fine today without losing her metaphorical and/or literal cookies. We were extremely happy to inch into Kansas eventually, and we stopped midway to eat a late lunch and/or dinner (our internal times are still in Pacific time) and I bought a bit of petrol. I noted the carnage on our bow and was reminded of the words of Shelley: "I am Ozymandias...Look Upon My Bumper, Ye Invertabrates, and Despair!"


But we drove through, amused by the swollen rivers and lushly green farmland, and made it home, taking a last glimpse at the trip odometer. Enough driving for me in a fortnight, plus a few days.


Nothing overly dramatic to end with...unlike last year, I'm not going to end with an impassioned plea for the one-year-older version of us not to be so senseless, although I might say this exceptionally ambitious vacation doesn't need to be repeated next year. Almost all of the places we visited, we loved, and the way I have always viewed it is, as a buffet...a taste of here and there, to let you know what you might like to explore more in detail. And I'm sure that we'll be doing a bit more exploring of some of these places in years to come.

25 March 2015

Join Predicates Are For Amateurs

Up here in The Cloud, we like our Data Big, our development Agile, our music undiscovered, and our organic kale locally-sourced and humanely killed. And so when these tiresome on-premise DBAs tell me things like "you need a join predicate" or "what the hell did you just do to tempdb you idiot", I laugh. When I want to pull 8 octillion rows into Management Studio, I don't let petty concerns like the fact that I can't even conceptualize what a yottabyte is (much less distinct sort a dozen of them in tempdb) stop me from catching the vision and delivering on real-time BI PowerQuery BigData that will supercharge executive decision-making. Umm, also ROI. I forgot to use that one.

I imagine René Descartes is smiling warmly while looking down from The Cloud (well, where else would he be? Surely not suffering in torment down in On-Premise!!), observing all these wonderful Cartesian joins, named after the old boy. This is an -actual- execution plan recovered from the wild:

03 March 2015

T-SQL Tihai Generator

In a somewhat eccentric convergence of two of my interests, I decided during a slow period to write a bit of code that generates tihai patterns. Tihai is a concept in Indian classical music that fits a pattern of threes into the rhythmic cycle. You can read about it in general here or in painful detail here. Basically you have three equal musical phrases that end in a final stroke, possibly with a rest following each, but the third and final phrase ends with the stroke starting the next rhythmic cycle, on sam (first beat of cycle). I'm sure there are much cleverer ways to do this, but this worked for me (yay brute force iteration!!):


--tihai generator
DECLARE @MatrasToFill INT = 16;
DECLARE @rest FLOAT, @body FLOAT;
DECLARE @restlist VARCHAR(20) = 'X_2_3_4_5_6_7_8_9_';
DECLARE @bodylist VARCHAR(20) = 'B-2-3-4-5-6-7-8-9-';
SET @rest = 0.5;
WHILE (@MatrasToFill > 3) --Can't really make a proper tihai with 3 or fewer beats to fill
BEGIN
   PRINT
'To fill ' + CAST(@MatrasToFill AS VARCHAR(10)) + ' matras:'
  
WHILE (@rest <= 5.0)
  
BEGIN
       SELECT
@body=(@MatrasToFill - (@rest*2))/3;
      
IF FLOOR(@body) = (@body) AND @body > 0
      
BEGIN
           PRINT
              
CAST(@body AS VARCHAR(10)) + ' notes in body, '
              
+ CAST(@rest AS VARCHAR(10)) + ' notes in strike/rest.'
          
PRINT
              
LEFT(@bodylist, @body*2)+LEFT(@restlist,@rest*2)
               +
LEFT(@bodylist, @body*2)+LEFT(@restlist,@rest*2)
               +
LEFT(@bodylist, @body*2)+'|Sam';
      
END
       SET
@rest += 0.5;
  
END
   PRINT CHAR
(13);
  
SET @MatrasToFill -= 1;
  
SET @rest = 0.5;ENDGO


Output as follows, if anyone (like me) finds it useful when composing taans and trying to find a good pattern to fill a set amount of remaining matras:

To fill 16 matras:
5 notes in body, 0.5 notes in strike/rest.
B-2-3-4-5-XB-2-3-4-5-XB-2-3-4-5-|Sam
4 notes in body, 2 notes in strike/rest.
B-2-3-4-X_2_B-2-3-4-X_2_B-2-3-4-|Sam
3 notes in body, 3.5 notes in strike/rest.
B-2-3-X_2_3_4B-2-3-X_2_3_4B-2-3-|Sam
2 notes in body, 5 notes in strike/rest.
B-2-X_2_3_4_5_B-2-X_2_3_4_5_B-2-|Sam

To fill 15 matras:
4 notes in body, 1.5 notes in strike/rest.
B-2-3-4-X_2B-2-3-4-X_2B-2-3-4-|Sam
3 notes in body, 3 notes in strike/rest.
B-2-3-X_2_3_B-2-3-X_2_3_B-2-3-|Sam
2 notes in body, 4.5 notes in strike/rest.
B-2-X_2_3_4_5B-2-X_2_3_4_5B-2-|Sam

To fill 14 matras:
4 notes in body, 1 notes in strike/rest.
B-2-3-4-X_B-2-3-4-X_B-2-3-4-|Sam
3 notes in body, 2.5 notes in strike/rest.
B-2-3-X_2_3B-2-3-X_2_3B-2-3-|Sam
2 notes in body, 4 notes in strike/rest.
B-2-X_2_3_4_B-2-X_2_3_4_B-2-|Sam

To fill 13 matras:
4 notes in body, 0.5 notes in strike/rest.
B-2-3-4-XB-2-3-4-XB-2-3-4-|Sam
3 notes in body, 2 notes in strike/rest.
B-2-3-X_2_B-2-3-X_2_B-2-3-|Sam
2 notes in body, 3.5 notes in strike/rest.
B-2-X_2_3_4B-2-X_2_3_4B-2-|Sam
1 notes in body, 5 notes in strike/rest.
B-X_2_3_4_5_B-X_2_3_4_5_B-|Sam

To fill 12 matras:
3 notes in body, 1.5 notes in strike/rest.
B-2-3-X_2B-2-3-X_2B-2-3-|Sam
2 notes in body, 3 notes in strike/rest.
B-2-X_2_3_B-2-X_2_3_B-2-|Sam
1 notes in body, 4.5 notes in strike/rest.
B-X_2_3_4_5B-X_2_3_4_5B-|Sam

To fill 11 matras:
3 notes in body, 1 notes in strike/rest.
B-2-3-X_B-2-3-X_B-2-3-|Sam
2 notes in body, 2.5 notes in strike/rest.
B-2-X_2_3B-2-X_2_3B-2-|Sam
1 notes in body, 4 notes in strike/rest.
B-X_2_3_4_B-X_2_3_4_B-|Sam

To fill 10 matras:
3 notes in body, 0.5 notes in strike/rest.
B-2-3-XB-2-3-XB-2-3-|Sam
2 notes in body, 2 notes in strike/rest.
B-2-X_2_B-2-X_2_B-2-|Sam
1 notes in body, 3.5 notes in strike/rest.
B-X_2_3_4B-X_2_3_4B-|Sam

To fill 9 matras:
2 notes in body, 1.5 notes in strike/rest.
B-2-X_2B-2-X_2B-2-|Sam
1 notes in body, 3 notes in strike/rest.
B-X_2_3_B-X_2_3_B-|Sam

To fill 8 matras:
2 notes in body, 1 notes in strike/rest.
B-2-X_B-2-X_B-2-|Sam
1 notes in body, 2.5 notes in strike/rest.
B-X_2_3B-X_2_3B-|Sam

To fill 7 matras:
2 notes in body, 0.5 notes in strike/rest.
B-2-XB-2-XB-2-|Sam
1 notes in body, 2 notes in strike/rest.
B-X_2_B-X_2_B-|Sam

To fill 6 matras:
1 notes in body, 1.5 notes in strike/rest.
B-X_2B-X_2B-|Sam

To fill 5 matras:
1 notes in body, 1 notes in strike/rest.
B-X_B-X_B-|Sam

To fill 4 matras:
1 notes in body, 0.5 notes in strike/rest.
B-XB-XB-|Sam

10 February 2015

Finding Orphaned Data Files

So Kendra Little's post about how dropping a database that is in an offline state will not clean up the MDF and LDF files got me thinking. I hadn't really considered this before, and wanted an easy way of seeing if I was wasting space with large MDF files that we thought we dropped years ago...a query across CMS should fit the bill.

Here's what my code does:
  • Extracts the folder path and data file names for all databases on the instance, from sys.master_files.
  • For each unique path that is used for storing data files, use xp_cmdshell to get all file names stored there.
  • Find any MDF or NDF files in that list that aren't mentioned in sys.master_files.

Here's the code:

DECLARE @files TABLE (pth VARCHAR(500), fname VARCHAR(500));
DECLARE @cmdOutput TABLE (txt VARCHAR(1000) NULL);
DECLARE @cmd VARCHAR(1000), @MDFpath VARCHAR(500);
SET NOCOUNT ON;

INSERT INTO @files
SELECT
        
LEFT(physical_name,LEN(physical_name)-PATINDEX('%\%',REVERSE(physical_name))+1),
        
RIGHT(physical_name,PATINDEX('%\%',REVERSE(physical_name))-1)
FROM sys.master_files WHERE type = 0;

DECLARE pathcurs CURSOR FOR SELECT DISTINCT pth from @files
OPEN pathcurs
FETCH NEXT FROM pathcurs INTO @MDFpath
WHILE @@FETCH_STATUS = 0  
BEGIN
        SET
@cmd = 'dir ' + @MDFpath + ' /a:-d /b';
        
INSERT INTO @cmdOutput EXECUTE master..xp_cmdshell @cmd;
        
FETCH NEXT FROM pathcurs INTO @MDFpath
END  
CLOSE
pathcurs
DEALLOCATE pathcurs

SELECT c.txt AS DetachedDataFiles FROM @cmdOutput c
LEFT JOIN @files f ON UPPER(c.txt) = UPPER(f.fname)
WHERE UPPER(c.txt) LIKE '%.[M,N]DF%' AND f.fname IS NULL;


Note, in SQL 2005 you'll probably see references to distmdl.mdf and mssqlsystemresource.mdf, which are the data files for the Distribution and Resource databases, respectively. You can ignore these, or alter the script above to ignore them.

02 February 2015

PRINT Statement "Churn"

So I was sitting in one of those post-mortem type meetings, the sort fraught with tearful recriminations and teeth-gnashing (or at least, perhaps, they ought to be) and I was amused to observe the birth of a silly superstition. It was a mix of technical and nontechnical folk, business analysts, developers, business VPs, etc. We were discussing the performance of a particular SSIS package that runs a stored proc, appears to be complete in terms of data, but then sits and runs on the server for hours afterward, when it should have completed and closed. One developer coined the term "churn", as in, how butter is made, to describe what SQL Server was doing.

It was baffling to see how readily and happily the non-technical folk (and some of the technicals, for shame) accepted this as a good enough answer. Instead of asking, why is this happening and how do we fix it, the execs just came to view "The Churn" as a necessary part of the data processing. "So, how long do we expect The Churn to take with this large a file?" "Can you get me an ETA for when The Churn will be finished?" Soon everybody was getting in on it...even people on the business side could understand The Churn. I mean, what could be more natural than that, you run an SSIS package, it works, and then you have a few hours for the DTEXEC process to sit and "churn"?

This kind of silly superstition, where we take something we don't understand and invent a name for it as a kind of acceptance, hobbles an IT organization, papering over ignorance instead of exposing it and digging deeper. It turns out in this case, as our appdev manager surmised, it was massively looped PRINT statements (completely unnecessary of course) in the stored procedures.

To demonstrate, I created a sample stored procedure that loops 100,000 times:

CREATE PROC usp_CHURN
AS
BEGIN
   SET NOCOUNT ON
;
  
DECLARE @i INT = 1;
  
DECLARE @text VARCHAR(200);

  
WHILE(@i < 100000)
  
BEGIN
       SELECT
@text='You are at increment number ' + CAST(@i AS VARCHAR(20));
      
--PRINT @text
      
SET @i += 1;
  
END
   INSERT INTO
TempTable SELECT GETDATE()
END


As is, with the PRINT statement commented out, this runs very fast (subsecond), as you would expect. The INSERT just lets you know when the proc is actually done.

So I created a DTSX package that does nothing more than run this process, and from a different server, created a batch file that outputs the time, then runs the package, then outputs the time again. Running the proc as is, well, as I say, there's nothing to it, it's just memory getting moved around. But when I uncomment the PRINT statement, things take a bit of a nosedive.

Comparing the package start time (10:41:33.49) to the timestamp logged in the table (10:41:35.010) we see that less than 2 seconds elapsed in the actual execution of the procedure. However, the package completed at 10:45:23.38. So two seconds to do the work, and almost four minutes for SSIS to handle all those PRINT statements getting pushed back up the chain. Now, imagine that scaled up to millions or billions, and you can understand why we had an apparently complete SSIS package chewing up one of the vCPUs on a box for days. Yes, days. And taking the PRINT statements out fixed it.

Tactical moral of the story: be very sparing and cautious when sticking PRINT statements into heavily looped sections of your code, unless absolutely necessary. Strategic moral of the story: stop accepting surface level explanations and lazy superstitions...dig in and figure it out.

28 January 2015

Finding SID Mismatches from SQL Server to Active Directory

So, I had an issue yesterday where a user couldn't log in to a few specific SQL Server instances; they were getting the following error:


The actual recorded login error in the logs was this:
Error: 18456, Severity: 14, State: 11.
Login failed for user 'Dom\User'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors.


Eventually I came upon some rather useful resources for this cryptic error, and took some of the existing scripts and rolled it into a new script that takes all the domain user logins, gets the binary SID stored in SQL, maps it to SDDL format, and pulls the equivalent Windows SID via xp_cmdshell and WMI. Then it compares, and outputs the mismatches. This script isn't particularly well tested but it seemed to go over reasonably well on 2005, 2008R2, 2012, and 2014 instances.

Once you find that you do have a SID mismatch, the unfortunate solution is dropping and recreating the login, whereupon you'll have to make sure all permissions and memberships are retained. Also, one thing I found is that even when there is a mismatch of a SID, it doesn't mean that user can't connect, necessarily. I've yet to fully understand the whole process, but if the user is getting 18456 login failures AND there is a mismatch of SIDs, recreating the login will likely resolve that issue.

Classic disclaimer, don't ever run code you find on the internet on your servers as it will likely truncate all your data, give your servers venereal disease, and contribute to Global Warming. So Caveat Emptor! Also, the SDDL formatting code was stolen borrowed from Todd Engen. The Code:

USE masterGODECLARE @DomName VARCHAR(50);SET @DomName = 'YourDomainGoesHere';IF OBJECT_ID('tempdb..#LoginSIDs') IS NOT NULL DROP TABLE #LoginSIDs;CREATE TABLE #LoginSIDs(
  
name NVARCHAR(128),
  
NTname NVARCHAR(128),
  
BinSID VARBINARY(100),
  
SQLSDDLSID VARCHAR(200) NULL,
  
WinSDDLSID VARCHAR(200) NULL
);
/* Get relevant logins and SQL SIDs */INSERT INTO #LoginSIDs (name, NTname, BinSID)SELECT
  
name,
  
REPLACE(name,@DomName+'\',''),
  
SUSER_SID(name)FROM master.sys.server_principalsWHERE [type] = 'U'  /* currently omitting NT groups */AND name LIKE @DomName+'\%'ORDER BY name ASC;/* Cursor through each to get reformatted SQL SID and Windows level SID */DECLARE @LogName NVARCHAR(128), @BinSID VARBINARY(100);DECLARE sidcursor CURSOR FOR SELECT NTname, BinSID FROM #LoginSIDsOPEN sidcursor   FETCH NEXT FROM sidcursor INTO @LogName, @BinSIDWHILE @@FETCH_STATUS = 0   BEGIN
  
/* Convert binary SID to SDDL format */
  
DECLARE
      
@StringSID VARCHAR(200),
      
@i INT,  @j INT,  @val BINARY(4),
      
@WMIcmd VARCHAR(200),
      
@WinSID VARCHAR(200);
  
SELECT @StringSID = 'S-'
      
+CONVERT(VARCHAR, CONVERT(INT, CONVERT(VARBINARY, SUBSTRING(@BinSID, 1, 1))));
  
SELECT @StringSID = @StringSID+'-'
      
+CONVERT(VARCHAR, CONVERT(INT, CONVERT(VARBINARY, SUBSTRING(@BinSID, 3, 6))));
  
SET @j = 9;
  
SET @i = LEN(@BinSID);
  
WHILE @j < @i
  
BEGIN
       SELECT
@val = SUBSTRING(@BinSID, @j, 4);
      
SELECT @StringSID = @StringSID + '-'
          
+CONVERT(VARCHAR, CONVERT(BIGINT, CONVERT(VARBINARY, REVERSE(CONVERT(VARBINARY, @val)))));
      
SET @j = @j + 4;
  
END;

  
/* Get Windows SID from WMI */
  
CREATE TABLE #cmdOutput (txt VARCHAR(255) NULL);
  
SET @WMIcmd = 'wmic useraccount where (name=''' + @LogName + ''' and domain='''+@DomName+''') get sid';
  
INSERT INTO #cmdOutput EXECUTE master..xp_cmdshell @WMIcmd;
  
SELECT @WinSID=REPLACE(txt,CHAR(13),'') FROM #cmdOutput WHERE txt LIKE 'S-%';
  
DROP TABLE #cmdOutput;

  
/* Update temp table */
  
UPDATE #LoginSIDs
  
SET
      
SQLSDDLSID = @StringSID,
      
WinSDDLSID = @WinSID
  
WHERE NTname = @LogName;

  
FETCH NEXT FROM sidcursor INTO @LogName, @BinSIDEND  
CLOSE
sidcursorDEALLOCATE sidcursor
--SELECT * FROM #LoginSIDs;

/* Output mismatches */
SELECT * FROM #LoginSIDs WHERE SQLSDDLSID <> WinSDDLSID;



test

25 January 2015

Ermahgerd It's Ermaha!

We decided to take a rather spontaneous trip up to Beautiful Omaha, Nebraska. I capitalize Beautiful to denote it is more a term of respect or courtesy than my own personal observation. Still, I hail from Kansas City which is not exactly...anyway, I'll let that line of thought die on the vine and move on to our trip. We came up as a mini-vacation for Debra's birthday. Saturday we went to the Omaha Zoo.
<

It's a neat zoo, and the geodesic dome for the desert exhibit is impressive.


A wallaby gazing down at us.


Some sort of pig variant, not the most sweet smelling chaps.


Pete is a good sport for the camera...as long as you immediately let him look at the picture on your phone afterward. I guess that's what made the Polaroid corporation all their money.


Spider crabs in the aquarium. Tasty perhaps, but a bit on the creepy side.


Turtle swimming over us in the aquarium tunnel...sharks, rays, tuna (I think), it was quite impressive.


Not the biggest sharks around, but it was nice to see them.


Gretchen watching the rays.


There were several different jellfish tanks, this was some variety of sea nettle.


Another ray happily showing the limitations of your average point and click iPhone photographer.


Gretchen encountering the octopus.


We had a light lunch (the receipt was most decidedly not light) at one of the basic hot dog/hamburger grill joints that seem identical at all zoos. Gretchen wanted to sit on these sea turtles but Random Other Kid seemingly was ready to do battle over it.


Then we headed over to the cats and monkeys area. Some howler monkeys...well, not howler monkeys but something profoundly loud, were bellowing, and Debra assumed they were amplified by a PA...not the case. This one was a beautiful cat.


Jaguar, or as the English call them, Jagg-ee-yarr.


This snow leopard looked irritatingly over at me with a "do you mind?" scowl, then I realized he or she was taking a leak.


Gretchen super excited to see the white tiger.


From another angle, our tiger friend decided to get up and stretch...we thought we were in for a show, and we were, in a sort of way...he laid rather a large present for the zookeepers, and then immediately started licking himself down...there...in classic cat fashion. I refrain from judging, as humans (well...Norwegians, anyway) do have lutefisk.


Malayan Sun bear climbing about.


Ahh, a Salmonella Petting Zoo! Lick your hands clean kids!


I tried challenging this black swan to a fistfight but backed off when he whipped out a flickknife.


Good ol' American black bear. The bear I'm most likely to run into in a social situation in the future, if I hunt out west.


Andean spectacled bear relaxing a bit.


Then we headed back to the hotel. We stopped at the gift shop for a promised inexpensive toy. Pete found his "Star Wars" (not really) binoculars straight away, he's a simple chap and not prone to shopping indecision. He wanted to reenact the Tatooine "Luke searches for R2D2 with binoculars" scene I think. Gretchen on the other hand, wow, getting her to pick something under $10 was quite the event. I eventually started working the sales angle on various stuffed animals and I'm proud to say I closed the sale on a small Bush Baby toy.

One thing I noted at the zoo...the ubiquitous screaming child. Now, I'm not judging, I'm a parent and my kids have never been immune to this kind of spectacular behavioral performance. But compared to the Kansas City zoo, there was definitely an undercurrent of tragedy among the younger set. In the gift shop particularly, the sharp, tired barkings of parents were contrasted against more melting down than in a Zurich fondue restaurant. I guess the largeness of the zoo tends to have kids getting tired out by the end of the day.

Thence to Trader Joe's for some light snacks for dinner, and the hotel. We found out we happened to be right next door to a Cabela's, and I needed socks since we forgot to pack extra, so over to Cabela's, then!


You have to love taxidermy to appreciate this place.


So back to the hotel, where Debra and I enjoyed a bit of Spatlese and now are ushering the kids to bed. Tomorrow, we go to the Strategic Air Command Museum, and from there, to home.

Ahh, but after a night of the sort of sweet repose calculated to dissuade road-tripping parents from future more ambitious plans, we hoisted ourselves groggily up, and began the sport we like to call "keep the children reasonably quiet until it's time to check out". We drove southwest and after 20 minutes or so, arrived at our destination. It was quite cold out, and the family quickly left me in the dust, disappearing here behind the massive Titan, a staggering symbol of the Cold War.


The SR-71 is one of those essential photo ops.


The main hangar hasn't changed much. That's a U-2 overhead.


There was a partially exposed fuselage of a B-25 that we could walk along side, seeing the interior compartments. This was the cockpit.


The B-36 is just enormous, makes a B-52 seem kind of small and svelte in comparison. Six propeller engines, and four turbojets.


Unsurprisingly the kids like the more hands-on exhibits. We stayed over here rather a lot.


But eventually I coaxed them out to see some more aircraft. The B-17, long a favourite and my grandfather's habitat during the brief unpleasantness in Europe during his youth.


Camera got a bit foggy but the kids thought this little parasite fighter (XF-85 Goblin) was rather cute.


But simulators, and anything you can climb about on, were their favorites.


Ahh. Yes. You see that's what's called a reentry vehicle. Err...yes. Bit awkward, this. Well, you see, it was designed to reenter, well, over Russia. In rather not a very pleasant sort of time.


Well, while my daughter begins to ponder the deeper questions of the morality of war, my son seems cool with it and enjoys the interactive Minuteman silo diorama.


Ahh, the B-29. The plane that ended WWII in a particularly controversial way. Not this one, of course, but one of its ilk.


Soft light bathes the ordnance in the 29's forward bomb bay.


An unmanned Apollo vehicle sits in the...hey is that...LUCAS FOR THE LAST TIME GET YOUR CRAP OUT OF MY MUSEUM!!!


Some whirlybirds in the second hangar.


4000lb bomb, amusingly titled "Light" in an ironic twist, perhaps like calling the huge bouncer at the bar "Tiny".


I gotta say, it may not have made as much tactical or strategic sense as the various camoflauge finishes but the stainless or chrome look of this MiG-21 is fetching.


Kids, of course, enjoying the interactive stuff the most.


Then back into the vehicle after an episode of grave indecision in the gift shop, and we headed southeast towards KC, arriving mid afternoon. Now, to fix dinner and prepare for a week of work. Was a fun weekend, and the birthday girl had a good time. Sort of a road-trip sampler, all the fun, tiredness, bickering, and mess of a real road trip but fits in a weekend!