SQL Sam and the Evil Twin - Part 1 | Database Journal

SQL Sam and the Evil Twin – Part 1

Written By
Steve Hontz
Steve Hontz
Aug 25, 1999
2 minute read

Environment: SQL Server 6.5, SP4


Turn ON clues

SQL Sam strolled into the war room of MegaCorp, Inc., and was immediately accosted by Fred, the head of the
Do-It-All project. “Sam, I’m glad you’re here,” he said,
sweat beading up on his brow. “We’ve got big problems.”

“What’s up?” said SQL Sam.

“As you know, we have two identical servers running the Do-It-All application, Beanie and Cecil.
They’re identical hardware, identical software, identical service packs, identical software configuration- exact twins. But not any more!” Fred threw his arms up in
desparation. “Something has happened to Cecil. It’s taking much longer to run the exact same query!”

“Hmmm… a twin gone bad,” said Sam. “How do you know it’s taking longer to run the query?”

“As you know, our servers process the exact same data in parallel. Beanie’s keeping up, but Cecil isn’t.
I’ve played with the task priority of the application, tried stopping some other services… nothing helped. Do
you think we should reinstall SQL Server? Should I get the hardware manufacturer out here? What about…”

“Hang on, hang on,” said Sam. “First, let’s verify what you are seeing.”

“Okay,” agreed Fred. “Our application does several things, but the one thing that it does most often is call the
stored procedure
sp_FindProducts. That procedure takes some
parameters, and returns a result set
of the products most likely to match the request.”

“Okay,” said Sam. “Let’s do a SQL Trace on both machines and see what we get.”

Continue with SQL Sam and the Evil Twin

Go to the solution now!

Back to SQL Sam Cases


Steve Hontz is President of The Bit
Corner, Inc.
, a Phoenix-based consulting firm
specializing in Windows NT, C++, and SQL Server
development. You can reach him at
steve@bitcorner.com.


Database Journal Logo

DatabaseJournal.com publishes relevant, up-to-date and pragmatic articles on the use of database hardware and management tools and serves as a forum for professional knowledge about proprietary, open source and cloud-based databases--foundational technology for all IT systems. We publish insightful articles about new products, best practices and trends; readers help each other out on various database questions and problems. Database management systems (DBMS) and database security processes are also key areas of focus at DatabaseJournal.com.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.