SQL Server – People Forgetting to Add Indexes to Foreign Keys

I had an interesting conversation with a colleague today who insisted that when you create a foreign key in Microsoft SQL Server, it automatically adds an index on the foreign key.  Guess what — it doesn’t!!  I think this is one of the most common mistakes made in SQL Server.  I’ve seen wonderfully normalized databases where the developer did not create any indexes on the foreign keys.  With today’s fast hardware speeds, this problem is often masked because when you’re working with a new database, everything usually runs smoothly anyway.  It is after time that the problem manifests itself, as More >

Manually restoring the Windows XP registry

Let me start by saying I hate things like this, but sometimes you just need to do it… I had a client with a laptop that was stuck in an endless reboot loop. Safe mode, command prompt, etc. all led to a quick blue screen (“something about the registry”) and a reboot. For anyone who’s been there, this means registry corruption.

Unfortunately, I didn’t have my copy of ERD Commander with me, so I couldn’t use that to come to the rescue.

Fortunately, I found a great online resource that walks you through, step by step:

  1. Boot into the recovery console using the More >

IntelliSense in SQL Server 2008 Management Studio – Only if you’ve upgraded your database server

Well, I finally got SQL Server 2008 installed today. I had downloaded the DVD last week when it RTM’ed, uninstalled SQL 2005, and fully planned to install 2008 on the release date, but alas had to wait because SQL Server 2008’s installation complains if you have Visual Studio 2008 installed WITHOUT SP1 installed. VS2008 SP1 was released yesterday, so today I was go for launch for VS2008 SP1 and SQL2008 installation.

So the biggest thing I was looking forward to in SQL 2008 was IntelliSense. In the past, I’ve thought about buying Red Gate’s SQL Prompt tool just for the IntelliSense feature, More >

Trouble upsizing Access database to SQL Server at shared hosting provider

For the past two weeks, one of my clients has been having trouble upsizing his Microsoft Access 2003 database (MDB) into a SQL Server database at his shared hosting provider. The problem was that the tables would be created fine, but then the upsizing would fail when Access attempted to insert the data.

I attempted the same procedure on my machine, to the same database, using Access 2007 and did not have any trouble. The table and data were upsized properly.

So my initial thought was something wrong with my client’s specific installation of Access 2003. However, he installed Access 2003 on More >

Trouble accessing Public Folders in the Exchange System Manager on Small Business Server

I ran across a problem this morning getting into the Public Folders node in Exchange System Manager on a Small Business Server 2003 machine. Everytime I would try to access this node I would receive the message:

80090308 "The token supplied to the function is not valid"

A bit frustrating. The MSKB suggested turning off the SSL requirement for the Exadmin virtual directory in IIS, but that alone did not solve the issue. I ended up finding a blog post that gave instructions for changing a value in ADSIEdit, which did the trick!

How to reset Offline Files in Windows Vista

The Offline Files feature in Windows Vista is fantastic! It truly solves the problems that Offline Files had in Windows XP. I have run across one problem though. Twice now, I’ve had to move all of my files to another server, necessitating clearing out my old offline files and enabling them at the new location. This tends to be an issue when you’re toting 25GB of Offline Files. So what I’ve found is that it’s easier to just completely reset Offline Files and have Windows Vista build it up from scratch. I’ve had a lot of trouble finding this procedure, More >

Windows Essential Business Server

Windows codename "Centro" now has a name — Windows Essential Business Server. If you haven’t heard of "Centro", it’s Microsoft’s upcoming server solution for "mid-sized businesses."

More info is at this blog post:

The surprising part is that this is not just one server running a bunch of software, it is "an integrated server infrastructure solution."

Windows EBS Standard consist of three servers:

  • Management Server (Windows Server 2008 with Active Directory Services and Systems Center Essentials)
  • Messaging Server (Active Directory Services, Exchange Server 2007, and Forefront Security for Exchange)
  • Security Server (Exchange Server 2007 and ISA Server vNext).

Windows EBS Premium adds a Database server running More >

Scheduling backups, reindexing, and CheckDB in SQL Server Express 2005

One of the things that I really missed with the move from SQL Server 2000 Desktop Edition to SQL Server Express 2005 was the removal of the SQL Server Agent and the Database Maintenance Plans.

I’ve gotten over the removal of SQL Server Agent by simply using Scheduled Tasks. You can simply save what your TSQL script into a file, then create a Scheduled Task in Windows in teh format:

"C:\Program Files\Microsoft SQL Server\90\Tools\Bin\SQLCMD.EXE" -S .\SQLEXPRESS -i"C:\myscript.sql"

What I really missed, though, was the Database Maintenance Plans. Recently, I found the answer — a great project created by Jasper Smith ( called ExpressMaint. The More >

Double clicking on a VHD to mount it

I found a really handy blog entry today with a short registry modification you can make so you can double-click on a VHD file to mount it as a drive on your system.

This is really great news for data recovery. I’m currently researching the potential synergy between Microsoft Virtual Server and the image-based backup functionality in Windows Vista, which apparently saves files in the same format as Virtual PC uses (VHD). It would be so neat to be able to spin up a virtual machine from a Windows Vista backup in a pinch, but it seems there are some complications. More >

Using a USB KVM switch and the mouse and keyboard stop working

I ran into a bit of a problem with my new Keyboard Video Monitor (KVM) switch this week, with an interesting solution. First, a bit of background. When I’m not working in my office in downtown Worcester or at a client site, I work from my home office. I like to vary where I work throughout the week, as I feel it stimulates new ideas and keeps my mind fresh. In my office at home, I have a desktop computer with a nice LCD monitor. My work computer, however, is a laptop. So I had the thought last week of More >