Tag Archive: sql2008

My Weekly Bookmarks for September 4th

Here’s my bookmarked links for September 1st through September 4th:

Tech Links

The Junk Drawer

These bookmarks are automatically imported from my bookmarks at Delicious.com. If you’d like to get up-to-the-minute updates on what I’m bookmarking, you can subscribe to my bookmark RSS feed.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

My Weekly Bookmarks for August 28th

Here’s my bookmarked links for August 23rd through August 28th.  I’m using an automatic plugin to build this list, and I can see that this probably isn’t going to work – I just found way too many things interesting in one week, and it doesn’t break stuff out into categories.  Blogger fail.  Here it is anyway as an example of What Not To Do during my Better Blog Week:

These bookmarks are automatically imported from my bookmarks at Delicious.com. If you’d like to get up-to-the-minute updates on what I’m bookmarking, you can subscribe to my bookmark RSS feed.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

Before you upgrade to SQL Server 2008…

This month’s Redmond Mag glows about some new features in SQL 2008, and yes, it does have a lot of cool tricks up its sleeve.  But before you go upgrading your servers to get those new features, there’s one thing you need to know.

New versions of SQL Server are not always faster for every query.

This may come as a surprise to you, but every versions of SQL Server have areas where they require manual tweaking in order to be as fast as the last version.  I worked with Jeff Atwood and the guys at StackOverflow this past weekend to move them onto SQL Server 2008, and we had a nasty surprise.  Jeff summed up the issues with the SQL 2008 upgrade on his blog, but I’ll cover it here from a DBA perspective.

The app and SQL 2005 were on the same box (which tells you a lot about the performance of his code, because that site is doing pretty well) and they got a new box running SQL 2008.  We restored the databases over to the 2008 box for testing, ran queries, and compared performance.

Full text search results were slower, but we didn’t catch just how slow they were because we focused on the queries that were currently running slow on the 2005 box.  Some of the queries we didn’t test had been running great on 2005, but were dead slow on 2008.

Why slower? Different execution plans.

We did catch a second issue: on a particularly slow set of queries, SQL 2008 was building a different execution plan than 2005.  This execution plan worked – but not for the kind of load StackOverflow has.  I narrowed down the differences and I was able to overcome it with trace flag 2301, which lets SQL spend a little more time building a good execution plan. By spending more time compiling the plan initially, and saving that plan in cache, we got phenomenally better results.  Query times went from 190ms on SQL 2005 to 40ms on SQL 2008.  Hubba hubba.  All systems go.

Denny Cherry, a performance tuning guru with a long history at MySpace.com and Awareness Technologies, asked me why I didn’t manually set up query execution plans for them.  If it was my server and I was Jeff’s full-time employee, that’s exactly what I’d do.  Problem is, if you don’t have a full-time DBA to watch the server and identify what the right (and wrong) execution plans are, you introduce an element of mystery.  I can imagine what would happen three months down the road: performance would go to hell in a handbasket as schemas, queries and indexes changed over time.  Jeff wouldn’t know what things were the fault of the engine, versus what things were the fault of the DBA who’d changed these settings a while back.  So I had to pick a solution that wouldn’t require StackOverflow to incur a huge new payroll expense.

Went live with 2008, -T2301 killed us.

We went live with SQL 2008, rebuilt the indexes & stats, turned on the site (now hosting IIS on a separate box, mind you) and immediately the server slowed to a crawl.  I figured it’d take a few minutes to get a good set of execution plans built, but the server just wasn’t recovering.  Doing diagnostics on the server, I discovered that queries using sp_executesql were just knocking the server over.  Ahhh-ha!  Those were dynamic SQL strings, and those would probably get new execution plans built every time.  The trace flag -T2301 failed us there, so we had to rip it back out.

How much would you pay to avoid a scenario like this?  $19.95?  $29.95?  But wait, there’s more!

After ripping out the trace flag, the server stabilized around 20-30% CPU, but those numbers were too high for a weekend night.  When they came up to full load during the week, the server fell over, averaging 100% CPU for a few minutes at a time.  The problem query was doing a union between three full text searches, but before you scream bloody murder about a union, even running the three searches independently was taking 60-70% of the time they took when unioned together.  We were screwed.  The guys had to make a change to their application and cache data on the web server’s hard drive in order to sustain their normal load.

