Category: SQL Server

The Chicago-Mac Sailboat Race

Since 1898, sailors have gathered at the Chicago Yacht Club each summer to race their sailboats up Lake Michigan to the Mackinac (pronounced mackinaw) Island.  The 333 mile course from Navy Pier to the lighthouse makes it the longest annual freshwater sailing race in the world.

The sailboats race around the clock for days as the crew work in shifts, sailing for a few hours and then sleeping for a few. Night sailing, storms, and quiet windless calms make this a memorable experience.

Read more about The Chicago-Mac Sailboat Race 4 comments — Join the discussion

How to Import the StackOverflow XML into SQL Server

UPDATE 2013: This code is no longer available. The size of the StackOverflow export has grown beyond what you can import with this method.

Want to play around with the StackOverflow database export?  Here's how to import the XML files into SQL Server, and some notes about the tables and data schema.
Script to Import StackOverflow XML to SQL Server
This T-SQL script will create six stored procedures:

Read more about How to Import the StackOverflow XML into SQL Server 16 comments — Join the discussion

Index Fragmentation Findings: Part 2, Size Matters

Last week, I blogged about the basics of SQL Server index fragmentation: why it happens, how to fix it, and how often people are fixing it.  I left you with a cliffhanger: it seemed that the frequency of defrag jobs didn't appear to affect fragmentation levels:

Databases with no index defragmentation were an average of 5% fragmented
Monthly - 17% fragmented
Weekly - 3% fragmented
Daily - 6% fragmented

Read more about Index Fragmentation Findings: Part 2, Size Matters 11 comments — Join the discussion

SQL Server 2008’s new Central Management Server

Got more than one DBA?  Want to make your life easier?  You might want to configure a Central Management Server.

This is useful for fast-changing shops where there's a lot of servers added and removed.  At my last company, we had a hard enough time telling everybody when we'd finished adding a new server, or what the new server's name was, or when we didn't need to look at a server anymore.

Read more about SQL Server 2008’s new Central Management Server 62 comments — Join the discussion

Recommended Books for SQL Server DBAs and Developers

Here's my favorite SQL Server books for 2016-2014:

T-SQL Fundamentals - (updated for SQL 2016) - don't be fooled by this "fundamentals" title, because everybody who writes T-SQL queries needs this book. It's the manual we should have been given when we started, and everyone's going to learn something about concurrency, performance, and updates here.

Read more about Recommended Books for SQL Server DBAs and Developers 93 comments — Join the discussion

SQL Server 2005 Setup Checklist Part 2: After The Install

I've covered what needs to happen before you install SQL Server - now, let's talk about what to do immediately after the setup finishes.
Install not just the service packs, but also the cumulative updates.
Starting with SQL Server 2005's Service Pack 2, Microsoft releases hotfixes in cumulative packs. These updates do more than just fix bugs: they improve how SQL Server performs. These updates are free performance benefits - and who doesn't like that?

Read more about SQL Server 2005 Setup Checklist Part 2: After The Install 98 comments — Join the discussion
T-SQL & Development

What’s the Largest Database You’ve Worked With?

When hiring a production DBA, I start by asking them, "In terms of file size, what's the largest database you've worked with?" In a perfect world, we'd only hire very experienced candidates, people who've worked with larger databases than we're dealing with. In reality, though, we can't always afford those candidates - if they're even…

Read more about What’s the Largest Database You’ve Worked With? 12 comments — Join the discussion