• SQL Server
  • Log Shipping Tricks Demo
  • SQLCruise Alaska 2012 Pics
SQLSoldier News From the Frontlines

Meme Monday: Dumb Questions

June 6, 2011 11:42 am / 6 Comments / SQLSoldier

Meme Monday: Dumb Questions

Good Teacher / Bad Teacher

Good Teacher / Bad Teacher


Today is Meme Monday, and I’ve decided to join in on this particular topic. Thomas LaRock (blog|@SQLRockStar) has given us the topic of “Dumb Questions” for today.

No such thing as bad student, only bad teacher. Teacher say, student do. ~ Mr. Miyagi

Okay, some of you may say this is a cop-out, but it’s how I truly feel. Like the students in Mr. Miyagi’s statement above, there are no bad questions, only bad answers and I see plenty of those out there. I will never look down at or think poorly of someone that asks a question about SQL Server. I believe it was Paul Randal (blog|@PaulRandal) who said that we were all at knowledge level zero at some point in our past.

If you have questions, ask away. They’re not dumb questions. If answering questions, please be careful with your replies because students will do what you tell them. Give them good advice, and they will do good things.

A Bad Teacher

A few months ago, I was called in to consult on an application whose operations was being transferred from another operations team to one of the teams in our operations team. The application had a lot of performance problems on the SQL Server side, and they asked me to see if I could investigate the performance problems in advance of the transfer. I was happy to help out, but the existing operations team said no. The existing operations team said they already had two teams working on the performance problems and I would only get in the way. One of the teams investigating the issues was being led by the “SQL Expert” on their team.

When the transition officially started several weeks later, I was finally able to inject myself into looking into their performance issues. Neither their “SQL Expert” nor the two teams working on the performance issues had resolved any of the performance problems. once I finally got access to the servers, I was able to resolve their two biggest issues in less than half an hour.

One issue was that CPU utilization would spike to 100% while certain data maintenance jobs were running causing user connections to timeout. The servers were running balanced power plans and were running at 50% power. Simply setting the power plan to high performance gave them enough extra CPU power that the spikes no longer reached 100%, and end users were no longer getting timeouts.

The second issue was that a data maintenance job had not run successfully in months because whenever it ran, it would run for more than two days until someone finally noticed and killed it. The existing operations team and their “SQL Expert” had decided to disable the job out of fear of the performance impact that the job may be causing. In fact, the catalyst for disabling this job was that they believed that it might be causing the first issue with CPU spikes. Unfortunately, there was no improvement in the CPU spikes when they disabled this job. I investigated and determined that it was a coding issue that caused the job to run in an infinite loop.

The process would get a count of the number of records that needed to be processed, it would loop through choosing the top 1000 records and process them. Then it would use @@RowCount to get a count of the number of records affected and subtract that from the initial count. It would continue looping until the initial count had been decreased down to zero. The problem was that query to get the initial count had slightly different criteria than the query that chooses the top 1000 rows to process. The initial query was getting a count of 143 and in the loop, 0 rows were being processed. No matter how many times you loop through it, 143 – 0 = 143. The loop never updated any data and could never complete.

When I reviewed the servers, the servers violated almost every rule in the Standards and Best Practices document that my team had written. They were easily the worst configured SQL Servers I had ever seen. That wasn’t the key tell for me though. The key tell was the SQL Expert’s recommendation for their database mirroring configuration. Their application had two databases on two servers. DatabaseA was on ServerA and mirrored to ServerB. DatabaseB was on ServerB and mirrored to ServerA. The servers frequently had performance problems that the team would try to resolve by failing over one of the mirrored databases. Obviously, if a server is not capable of handling one of the databases, it’s not going to be able to handle both of them. Ultimately, the failover would cause problems on the other server.

The operations team and engineering team had two servers sitting idle because they wanted to change the mirrored databases to each have their own failover server instead of failing over to each other. They had not been able to make this change because the engineering team refused to grant them a six hour downtime window to make the change. I couldn’t believe my ears. I told them that it would be an outage of less than 5 minutes for that because the only downtime incurred would be when they change the connection strings in the web.config file of the websites (changing web.config causes IIS to restart the application).

Their SQL Expert had requested a six-hour downtime window because he thought that all traffic to the database had to be stopped in order to set up database mirroring. This means they must have taken a really long downtime when they first set up mirroring.

My advice is to avoid calling yourself an expert if you’re not. If you put yourself up on too high of a pedestal, it can be a very long way to fall. Now when I think of their SQL Expert, I think of one of my favorite quotes from the movie The Princess Bride. I bet you can guess which one it is.

You keep using that word. I do not think it means what you think it means. ~ Inigo Montoya

A Good Question

SQL Server 2008 Certified Master

SQL Server 2008 Certified Master


In lieu of posting a dumb question, I’m going to post a good question. Phrases like “SQL Guru” or “SQL Expert” are thrown about quite easily these days. I’ve been called just about all of these not-so-clever monikers at different times throughout my career. Recently, I was meeting with an engineering team to help them review the architecture of an application that they were taking over from another group. The other group had designed the architecture and built a prototype. I was introduced to the engineering team as the “Certified SQL Master” on our team.