Ugh.  As a DBA, that’s a failure when the app guys tell me that.  This is an application that used to live fine on a single box, and now, even with SQL 2008 on its own hardware, the app guys have to work around a weakness in SQL 2008.  Ouch.  I take that pretty personally.

The lesson: capture a full trace before you upgrade SQL Server.

The lesson: before you upgrade, capture a full trace of your server’s load and replay it against the new version.  Analyze before and after duration times and CPU numbers for both versions, and identify the list of queries that run slower.  Examine how often they actually run in production, and think about how that’s going to affect your load.  This was my own failure – after working with the guys at StackOverflow and seeing how tight their queries were, it seemed like the slowest queries on SQL 2005 were still in pretty good shape.  Unfortunately, hidden below the surface in queries that were running in 50-75ms on SQL 2005, were some queries that ballooned to over 1 second on SQL 2008, and went much higher under load.

Furthermore, a simple trace replay still won’t give you the full picture because traces don’t throw the same amount of load at the replay server in the same time.  In a web server scenario, you may have a hundred queries come in simultaneously, and you want to see exactly how the new server will be affected by that – but replaying a trace with the Microsoft native tools won’t give you that answer.  For that, you need a benchmarking tool like Quest Benchmark Factory or HP Mercury LoadRunner, etc – something that can capture a load and then replay it with the same velocity and bandwidth.

Do I like SQL Server 2008?  Yeah.  But do I wish we could have avoided what happened this week with StackOverflow?  Hell yeah.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

SQL Server 2008 Management Studio: Group Execute

I’m going to show how to use a new feature in SQL Server 2008 Management Studio: the ability to query groups of servers simultaneously.

In Registered Servers, right-click on a group of servers and click New Query. What comes up will look like a normal query window, but pay close attention to the very bottom of the screen after we run a query:

SQL Server 2008 Management Studio Group Execute

“Group L” shows the name of my registered server group. I keep my lab servers in Group L for Lab.

“LAB\Administrator” is the login that was used for authentication. (Okay, you caught me, I’m logging in as the domain admin. Thank goodness this isn’t a blog post about security.)

“Master” is the database, of course, and it would make sense to use Master because it’s one of the few databases we know exist on every server.

“6 rows” is obviously the number of rows the query returned, but let’s take a look at the query and the number of rows:

SSMS 2008 Querying Multiple Servers At Once

I ran a “SELECT GETDATE()” against this group of servers, and SQL Server Management Studio did the hard work for me: it connected to every SQL Server in the group, ran that query, and then combined the results back into a single results grid. It automatically added a “Server Name” column at the beginning of my results to identify which server (and which instance) the results came from. If we ran a query that returned multiple rows per server, that would work fine too.

This query would be useful if we wanted to check the dates on all of our servers, but let’s be honest – that’s not a big problem for us database administrators. We’re geniuses.

Taking a SQL Server Inventory with SSMS 2008

Let’s go tackle a harder problem, like taking an inventory:

Getting Multiple SQL Server Versions

Run SP_Configure on Multiple Servers

In the above example, I’ve grabbed the SQL Server version for each of my instances. Now we’re starting to get somewhere, but what we really want is the kind of detailed information we can get from sp_configure, so let’s see how that looks:

Now we’re cookin’ with gas – but wait. Look at that first column. We’re getting lots of data back, multiple rows for each server, and it’s hard to compare this data back and forth. For example, maybe I want to see whether “allow updates” is turned on for all of my servers – so I should probably sort by “name”, right?

Can’t Really Order By with SSMS 2008 Group Execute

Uh oh – turns out that doesn’t work. Remember, SQL Server Management Studio simply runs this same query on every single instance, then dumps the data into the SSMS results window. It doesn’t process the query results together. You can’t “join” between tables on different servers – well, you can, but you have to set up linked servers, and that doesn’t really have anything to do with the Group Execute functionality.

Another thing you’ll want to do is take this data and insert it into a table. Again, no dice there – if you try to insert this into a temp table like this:

SELECT @@SERVERNAME INTO #MyServerList

