Resolutions: Outcome

Professional Development
Earlier this year, I wrote a post about my upcoming plans for the year in response to a question asked by Jen McCown (flat out, one of my favorite people, blog|twitter). It was supposed to be about resolutions, but I just don’t make those. I make plans. Here we are, close to a year later (11 months). How did the plans work out? The first one, hinted at the time, was to start a new job. Well, that’s done and it’s going swimmingly, thank you very much. The job has turned out to be harder than I thought it was going to be. I travel more than I thought I was going to travel (although we’re keeping it within the limits we agreed to, I love my new company). Frankly,…
Read More

SQL In The City: LA

Professional Development
Just a reminder that there are a few seats left for SQL In The City: LA on the 28th of October. It’s a free event put on by Red Gate Software. I’ll be speaking there. But much better than that, you can listen to, and interact with, Steve Jones, Brad McGehee, Ike Ellis, Aaron Nelson, and ta-da, Denny Cherry, and double-super ta-da, Kalen Delaney (line forms behind me to talk to Kalen), plus the developers and program managers from Red Gate software that will be there. Take a Friday off work and go get your learn-on. Show your boss the agenda. I guarantee they’ll let you go. Click here to register. You know what else? If you pick up a copy of MVP Deep Dives II before the event, I’ll…
Read More

Book Review: Smarter, Faster, Cheaper

Professional Development
In my continuing quest to not get personal visits from Buck Woody (blog|twitter) I’m making sure that I make good on my commitment to read 12 personal development books in 12 months. We’re up to #4 (again demonstrating the degree of fear that Buck can put in a person) and the book is Smarter, Faster, Cheaper: Non-Boring, Fluff-Free Strategies for Marketing and Promoting Your Business by David Siteman Garland (blog|twitter). The extended title on the book covers what it’s about quite well. David Garland is considered one of the top marketers these days and he seems to follow the processes laid out in his book. I say this because I received a tweet from him after I tweeted that I’d finished reading the book. One of the processes laid out…
Read More

Google + Hangouts

Professional Development
I just finished hosting my third hangout on Google Plus. I’ve also attended one hosted by Andy Leonard (blog|twitter) and one hosted by Tom LaRock (blog|twitter). I am blown away by how useful these things are. I’m actually struggling to try to put it into words. This may be something of a ramble. Jorge Segarra (blog|twitter) brought it up during the conversation this morning, you can’t know everything. You can’t. So what do you do when you’re hitting an issue that you can’t solve because you just don’t have the knowledge? Well, you contact someone who does have that knowledge. You work your contacts and your network and track down the information, because someone you know either knows that bit of information or they know someone else who does. That’s…
Read More

SQL Azure

Azure
If you’ve talked to anyone from Microsoft recently you had to have heard the phrase “all in.” It’s been made very clear. Microsoft is all in on the cloud. What’s that mean? My understanding of it means they are really, seriously committed to building a viable and large presence there. Part of that presence is SQL Azure. Say the word “cloud” and watch DBAs flinch, wince or moan, sometimes all three at once. I have been one of them. I looked at the list of restrictions on a cloud database, snickered, and moved on. But you know what? They’re wrong and I was too. The cloud is absolutely coming. Microsoft is not alone in believing this. Look at the offerings from Google and Amazon and others. It really is becoming…
Read More

Failed Blog Posts

Misc
Over the last week I've started and trashed two blog posts. Let me tell you, that's painful. You get some great idea and then it all goes south. For example, I was going to explain the difference between a table/heap scan and a clustered index scan. The problem was, I ran into gaps in my knowledge, some outright errors in my beliefs on how data was stored, and really faulty conclusions drawn from those facts and a less than thorough set of tests. I'm not even going to tell you what went wrong with the other notion. Luckily, all this was behind the scenes so I didn't post my ignorance for all to see.  Since I'm not offering you a chance to point & laugh (in this instance), you might…
Read More

Small PowerShell Script

PowerShell
I'm still trying to learn PowerShell better. The opportunity to answer simple questions and problems with the tool is hard to pass up. We had a need to clean up data directories where data files were left behind or people put inappropiate files, so I wrote the following Powershell script: [sourcecode language="powershell"]param([string]$filelocation="",[string]$sqlinstance="(local)") Set-Location $filelocation foreach($file in get-childitem) {$base = $file.Name; $result = Invoke-Sqlcmd -ServerInstance $sqlinstance -Query "SELECT DB_NAME(mf.database_id) AS db FROM sys.master_files mf WHERE RIGHT(mf.physical_name,LEN('$Base')) = '$Base' UNION ALL SELECT 'NoDb' AS db WHERE NOT EXISTS (SELECT DB_NAME(mf.database_id) AS db FROM sys.master_files mf WHERE RIGHT(mf.physical_name,LEN('$Base')) = '$Base');" ; if($result.DB -eq "NoDb" -and $file.Extension -ne ".cer"){Remove-Item $base}} It's a very simple script. It takes a UNC and a server instance and then walks through the files in the UNC and validates…
Read More

Learning Powershell

PowerShell
I've been attending a Powershell fundamentals class with Don Jones (blog|twitter). If you read my blog you might be aware of the fact that I've posted a few PowerShell scripts in the past.  So why was I attending a fundamentals class? Because I didn't know what I was doing. I knew going into the class that I needed a better grounding in the fundamentals of Posh, but after the first day of Don's excellent class, I realized that I had been working with PowerShell and didn't have a clue how it really worked. Don's class is excellent and I could spend a lot of time talking about just that (which I'm sure would make Don happy). However I want to concentrate on something that he said during class that really…
Read More

Recompiles and Constant Learning

T-SQL
When faced with a procedure that looks like this: CREATE PROCEDURE dbo.TestProc (@TestValue INT) AS BEGIN IF @TestValue = 1 BEGIN SELECT * FROM Sales.SalesOrderHeader AS soh JOIN Sales.SalesOrderDetail AS sod ON soh.SalesOrderID = sod.SalesOrderID WHERE soh.SalesOrderID = @TestValue END ELSE BEGIN SELECT * FROM Production.Product AS p JOIN Production.ProductDocument AS pd ON p.ProductID = pd.ProductID WHERE p.ProductID = @TestValue END END I used to suggest creating a wrapper procedure in order to avoid the recompiles that occur when the different paths through the IF statement are taken by the optimizer. I mentioned that recently on a post over at SQL Server Central. Gail Shaw (blog | twitter) asked me why I thought there would be a recompile. She said that the optimizer took the query as a whole and…
Read More

More Free Training

SQL Server, T-SQL
Quest Connect 2009, taking place in October 21 for 24 hours, looks like it's going to have 64 different sessions, live and recorded, by a variety of the names in the industry. It's another chance to dig in and learn the details on a variety of topics from some of the top names in the business. Can you say Tom LaRock? How about Tim Ford? I know you want to hear from Brent Ozar. Those are just some of the featured speakers. There are a whole slew of others, it's worth pursuing, and did I mention, the price is right. I recorded a session for them last night. It's on the basics of understanding execution plans.
Read More