Procedure Cache and Dynamic Management Views

SQL Server, T-SQL
I'm just going through the chapter on the procedure cache in the new book and I'm having a blast playing with the dynamic management views and functions that let you access the procedure cache. It's just too much fun and way too easy to get detailed information about the queries in the system, not like the old days. First, you can access the cache itself with the DMV, sys.dm_exec_cached_plans. This shows some of the data describing the plan in cache, but most importantly it provides the plan_handle. You need this for other joins later. You can also use sys.dm_exec_query_stats to get aggregated performance statistics about the plan. It also has the plan_handle and two things new to SQL Server 2008, the query_hash and the query_plan_hash, also known as query fingerprints.…
Read More

SQL Server 2005 SP3

SQL Server
It looks like it's on schedule for an RSN release (Real Soon Now). For those who can't wait, the latest cumulative update, #10, is available for SQL Server 2005. If you don't know, the cumulative updates are a collection of all the small hot fixes and patches that have been issued by Microsoft over a period of time. Instead of tracking them all down individually, you can get the cumulative update and install it.
Read More

Dissecting SQL Server Execution Plans at PDC

PASS, SQL Server, T-SQL
I just got word that Red Gate has printed more copies of the book that they'll be distributing at the Microsoft Professional Developers Conference that's taking place in LA. I just wish we had a 2008 version of the book now because, while most of it is still applicable, there's more that can be done with execution plans now. Have I mentioned I think the missing index information that's displayed with the statement text in the graphical execution plan in SQL Server 2008 is pretty slick? Well it is. I hope they're going to distribute it at the PASS Summit this year too. I think they are, but I don't know that for a fact.
Read More

JumpStartTV

SQL Server, T-SQL
All the videos I recorded on execution plans for JumpStartTV are now available. Please, go and check them out. Then hang around JumpStartTV and check out all the videos that Brian Knight did on SSIS. Also, if you're interested, I think Andy and the team would like other people to submit videos as well. So if you're watching my stumbling attempts and are convinced you can do better, do it and submit it.
Read More

Video Lessons

SQL Server, T-SQL
A while back, I wrote a book, Dissecting SQL Server Execution Plans. Because of it, I had some conversations with Steve Jones & Andy Warren. For a SQL Server geek, heady company. Anyway, they asked me what my plans are for the book. Plans? I wrote it. I thought that was the plan. But they meant lessons, licensing and all that kind of stuff. I didn't have a clue, but they did. A few weeks ago I flew down to Florida and recorded a bunch of short video lesson plans derived from the book and from discussions with Andy Warren. It was a blast. They've now been published over at JumpstartTV. I hope you find them useful. I had a blast doing them and learned a lot from Andy and…
Read More

Training and Learning

SQL Server, Tools
I think these are usually two different things, but most people conflate the two. There was a great discussion over at SQL Server Central based on an editorial by Steve Jones. It's worth reading through to see how people learn or get themselves trained. One common theme is reading books. I'm looking at stacks of them all over my desk, so it would be hard to deny their use. If you too like to read, then I've got something for you. Red Gate is doing a promotion where, when you purchase SQL Tool Belt, you can also download five E-Books offered by Apress. Several of them look pretty interesting, so this is a good deal. Not to mention, if you're not using some of the tools from SQL Tool Belt already, you're…
Read More

SQLPLAN Glitch

SQL Server, T-SQL
While I was doing some work for Andy Warren (more on this after Sept 1st), I came across an interesting little glitch when saving XML execution plans out as SQLPlan files. It's easy enough to replicate. Just get an XML execution plan from your query: SET STATISTITCS XML ON; SELECT... Click on the link to open the XML plan. Click on the "File" menu and then the "Save As" menu item. It opens the familiar file save window. Click on the "Save as type" drop down and switch to "All Files (*.*)" Save the file with an extension of ".sqlplan." Good. Now you've got an execution plan file that can be opened and viewed as a GUI execution plan. Without closing the XML, try to open this new plan. You…
Read More

Deadlocks vs. Blocks

SQL Server, T-SQL
It makes me crazy when I interview someone who has five or more years as a DBA, but they don't know the difference between a block and a deadlock. It's a complete showstopper for me. If you don't know this, you're an entry-level DBA, don't talk to me about your years of experience. Sorry, but there it is. Here's someone that's kinder than I am in every way. Not only have they cut people slack on this question, but he's provided a well done answer to the question. For those who may interview with me in the future, go and read this and understand it.
Read More

SQL Server DBA’s Sound-Off

SQL Server
This is a great read about the attitudes and beliefs of quite a few SQL Server DBA's. It's very interesting how certain beliefs and attitudes seem to be common. I was also reassured that my attitude about a certain DBA was accurate... less said the better. These are interesting and informative guys doing the same kind of work that I try to do. If you're trying to, go read it and learn. I read about it on StatisticsIO. Another place with good things to read.
Read More