A member of the engineering team chuckled a little at the description and asked, “So what makes you a Certified SQL Master?”

My response was simply, “Because I am a Certified Master in SQL Server. It’s a very high level of certification that only a few have achieved. There are less than 90 of us worldwide.”

Posted in: SQL Server / Tagged: General Discussion, MCM, Meme Monday

6 Thoughts on “Meme Monday: Dumb Questions”

  1. Meher on June 6, 2011 at 1:22 pm said:

    Hi Robert,

    Very good Post. I believe very few people understand that that it takes lot of hardwork, dedication and immense knowledge become a SQL MCM.

    Regarding dumb questions my take is one should not feel embarassed to ask them. If one does not question, he/she will never learn.

    Regards
    Meher

    Reply↓
    • SQLSoldier on June 6, 2011 at 1:23 pm said:

      Thanks Meher! I agree compeltely.

      Reply↓
  2. colin on June 9, 2011 at 6:57 pm said:

    Wait…I have a dumb question!! hehe

    First some context: behind my web browser that I am typing this in, I have SSMS open and I am looking at some sql to create a table that has a column of type uniqueidentifier, and I’m thinking, WWSSD? and hearing a voice that says “don’t, please don’t, name that column [guid]“…

    My question: for standards and best practices, are there authors or sources you recommend? (Besides you of course.) I have the 433 test book, and I have a T-SQL Fundamentals book I like too.

    Reply↓
    • SQLSoldier on June 9, 2011 at 7:26 pm said:

      As a good rule of thumb, I avoid any object names that require square brackets, underscores, etc. In short, nothing that will slow down my typing as it requires hitting the shift key or out of reach keys. DBAs hate that. :)

      If you need books on T-SQL, Itzak Ben-Gan would be a good book. And any books on this list would be good choices: http://www.amazon.com/Official-SQL-Server-2008-Certified-Master-Readiness-List/lm/R3RB13PQ7D8TKB/ref=cm_lm_byauthor_title_full

      Reply↓
      • colin on June 14, 2011 at 2:46 pm said:

        This is a great list, thanks!

        Funny you mention underscores…my career started with Unix so I’m in a habit of naming_things_like_this and NotLikeThis because of case sensitivity…but I’m trying to change my ways…

        Keep up the good work, love the blog.

        Reply↓
        • SQLSoldier on June 14, 2011 at 3:12 pm said:

          Thanks! Yeah, I did a fair amount of PERL development on Unix back in the day.

          Reply↓

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation

← Previous Post
Next Post →
<

Remote DBA Services
- serious SQL Server expertise for less than a full-time DBA
My Articles
 
My Book
Check out my interview on

Extreme Data Recovery (with Argenis Fernandez)
10 Things all BI System Administrators Should Know
Upcoming Events
    All events shown in Pacific Time

    No events to show

RSS My SQL Server Magazine Articles

  • Database Mirroring for Disaster Recovery September 16, 2011
  • Comparative Review: Database Schema Comparison Tools August 24, 2011
  • 3 Log Shipping Techniques June 22, 2011
  • Hardening SQL Server June 20, 2011
  • Review: ScriptLogic Security Explorer for SQL Server February 8, 2011

Tags

31 Days of Disaster Recovery Architecture Automation CDC & Change Tracking Data Architecture VC Database Mirroring DBCC Denali Disaster Recovery Dynamic Management Views Extended Events Gamers & Geeks General Discussion High Availability How do I ... ? Humor Idera ACE Program Internals MCM Meme Monday Performance & Optimization PowerShell Professional Development Replication Security SQLBits SQL PASS SQL PASS Summit SQLRally SQL Saturday SQL Server Magazine SQL University SSAS & BI SSIS SSMS SSRS T-SQL T-SQL Tuesday tempDB Tips & Tricks Travel Troubleshooting Undocumented Stuff Whitepapers XML in SQL

News

Download my Powershell Scripts

The following scripts can be downloaded as text files. You will need to change the file extension to .ps1 in order to execute them.

Backup a database
Restore a database
Scan a server to find a free port
Query DNS to get the FQDN of a server


To see some examples of my other forms of writing, please visit my page on WritersCafe.org. It is almost exclusively horror fiction, but I sometimes throw other things in there too from time to time. There's one science fiction story, a couple of poems, and quite a few humor pieces as well.


Look for me in the SQL Q&A section of the August, 2007 issue of TechNet Magazine.
August issue of TechNet Magazine's SQL Q&A column

Protect our Heroes

© Copyright 2012 - Robert L Davis
Infinity Theme by DesignCoral / WordPress

Twitter Twitter 
LinkedIn LinkedIn 
TLF TLF RSS RSS 
WritersCafe WritersCafe 
SQLPASS SQLPASS 
Facebook Facebook
grab this