TSQL Tuesday: Why Are DBA Skills Necessary

November 2, 2010 at 8:00 am (Misc, SQLServerPedia Syndication) (, , , , )

 

Quote: “Database stuff, all this programming stuff, is easy. Anyone can do it. That’s why everyone in the company has sa privileges.”

For nine months, I worked in an environment where everyone, from developers to QA to the sales people to the receptionist, had SA privileges. You know what? DBA skills are necessary.

I speak from the point of view of someone that has had to recover a server after a salse person helpfully “cleaned up the temporary stuff on the server” by dropping tempdb, causing a late deployment for a client. I speak from the point of view of the guy who kept a window open on his desk with the database restore script ready to run, all day long, because of “accidents” that stopped development until I could get the database restored. I speak from the point of view of someone who had to explain, multiple times, “No, you can’t hit the undo button to get that data back” in client systems. And yes, I could go on and on about this nine month gig, but I won’t. You might consider it an extreme case, mainly because, it was.

Instead, I’ll talk about another  job. It was a free-wheeling dot com. We were doing some amazing stuff. We were running  well over 300gb of data into SQL Server 7.0 in a 24/7 environment… until the day one of the managers of the organization said “You database guys are spending too much time working on maintenance of the server. SQL Server manages itself. You will stop all maintenance, immediately, and don’t work on it any more.” It only took two weeks for the server to crash. It took us three days (72 straight hours)  to rebuild the system and recover the data, with no web site available for our thousands of clients during that entire time. Funny enough, a memo came down from management, not thanking us for putting in all the effort, no, but instructing us that we should spend adequate time performaning maintenance routines on the server.

And before you ask, yes, I can keep going. I have tons of examples. How about the application development team (different company) that built the entire database out of multi-statement table valued UDFs that called other UDFs that called other UDFs that called other UDFs… which led to a delayed production roll-out.

What I’m saying is, these are not isolated or extreme examples (OK, the first one was extreme, but only a little). This is real world stuff occurring on regular basis, every day, all over the world that negatively impact the businesses that we support. It’s not that people are stupid. They’re absolutely not. It’s just that databases and database servers, and data for that matter, are still pernicious and difficult. It’s not rocket science, not by any stretch of the imagination. Why do I say that? Because I can do it. In fact, I’ve been quite successful as a DBA and Database Developer. If I can do it, it’s not that hard. But it is a specialized set of knowledge, and one that is quite extensive. There’s just so much to learn about how data is stored, retrieved, and managed within SQL Server, it’s crazy to assume you wouldn’t need a specialist as you move deeper and deeper into managing more and more information. The lack of that knowledge, can, and does, have an impact on the bottom line.

If you’re a business person or a developer (and by developers, I’m not talking about the exceptional Brainiac that can really do it all, I’m talking a normal human being), ask yourself, do you know how to restore a database to a point in time? Just in case you don’t know, this means recover the database from backups and log backups to a point, usually just before a failure or a bad update or some other problem, again, that will cost your company money.  Ask yourself, do you know how to set up backups so you can do that point in time recovery? Do you know how to tell why a query is running really slow and keeping customers from buying your stuff? Do you know how to tell why you’re getting deadlocks and losing transactions? Do you know how to tell if a process is blocked or just taking a long time? I’m clearly belaboring the point, and this is still fairly basic information. I haven’t even started delving into configuring systems for mirroring, or gathering metrics for a performance tuning effort, or any other of hundreds of tasks that need to be performed to build large scale data management systems that keep your business in business. If you don’t know what all this stuff is, or you don’t know why it’s needed, you might just need someone in your organization who can help out.

And yeah, there are tools out there now, like Object Relational Mapping (ORM) tools, that take away vast amounts of the labor that used to go into building databases. But, having worked with teams building tools with an ORM, while they’ve successfully removed the database from their thoughts & designs by using the ORM tool, they’re still storing data on a database system. Guess what? The problems, such as deadlocks, index scans, blocking, still exist. Sometimes, these problems are even exacerbated by the ORM tool. Now what? You need a specialist.

Fine, what if you toss all the mess, get rid of relational storage, go for one of the NOSQL database systems. Yeah, that might work, a bit. But guess what. You’re still storing data. It’s still going to, in most circumstances, outlive the application that built it. It’s still going to need to be reported against, backed up, recovered, protected, performance tuned… In other words, you’re going to run into situations where, despite the fact that you’ve eliminated the things that irritate you, like SQL, like constraints, you’re still dealing with pernicious data and you’re going to need someone who has been working out how to deal with that.

Does every single company with any installation of SQLExpress need to hire a DBA? No, of course not. But as soon as your business starts to rely on having data around, all the time, you just might need the skills of someone who has been working with this stuff for a while.

Advertisements

Permalink 11 Comments

SQLServerPedia Awards

November 1, 2010 at 5:52 pm (Uncategorized)

