36

PRACTICAL SQL SERVER CONSOLIDATION Carl Weibgen Rolf Tesmer Senior Database Administrator National SQL Consulting Lead Bendigo & Adelaide Bank LimitedDimension

Embed Size (px)

Citation preview

(c) 2011 Microsoft. All rights reserved.

PRACTICAL SQL SERVER CONSOLIDATION

Carl Weibgen Rolf TesmerSenior Database Administrator National SQL Consulting LeadBendigo & Adelaide Bank Limited Dimension Data Australia

SESSION CODE: DAT305

(c) 2011 Microsoft. All rights reserved.

AgendaWhat will we cover today?

► Practical Guide to SQL Database Consolidation

– Physical consolidation: A customer experience

► Practical Guide to SQL Virtual Consolidation

– 5 questions a SQL Server DBA needs to consider

► SQL Licensing in Virtualisation Scenarios

– The 2 methods of licencing; guests & hosts

► Questions & Answers

(c) 2011 Microsoft. All rights reserved.

PHYSICAL CONSOLIDATION

Carl WeibgenBendigo Bank

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationPractical Consolidation: Customer Experience

► Bendigo and Adelaide Bank:

Early unit of consolidation

► Reduction of servers by half

► Good and bad but positive overall

► Recommendation when this applies

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationReward: Bundling Units of Work

► Critical consolidation drivers…

1. SQL licensing

2. SQL version upgrade

3. Hardware replacement

4. Server room relocation

► More Drivers = Easier Stakeholder Acceptance

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationRisk: Server Level Settings #1

► Expanded impacts– Space: Multiple extents– Maintenance: OS / SQL patching– Unexpected outage

► Security implications– Best practice– “The line in the sand”

► Testing restrictions– OS level settings: date/time

1 …n

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationRisk: Server Level Settings #2

► SQL Server collations

– ‘Case Insensitive’ database on ‘Case Sensitive’

server

– Variable declaration and usage

– tempdb objects usage (system)

Let’s look at a working example…

► Config: ‘Case Insensitive’ User Database & ‘Case Sensitive’ System Databases

► Issue 1: Declaring Variables…DECLARE @iCSVar INT;SET @iCSVar = 100;SELECT @icsvar;GO

Msg 137, Level 15, State 2, Line 3Must declare the scalar variable "@icsvar".

► Issue 2: Using Data in Tables…CREATE TABLE #TEST (TXTVal VARCHAR(50));INSERT INTO #TEST (TXTVal) VALUES ('Test String');GO

SELECT * FROM #TESTWHERE TXTVal = 'Test string';GO

ERROR!Variable case does not match variable declaration

No error but NO DATA!Value case does not match data

SQL Physical ConsolidationExample: SQL Server Collation

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationReward: Server Level Settings

► Reduced overall administration

– DBA workload is proportional to number of servers and databases

– Agile deployment

► Reduction in fragmentation of free space

► Now more tools to assist in server consolidation

– SQL 2008 Resource Governor

– SQL 2008 Policy Management

► Cost savings can justify contractor

Reward: Dedicated Resources

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationRisk: Analysis

► High Load Systems

– Resource contention has wider impact

– Later separation may be required

► New SQL Tools (again!)

– Resource Governorhttp://msdn.microsoft.com/en-us/library/bb933866.aspx

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationReward: Server Version

► Use latest SQL version possible– Maximises ROI

► Standard Edition versus Enterprise Edition

Reward: Consolidation in DR► Often a good place to start► Reduce spend even further in DR:

– Licensing– Hardware– Administration and support

1

2

3

1

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationReward: User Acceptance

► Acceptance: Least tangible but most

rewarding!

► The 1990’s was 20 years ago!

► Accepted methodology for future

“But I need my own server…”

(c) 2011 Microsoft. All rights reserved.

SQL Physical ConsolidationSo when is it right for me?

If not then consider…

SQL Server Virtual Consolidation

1

• Performance Critical Databases

2

• Administration Reduction for DBAs

3

• Cost Reduction: Servers and Licensing

(c) 2011 Microsoft. All rights reserved.

VIRTUAL CONSOLIDATION

Rolf TesmerDimension Data

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationThe 5 Questions a SQL DBA needs to consider…

1. Why consolidate SQL Server to virtual?

2. Before I jump in, what are the gottcha’s?

3. How do I identify the right mix of SQL Servers?

4. I am ready to consolidate, but how?

5. So now you’re consolidated, what else can I do?

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationWhy consolidate SQL Server to virtual at all?

► So what are the catalysts and decision points?1. Lower costs (less physical servers, space, power,

etc)2. Better, faster, easier platform management3. Simpler approach to SQL licensing

► …the BOTTOM LINE SQL DBA often not privy to lead-up discussions!

SQL Virtual ConsolidationBefore I jump on in, what are the gottcha’s?

► 1000 foot view of a typical SQL virtualisation architecture

(c) 2011 Microsoft. All rights reserved.

Guest VM server running Windows OS.Guest active on 1x Host.

Host physical servers running virtualisation software. 1x Host manages n active Guests.

Host-to-Host interconnect(s)

Shared SAN based Storage & Infrastructure

Host-to-Storage interconnect(s)

Installed SQL instance and components

Host CPU, RAM, IO and Network shared resources

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationSome gottcha’s for The Hosts

1. Ensure Host solution is in Microsoft SVVP

2. Deploy latest virtualisation software

3. Use multiple Hosts for HA / DR and plan for it

