Maurice had always found it curious that his company didn’t administer any tests to new hires. It seemed like a minimal amount of work to save the company time and money. The new “IT Systems Expert” that HR sent to his department did little in his first few weeks to dissuade Maurice from his opinion.
This particular expert, Ben, liked to toot his own horn. He would toot it at length, and to whomever was in the vicinity. He was tooting one of his favourite achievements at Maurice one day, a gripping story of triumph at a major telecom company, when the telephone rang: A branch office couldn’t access the main application supported by Maurice and his team. He turned to Ben.
“See if you can ping their machine – the hostname is RHODODENDRON.”
Ben halted his tale in mid-toot and blinked, as though awakening from a pleasant dream. “How do I do that?”
Maurice wondered what part of the word “expert” he had misunderstood. “You… You open the command prompt and type ping RHODODENDRON.”
“I see,” said Ben. “And… where do I find the command prompt?”
Maurice would have done some tooting of his own in reply, but the branch office rang up again requesting a status update. He was forced to diagnose the problem – an incorrectly-configured client – himself.
While Maurice took over, Ben continued his story. Though Maurice was only half paying attention, he gathered that a report which typically ran overnight had its runtime reduced to an hour thanks to Ben’s database mastery. Indeed, many of Ben’s co-workers took to calling him “The Database Master”.
“…So if you ever need your databases mastered,” Ben cheerily concluded, “I’m your man!”
Deciding he would just as soon not have Ben wandering lost along the command line, Maurice took his new colleague’s advice and unleashed him on their application’s database, a SQL Server catalog clocking in at forty gigabytes. Concerned about the database’s growth pattern, Maurice asked the Database Master’s advice.
“The first thing to do,” Ben said, firing up Management Studio, “is determine just how much information is actually in here. To take the database’s pulse, as I like to say. We’ll just count the total number of records.”
After a few moments of uncertain muttering on Ben’s part, Maurice looked over his shoulder. Above a console full of error messages shone a true piece of database mastery, laughing in the face of ANSI SQL syntax:
select count() rowID
While the database’s growth pattern remained a mystery for the time being, Maurice was starting to see a pattern in the Database Master’s “expertise”. Not only was his query incomplete, he was attempting to run it against the wrong database: SQL Server’s built-in master catalog, of course.