Parameter sniffing is when SQL Server compiles a stored procedure’s execution plan with the first parameter that has been used and then uses this plan for subsequent executions regardless of the parameters. More »

To those that don’t know me “Natural Born Killers (The Series)” sounds like a very strange choice for a SQL... More »

Editorial - Lost in Space

Today's editorial was originally published on Sept 2, 2008. It is being re-run as Steve is traveling today and out of the office.

Well perhaps not lost in space, but according to this article, a number of US airports report over 600,000 laptops lost a year. Over 10,000 are lost each week at the 36 largest airports. That's a lot of bits floating out there in the world. There's some dispute as to these numbers in another article, so it's hard to know who's correct. I tend to think these numbers might be high.

In any case, what might be even more amazing is that 65% of these laptops are not reclaimed. What's scary is that 53% of people surveyed said confidential company information was on their laptop and 65% said no effort was taken to secure their data. I found this on Bruce Schneier's blog, and he sees it as a huge dollar loss for the country if the numbers are correct.

My wife travels quite a bit, 30-40,000 miles a year, and she's not surprised by these numbers. She guesses that the main problem is that there is no good way to match a lost laptop with a traveler. Unless you lose it at your home airport, with a lack of staff and the time it might take for something to get your lost and found, it's likely you would never be able to search for it.

And how long would you search? After how many days would you just move on and file a claim and replace the laptop? I tend to carry my important data on a USB key (and likely will upload to some service for future travel), so I'd probably spend whatever time I had in the airport, or maybe a day here in Denver, but after that I'd be ordering a replacement and moving on.

Information has a tremendous amount of value, but to many of us, the information also has a shelf life. We might move on quickly and just accept the losses as part of doing business. I understand that and agree with it for the most part.

However I think we should all have some sort of encryption and protection for our data. You never know when you might have some letter to a bank you drafted with your account information, or something else. For most thieves, I'd guess that an encrypted laptop isn't worth dealing with. They'd wipe it and move on.

The Voice of the DBA Podcasts

The podcast feeds are now available at sqlservercentral.mevio.com to get better bandwidth and maybe a little more exposure :). Comments are definitely appreciated and wanted, and you can get feeds from there.

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

I really appreciate and value feedback on the podcasts. Let us know what you like, don't like, or even send in ideas for the show. If you'd like to comment, post something here. The boss will be sure to read it.

Explanation: The correct answer is: January, August, July, February, June. If PositionId 3 had a date of 1932-02-30 instead of 1932-02-29, then we would have received an out-of-range issue on the insert. NULL, August, July, February, June are not correct because we are going based off of the integer on the month, instead of the PositionId integer.

SQL Server Execution Plans shows you what's going on behind the scenes in SQL Server. They can provide you with a wealth of information on how your queries are being executed by SQL Server, including: Which indexes are being used, and where no indexes are being used at all. How the data is being retrieved, and joined, from the tables defined in your query. How aggregations in GROUP BY queries are put together. Grab your copy today from Amazon!

Restoring from the backup after encryption of datbase
- Hi friends,
I used the following query to restore the encrypted database.
USE master;
GO
CREATE DATABASE Encry2
ON
( NAME = Encry2_dat,
FILENAME = 'D:\SQL2008R2DB\MSSQL10_50.SQL2008R2\MSSQL\Backup\TDEPost.mdf',
SIZE = 3,
...

Why is this Query Taking a long time?
- [size="4"]This query seems to take forever. Is there a way I can speed it up?[/size]
SELECT cat.Category1 ,
cat.Category2 ,
cat.Category3 ,
tblItem.GPItemNumber...

Talking baseball
- Okay, a topic that has NOTHING to do with SQL . . .
Came across [url=http://www.sqlservercentral.com/Forums/Topic447796-4-1.aspx]this link[/url] describing the SSC point scoring descriptions,...

This newsletter was sent to you because you signed up at SQLServerCentral.com. Feel free to forward this to any colleagues that you think might be interested. If you have received this email from a colleague, you can register to receive it here.