SSMS will execute that query on every single server, so every server will end up with its own temporary table with one record in it. Not exactly what you wanted.

Next up on our feature list: the ability to schedule these multi-server queries and take action on the results. I might want to run a query every night checking for failed jobs or sp_configure changes. Again, not going to happen – this can’t be automated with a SQL Server Agent job. This functionality only lives in SQL Server Management Studio.

Be Aware of Case Sensitive Collations

One more thing you want to be aware of: if any of your servers are case-sensitive, then you need to write all of your group execute queries in the proper case. I recommend that if you’ve got any case-sensitive instances, then use a case-sensitive instance as your personal testbed server like on your workstation. That way, as you’re writing new utility queries, you’ll know for sure that they’ll succeed on your case-sensitive instances. It’s a real pain to bang out a hundred-line utility query only to find out you’ve got case errors all over the place when you try to execute it.

It might sound like I’m down on this feature, but I’m not: it’s really useful. I love using it to quickly find out a piece of information across lots of servers, like find out if there’s any locking or deadlocks going on. It’s also really useful if you’ve implemented a Central Management Server as a centralized list of your instances. But it’s not a solution for automated reporting or proactive reporting.

Worry not – SQL Server 2008 has a different new feature specifically aimed at automated, proactive management: Policy-Based Management.  More on that later.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

Upcoming presentation on SQL 2008 with Kevin Kline

On October 22-23rd, you can attend Quest Connect, a free series of technology webcasts given by the subject matter experts at Quest.  Kevin Kline and I will be talking about our top ten favorite features of SQL Server 2008 – things like compression, policy-based management and the resource governor. We’ll be discussing these from a high level, talking about when you want to implement these features and how they’ll pay off.  We won’t be covering technical implementation details, but rather helping you figure out which features you want to learn and get trained on.

Kevin & I recorded our presentation ahead of time, and it’ll start at 9am Central time.  If you can’t make it, don’t worry, we’ll come to your office and give it to you personally.  And by “personally” I mean “recorded months in advance and delivered via MP4 or WMV.”

Another SQL-focused webcast will be given by Jason Hall and Denny Cherry, who will be looking under the hood in 2008 to diagnose performance problems.

We’ve got a lot of other smart people lined up to talk about virtualization, Sharepoint, System Center, and more.  I’ve been consistently amazed by the deep resources inside Quest covering all kinds of technology – these guys know their stuff.  (Except me – I’m amateur hour.)

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

SQL Server 2008 upgrade poll results & thoughts

Last week I posted a poll asking DBAs when they would use SQL Server 2008 in production.  Here’s the results after one week:

  • In the next 3-6 months. (40%, 8 Votes)
  • Not planning it yet. (30%, 6 Votes)
  • In the next month or two. (20%, 4 Votes)
  • Already done. (10%, 2 Votes)

This week, I had the pleasure of going to a few meetings at Microsoft.  Roger Doherty gave us a presentation talking about why database administrators need to upgrade to SQL Server 2008.  He’s a member of the Developer & Platform Evangelists team, and he’s rightfully excited about all the cool stuff inside SQL 2008.

I played devil’s advocate – and when I say devil, I mean database administrator.

One of the slides was this spiffy graph that showed different approaches to upgrades: when you should do an upgrade-in-place, when you should use the Upgrade Advisor, and so on:

Upgrade Testing Options

Upgrade Testing Options

Apps that are simple and have a low strategic importance can just be upgraded in place, whereas on the opposite end of the spectrum, apps that are very complex and have a high strategic importance should have careful planning with code changes to take advantage of the new features.

Okay, I get it, that makes sense.

So how do we as DBAs gather the information to populate this chart?  How do we analyze all of the applications (not just servers, but the individual databases) to determine whether they’re simple or complex, and whether they have a high or low strategic importance?  Roger discussed some of the options in determining app complexity, and basically, we don’t have a good option right now.  The closest thing we have to an automated solution is simply gathering a trace of all queries that hit the database over the course of say, a week, and looking at the queries to see whether they’re using SQL Server’s advanced or deprecated features.  We can pass the profiler data to the Upgrade Advisor, but it won’t give us a measure of how complex the app is – it will only tell us whether the SQL Server upgrade will pass or fail.