4. Beware of over-committing Host resource

5. Shy away from “thin provisioning” for storage

6. Plan SQL licensing; consider Host “By Processor”

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationSome gottcha’s for The Guests

1. Sharing finite Host resource with other guests

2. Guest can be tweaked / throttled by Virtual Admins

3. Virtual software has Guest limits (CPU, RAM, IO, etc)

4. Don’t assume SQL config is supported in Guest

5. Beware the “virtual-emulation overhead”, expect

~5%

6. Licensing Guest vCPU’s with “By Processor” is not 1:1

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationHow do I identify the right mix of SQL Servers?

► Finding SQL Servers in the network…

SQL DBA

Known

MAP 6.0

Consolidation Findings Report

“Good” Servers

“Bad” or “Questionable”

Servers

Quest Discovery Wizard 3.0

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationHow do I identify the right mix of SQL Servers?

What are examples of “Good” and “Bad” servers?“Physical Servers with…” Good Bad

1. outdated or unsupported hardware

2. low spec, low utilisation, non-critical

3. spec > single Host capacity - n%

4. very high IO throughput and / or CPU utilisation

5. spec > virtual software Guest max limits

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationI am ready to consolidate, but how?

► 2x different methods…

1. Manual “hands-on” method– SQL DBA; identify dependencies, plan, build, test, go– Will yield “n:1” physical-to-virtual ratio

2. Physical to Virtual (P2V) method– Virtual Admin; run migration tool– Will Always yield “1:1” physical-to-virtual ratio

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationI am ready to consolidate, but how?

1. Manual “hands-on” method

1. Identify candidate dependencies

2. “n:1” = find, match, verify consolidation candidates

– Technical; SQL, Windows, Applications, Storage, …

– Performance; CPU, RAM, IO, Network, …

3. Spec & build target Guests for consolidated load

4. Test; (a) Guest platform, & (b) migration plan

5. Arrange source outage… and GO Migrate!

+ n%

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationI am ready to consolidate, but how?

2. Physical to Virtual (P2V) method (VMM)

The “Good” The “Bad”Virtual is near exact 1:1 copy of PhysicalPhysical can be online during conversion processThe process can be scripted

…but not quite! Serial #’s, Model #’s, Controllers, etcNot all combinations supported online (DC, Win2K, DMZ, apps)Depending on complexity of Physical, it can take hours

SQL Virtual ConsolidationSo now you’re consolidated, what else can I do?

► Leverage the benefits of Virtual Mobility !

1. What is it? Why is it so good?– Online migration of Guest between Hosts (HA / DR)– Zero downtime as Guest is “moved” across farm– …and it really works for SQL Server!

2. So what’s the catch?– SQL Standard Edition in Guest has licensing restriction;

cannot move Guest more frequently than 90 days– Guests with large memory / high memory load

and/or… Host performance / resource pressureand/or… Slow Host-to-Host interconnects

= SLOW MIGRATION or NO MIGRATION !

Seriously!

(c) 2011 Microsoft. All rights reserved.

SQL Virtual ConsolidationSo when is it right for me?

If not then consider…

SQL Server Database Consolidation

1• Reducing SQL Instance count is

not a critical driver

2• OK to relinquish some SQL

management control to others

3• Prepared to accept a small

performance overhead

LICENSING ISSUES FOR CONSOLIDATION

Ron DunnMicrosoft

(c) 2011 Microsoft. All rights reserved.

Live Migration

Live Migration is not allowed for Standard Edition

(c) 2011 Microsoft. All rights reserved.

True-Up

Licenses removed during consolidation come off next year’s true-up

(c) 2011 Microsoft. All rights reserved.

Enterprise Limits

► Enterprise Edition supports four (4) guests per processor

► You may licence more processors than the server supports (ie, licence six processors on a four processor server, to support up to 24 guests)

► Datacenter Edition supports unlimited guests. (c) 2011 Microsoft. All rights

reserved.

QUESTION & ANSWER SESSION

Contacts for Rolf Tesmer Contacts for Carl Weibgen

[email protected] [email protected] http://au.linkedin.com/in/rolftesmer http://au.linkedin.com/pub/carl-weibgen/17/b82/245

Contacts for Ron [email protected]

(c) 2011 Microsoft. All rights reserved.

Win a Touch Mouse!

Complete your session evaluation on Schedule Builder for your chance to win a Windows 7 Touch Mouse

► Exclusive for Windows 7 ► Eleven multi touch gestures► Contoured shape for superior

comfort

10 prizes drawn every day!*

*Please see Registration for full terms and conditions

Enrol in Microsoft Virtual Academy TodayWhy Enroll, other than it being free?The MVA helps improve your IT skill set and advance your career with a free, easy to access training portal that allows you to learn at your own pace, focusing on Microsoft technologies.

What Do I get for enrolment?► Free training to make you become the Cloud-Hero in my Organization► Help mastering your Training Path and get the recognition► Connect with other IT Pros and discuss The Cloud

Where do I Enrol?

www.microsoftvirtualacademy.com

Then tell us what you think. [email protected]

(c) 2011 Microsoft. All rights reserved.

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this

presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

(c) 2011 Microsoft. All rights reserved.

www.msteched.com/Australia

Sessions On-Demand & Community

http:// technet.microsoft.com/en-au

Resources for IT Professionals

http://msdn.microsoft.com/en-au

Resources for Developers

www.microsoft.com/australia/learning

Microsoft Certification & Training Resources

Resources