Right, I said I wouldn’t compete, but I can’t help pointing out that I’m pretty proud of this particular blog post that is in the Management and Automation category.  I thinki the number one tool for automation of administration of SQL Server, and pretty much all of Microsoft’s server technologies, is PowerShell. Knowing how to execute scripts on multiple servers, asynchronously, is extremely important to a successful administration automation effort. So, please, despite what I said before, consider voting for PowerShell Remoting with SQL Server.

Permalink Leave a Comment

More Voting

November 1, 2010 at 10:55 am (SQLServerPedia Syndication) (, , )

As if the US Election and SQL Rally voting were not enough (and have you voted yet for the SQL Rally Pre cons? Polls close tomorrow at 8PM), I just found out that SQLServerPedia is holding an awards vote. You only have a week, so get on over there and vote. There are a ton of categories and some really excellent blog posts to choose from.

Yes, I have a post in there, but in this instance, I am not asking for your vote and won’t provide a link. All of those bloggers, many of whom I know personally, put in extra work to get that information out to you. They all deserve your vote. That is a collection of extremely hard working, smart people, that I learn a lot from. I’m not going to try to compete with them. So please, follow the link and take care of business.

Permalink Leave a Comment

Get Out The Vote

October 31, 2010 at 7:00 am (PASS) ()

It’s actually kind of cool that SQL Rally voting for the pre-conference seminars and voting in the real(ish) world in the USA are coinciding. I’m in the running for the pre-con AND I’m volunteering for an actual election campaign for the first time ever.

Volunteering for the campaign is hard work. We’re walking around neighborhoods dropping off literature, which is actually enjoyable. We have to cold call people, and if you’ve never done it, it’s rather hard to describe. I did telemarketing for about 9 months in my youth, so I had a sense of what was coming. I wasn’t prepared for some of the more interesting suggestions (anatomically impossible suggestions) that I was going to receive, but there you go. Luckily, to try to get out the vote for SQL Rally, I just have to blog a bit.

Voting is almost closed, so if you haven’t voted, you really should. Polls close on Tuesday, November 2nd, at 8PM PST, about the same as the real(ish) elections.

Personally, I would like you to vote for my session. I’ve already detailed what I think you’ll get out of the session and what the session is going to be about. I haven’t mentioned why you might want to listen to me blather on about the topic of Query Performance Tuning.

In more than 20 years spent working in IT, one of the most common comments/complaints/squeals I’ve heard is “Why is the application so slow?” There are lots of possible reasons, and I’ve worked before to fix many of them, bad code, poorly written UI, improper network configurations, weak server set-ups, or the database. When it comes to the database, the number one problems, and I wish it were otherwise, are usually the code or the indexes. The fact is, they’re related. You have to lay out your indexes in support of the queries that will feed data to your applications and you have to write your queries in such a way that they’ll take advantage of your indexes. That’s why I was very excited to write the book “SQL Server 2008 Performance Tuning Distilled.” Not only did I get a chance to write about something I enjoy doing (and I really do like tuning procedures) but I got a chance to stretch my own skill set and learn new stuff. I’ve also spent lots of time presenting on this topic to user groups, at the PASS Summit, at Connections, and online at 24 Hours of PASS and other venues. The idea of the session I’m putting on is to attempt to get as much of that learning and experience as I can into one day and hand it over to you the attendee.

Ah, but will you be an attendee? What is SQL Rally you may also be asking yourself (or not, but this is my blog, I get to put thoughts in your head). It’s actually hard to describe. First off, it’s being hosted by the PASS organization. But it’s not a replacement for the PASS Summit. Instead, think of it as a scaled down Summit. Or maybe think of it as a scaled up SQL Saturday. Either way, it’s going to be a multi-day event in the spring of 2011 that will pack a ton of SQL Server, and related, learning into just a few days. It’s taking place on the East Coast so it should be a little cheaper to travel to, it’s shorter than the Summit, so you won’t be gone from work as long, but it’s still going to feature many of the same SQL Server experts you’d expect to see at the summit, just in a smaller, less expensive setting. In other words, vote for my session or not, you should go.

Permalink 3 Comments

Scary DBA Halloween Special

October 29, 2010 at 1:29 pm (Uncategorized) (, )

Not so much my special as SQL Saturday #59’s Special. These guys in NYC are pulling out all the stops. This blog post proves it. If you can make it to only one SQL Saturday in the next 5 months (I’m hosting one in 6), you should go to this.

Permalink 1 Comment

PASS Summit Blogging

October 28, 2010 at 1:46 pm (PASS, SQLServerPedia Syndication) (, , )

During the PASS Summit I have again been given the opportunity to keep my laptop plugged in… as long as I blog about the Key Notes. So, I’m going to do it, power is hard to come by in that place. Once again I can regale you, near real time, what’s occurring in the key note addresses at the PASS Summit. Once more I’ll have the opportunity to jump on to the table while wearing a kilt.