During the presentation, I sent out a Twitter message asking my readers how many instances they support per DBA.  The answers I got back ranged around 20-70.  Whaddya know – that’s kinda like the number of instances shown on that slide.

So here’s my problem: that’s a beautiful line graph.  Makes perfect sense.  But now let’s look at how much time it will take to actually upgrade all 20-70 instances that a DBA has to manage:

  • Gather a good inventory of servers & databases
  • Find out from the app owner whether SQL 2008 is supported (either internally or by the vendor)
  • Gather the information to populate the line chart
  • Take the actions suggested by the line chart (Upgrade Advisor, plan code changes, etc)
  • Arrange for an outage window with the application owners
  • Perform the SQL 2008 upgrade
  • Test the application post-upgrade

Holy moly.  If each of those took an average of four hours (and I know I’m seriously underestimating that) we’re still talking about 3 days per app.  Say your instances host just one app apiece (a truly laughable concept in the days of consolidation) and we’re talking about 60-210 business days to upgrade 20-70 instances!

Starts to make sense why Microsoft needs guys like Roger – you really do have to bang the drum to get users excited about doing that much work to upgrade.  It’s a tough battle.  I know when I was a DBA a few months ago, I was excited about 2008, but I knew there were few apps I could upgrade right away.  For the rest, the vast majority, I planned to wait until the application owners wanted to drive the upgrade process – so that way they could hassle with the meetings!

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

Spend a Day with the Experts – Oct 14 – Redmond, WA

So you’ve been dying to meet me, but your job at Microsoft won’t allow you to leave the Redmond area?  Or maybe you’re tired of hearing all those bright people at Microsoft speak, and you want to hear a rank amateur fill your head with gobbledygook? Or maybe you just want free breakfast and lunch?

Well, it’s your lucky day – not today, but on October 14th, when Ron Talmage, Trent Mera and l will be speaking in Redmond.  You can register at that link to hear me ramble on about:

  • Got Performance Headaches?  Detect, Diagnose & Resolve – It can often take years of on-the-job experience as a DBA to learn how to understand when a problem is occurring, diagnose its root-cause, and then resolve it using manual techniques. This presentation will focus on techniques and tools for detecting, diagnosing and resolving performance issues in SQL Server.
  • SAN Tips for First-Time Users – This session will cover some of the risks and rewards, as well as tips and tricks that the sales folks don’t cover.  We’ll talk about how to get the most out of your SAN from the beginning with a good initial design.

Sound like fun?  Well, there’s always free food.  Sign up today, because seating is limited.

Update 9/17 3:30PM Central – changed my topics, plus fixed a typo found by eagle eye Arthur Langham.  Me talk pretty one day.  Hopefully he won’t be in attendance in Redmond, where my verbal skillz will make my writing look like awesome poetry.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

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.

A SQL Server CMS is just a central repository that holds a list of managed servers. Sounds simple – and it is – but it comes in handy, and it’s practically a requirement for a good policy-based management deployment.

In a shop with two DBAs, they both have their own desktops (plus maybe laptops) and each machine has its own list of registered servers.  With a CMS, the list of registered servers is stored on the central SQL Server.  When the DBA opens SQL Server Management Studio, they point at the CMS, and SSMS grabs the list of registered servers from there.

How to Set Up a Central Management Server

To configure it, open SSMS 2008 and go into the Registered Servers window.  Right-click on Central Management Servers and you get options to set one up.  From there, it’s basically the same as your local registered server list – only it’s centralized:

Registered Servers window showing a CMS

Registered Servers window showing a CMS

In that above screenshot, I connected to a CMS on P-SQL20081\CMS, and that instance stores the list of SQL Servers.  The list is initially empty – it doesn’t automatically detect all of the database servers in your enterprise – you just add servers and groups manually.

After you set it up from any workstation, then on any OTHER workstation, you can point SQL Server Management Studio at that CMS, and the list of servers is always in sync.  Think of it as a server list repository.

CMS Drawback: Windows Authentication Only, And Only Your Login