But, this year, you may not want to read me. Instead, you might want to tune into the key notes yourself. PASS is going to transmit them live. You can go to the this link to watch them. Now, I can hear you, literally, thinking to yourself, “Right, just what I need in my life, to listen to some sales hack tell me about some semi-functional bit of software.” Most of the time, you’d be right. But this is PASS. We don’t just listen to sales hacks stumbling through presentations. We’re getting to learn from Dr. DeWitt again this year. I’m jazzed and you should be too. Dr. DeWitt’s presentation last year was simply amazing. In terms of sheer geek fun, it’s hard to beat. This year should be as good, or better.

I’ll also be tweeting all week. Follow hash tag #sqlpass to find out what’s happening from me and all the other Twitterati.

Permalink 2 Comments

Writing Opportunities

October 28, 2010 at 10:00 am (Uncategorized) (, , )

Are you looking for opportunities to show off your elite writing skills and consumate SQL Server knowledge? Want a chance to build up the resume a bit? Are you like me and you have a hard time thinking of ideas to write about? I’ve got a solution for you. There’s a new forum over on SQL Server Central that is all about requests for articles. It’s mostly small stuff, easy one-page articles, a bit more than a blog post but a bit less than a full blown multi-page drill down. Also, if you have ideas for articles that you’d like to see someone write up, you can post them there. You should read the rules about the forum, which aren’t complicated, and then dive in.

Permalink 1 Comment

SQL Rally: Performance Tuning Abstract

October 28, 2010 at 8:00 am (PASS) (, , , , , , )

I get the call, you get the call, everyone gets the call. “Hey, my app/procedure/query/report is running slow.” Now what do you do? You go to my full day session at SQL Rally, that’s what. Assuming you vote for it.

I didn’t post the abstract I submitted for the SQL Rally before because I thought that it would be redudant. However, since it’s not right off the voting page (unless they updated it since I voted), if you’re interested, here’s what I thought I would do for a day. If it sounds good to you, please go here and vote for it.

One of the most common problems encountered in SQL Server is the slow running query. Once a query is identified as performing poorly, DBAs and developers frequently don’t understand how to diagnose the problem and often struggle to fix the problem. This one day seminar focuses exclusively on these two topics. Attendees will learn how to identify the queries that are performing badly and learn how to fix them. We will start by learning how to gather performance metrics, both server and query metrics, using tools available directly from Microsoft such as performance monitor, DMVs and Profiler. From there we’ll move into learning how the optimizer works and how it uses statistics to determine which indexes and other database objects can assist the performance of a query. The session takes considerable time to show exactly how to generate and read execution plans, the one best mechanism for observing how the optimizer works. We’ll then look at other DMVs that can assist you when performance tuning queries. With all this knowledge gathered, we’ll move into looking at common performance problems, how they evidence themselves in the metrics and execution plans, and how to address them. Finally, we’ll explore advanced methods for solving some of the more difficult query performance problems introducing such concepts as query hints, plan guides and plan forcing. Through all of this, best practices and common techniques will be reviewed. Attendees will go home with a working knowledge of query performance tuning, a set of methods for identifying poorly performing queries, scripts to assist in these processes and the knowledge of how fix performance problems in their own systems.

To see the other sessions go here:
BI
DBA
Developer
Misc

Although I would prefer that you voted for me, it’s more important that you vote at all (same thing as in real life). Please go here and select the sessions that you want to see.

Permalink 1 Comment

Virtual Presentation Tomorrow

October 27, 2010 at 8:03 am (PASS)

I’ll be presenting a practice run at one of my PASS Summit presentations, Identifying Common Performance Problems using Execution Plans, for Pragmatic Works tomorrow, October 28th. If you can’t make the Summit, please stop by.

Permalink Leave a Comment

SQL Rally: One Day on Query Performance Tuning

October 26, 2010 at 10:37 am (Uncategorized)

The SQLRally, a new PASS initiative taking place in the spring, is going to be a community driven event. This includes selection of the pre-convention (precon) paid presentations through a voting process. I have a session called Query Performance Tuning, Start to Finish. It’s a one day session on everything about tuning queries.

I won’t republish the abstract and bore the heck out of you, but I will list the 5 skills I think you’ll take away with you if you attend (after voting for me):

  1. The ability to collect performance metrics on your servers as part of an overall query tuning methodology
  2. The ability to generate, read, and understand execution plans from multiple sources in support of troubleshooting poorly performance queries
  3. An understanding of how the optimizer works in support of writing better TSQL code as well as troubleshooting poorly performing queries
  4. A working knoweldge of DMOs that will help you identify and fix performance issues on your servers
  5. The ability to address common query performance problems

The thing is, query performance frequently comes down to just a handful of common problems.If you learn how to identify which queries are running slowly, and how to discern which of the common problems you’re running into, you’ll almost always know how to fix the query, whether it’s restructuring it, rewriting it, or simply adding or modifying indexes in support of the badly performing query.

Please, if this sounds interesting, go and vote for it. If not, please go and vote anyway so that the community’s voice is heard.

Permalink 1 Comment

« Previous page · Next page »