The CMS server list is just a list of server names: nothing more, nothing less.  Authentication is not saved at all.  When you connect to any server in the CMS list, your Windows authentication is used.  You can’t save an override list of logins, like an SA login for a specific server in the DMZ.

DBAs in large shops administer databases all over the world, in lots of domains that don’t trust each other, and in DMZs, and the Central Management Server is useless here.  We can set up multiple CMS’s, one in each domain, but that’s not exactly ideal.

I hate this limitation.  It means the CMS is nothing more than a centralized text file list of servers.  But it’s what we’ve got, so let’s get over it.  Either you can use a CMS, or you can’t.  Those of you who can, keep reading.

Next Drawback: Group Management Won’t Apply to the CMS

When you pick your Central Management Server, it needs to be a server that you won’t need to run multi-server queries against.  In the screenshot below, my CMS is the server P-SQL20081, and I’m trying to register P-SQL20081 as one of the registered servers:

Cannot Register the CMS Server In Itself

Cannot Register the CMS Server In Itself

To understand why this is an issue, you have to understand what CMS registered server groups are useful for: multi-server queries and policy-based management.  Say I have groups for Development, Lab, QA and Production.  When I want to run a multi-server query against all of my development boxes, or I want to evaluate a policy against all of them, I right-click on the Group D registration and click New Query or Evaluation Policies:

Taking an Action on a Registered Group

Taking an Action on a Registered Group

The problem is that if I can’t register the server P-SQL20081 inside Group D, then I can’t include it in group queries or policy-based management for that group.

Furthermore, if I right-click on P-SQL20081 and click New Query, I do get a group-execute query – but it does not include the CMS.  The query only executes against all of the registered servers, and since you can’t include the CMS as a registered server in its own server lists, it’s effectively outside of all management groups.  Therefore, when choosing a CMS, choose carefully – it needs to be a somewhat highly available server, since all of your DBAs will be relying on it for a server list, but at the same time, it can’t really be managed the same way, so it’s almost a throwaway.

My solution was to add a separate instance on a development box just to be my CMS – MyDevServerName\CMS.  That way, the box was reliable, but the instance doesn’t store any databases.

More About SQL Server’s Central Management Server

Here’s some more articles that take advantage of the CMS:

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

SQL Server 2008 Sucks

SQL Server 2008 is coming fast, and there’s going to be a bunch of web posts and magazine articles telling you how great it is.  I’m going to play devil’s advocate for a minute and tell you why SQL 2008 sucks.

The good stuff isn’t backwards compatible.

We can’t immediately upgrade every server in the shop.  Not only does it take months to plan those types of projects, but we also have to make sure that every app that connects to the database will officially support SQL 2008.  I’ve met with many production DBAs recently who’ve said more than half of their servers are still running SQL 2000!

Take the easiest-to-use new feature: IntelliSense.  Let’s all raise a glass to IntelliSense, a big time saver.  Now let’s pour the contents of that glass on the people who decided that IntelliSense should only work when we’re querying SQL 2008.  Come on, guys, we’ve been able to do this in Toad and other third-party products for years.  Why does Excel feel like a better programming tool than SQL Server Management Studio?

Or take one of the harder new features to use: policy-based management. I got excited, started building T-SQL policies for my servers, and then realized I couldn’t apply them to my SQL 2000/2005 boxes without writing SMO code.  Wait – what?  I’m a DBA, not a C# developer.  That means I’ll need to use both methods to manage my SQL boxes: whatever I’m using now, plus 2008′s management policies.  I hate redundancy.

Another example: the Management Data Warehouse, which collects performance and query data on the server to give you a health picture.  Sounds great – until you realize that you’ll have one solution for your SQL 2008 boxes, and another solution for the rest.  Ugh.

The good stuff is only in Enterprise Edition.

Some of my favorite new features are only available in the Enterprise Edition, not Standard:

  • Data compression
  • Backup compression
  • Resource governor
  • Change data capture

I can see how some of these features are really positioning SQL Server against Oracle, integrating features that Oracle’s had for a while.  And if we’re going up against Oracle, then sure, we’re talking about customers with money.  But wouldn’t we all love data compression, a feature that gives dramatic I/O performance improvements without changing our code?  It’s only available in Enterprise, and I’m not convinced that the cost difference justifies those features.

There’s no easy GUI for the good stuff.

Even if you fork out the big bucks for Enterprise, that doesn’t mean you can use those features right away.  Take SQL 2005′s partitioning feature – when that came out, I was so excited!  It solved a big business need for me.  However, when I had to debug and troubleshoot my first partitioning schemes and functions, I was, uh, less than excited.  No GUI help whatsoever – just manual coding scripts.  Can we get just a little GUI help to get started?  No can do.  Powerful feature, but no help from the GUI.

Now, in 2008, Microsoft took that same approach with many more new features:

Want to use Transparent Data Encryption? Don’t expect to check a box and put in a password, oh no.  Light the fire, pour yourself a drink, and snuggle up with Technet to learn about certificates.  Oh, and don’t forget to pay particular attention to the part about backing up your certificates – otherwise, if your server crashes, you won’t be able to restore your backups.  And no, the cert isn’t included with the database backup.

Want to enable data compression? You’d expect to just right-click on the database and turn on compression.  No can do – compression is done at the table & index level.  There’s a wizard to go compress existing tables & indexes, but that doesn’t save the DBA when people constantly create new tables and indexes.  Those folks won’t know to use compression, and it’s a hassle to manage at the table/index level.

Want to use policy-based management with SQL 2000 or 2005? Like my grandma used to say, it don’t hurt to want.  Let go of the mouse – you’ll be writing SMO code for that one.

And no, there’s still no partitioning GUI in SSMS 2008, which leads me to believe these new 2008 features won’t have good GUI support in SSMS 2011, either.

Forget it – I’m switching to MySQL!

Okay, reality check: I’ve got gripes with SQL Server 2008, but they’re pretty small, especially relative to the other platforms out there.  It’s like saying my Ferrari Superamerica* doesn’t have enough seats for my drinking buddies, so I’ll be switching to a minivan.  Some compromises are worth making.

*Disclaimer – I don’t have a Ferrari Superamerica.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

SQL Server Consolidation: Plan for SQL Server 2008

When you’re building a consolidation plan, stop to think about when each database will be migrated to a newer version of SQL Server.

With SQL Server 2008 coming fast, some content owners will want to move their databases to 2008 as soon as it comes out in order to take advantage of things like the resource governor. But if you’ve consolidated multiple database servers onto one, and just one of those databases can’t be moved to 2008, then everybody has to wait!

This is especially important when dealing with third party solutions, applications written by other companies who may not have an aggressive development policy on supporting new versions of Microsoft SQL Server. Even now, in calendar year 2008, I deal with apps that still don’t support SQL Server 2005.

In any consolidation plan, try to include a “Next Step” section that addresses how quickly (or slowly) the newly consolidated databases will be moved to the next version of SQL Server.

Taken in the opposite direction, this can even be a selling point for SQL Server 2000 consolidation projects. Imagine this conversation with an application owner:

The DBA: “Bob, I’m going to consolidate your databases next month.”

Bob the Lazy Application Owner: “No.”

The DBA: “Actually, yes, I am. We’re taking all of the apps that still aren’t certified for SQL 2005, and we’re moving them to a single server. Your server’s an ancient single-core box that gives me nothing but heartache, and I’m tired of managing several of these boat anchors. I’m going to consolidate them all onto a new multi-core server that can handle all of our SQL 2000 instances, and I’ll have less management to do.”

Bob: “Will it save me time?”

The DBA: “It won’t let you play more golf during business hours, if that’s what you’re asking.”

Bob: “Then we’re not doing it.”

The DBA: “That’s a shame, seeing as your manager already signed the consolidation project charter.”

Bob: “What?!?”

The DBA: “Yep. I showed her that the total hardware maintenance on these five old 2000 servers is over $20,000 per year, especially now that they’re long discontinued. Plus this will free up four sets of SQL Server Licensing, so the consolidation project will actually pay for itself on day one.”

Bob: “Why wasn’t I told about this?”

The DBA: “Because you didn’t attend the meeting. I sent you an invite, but your secretary called me the day of the meeting and said you had an offsite meeting. I think it was the week of the PGA Tour event here in town, come to think of it.”

Bob: “Oh. Consolidation it is, then.”

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts