Documente Academic
Documente Profesional
Documente Cultură
2
Contents
Onboarding SQL Server Environments 4
Conducting a SQL Server Inventory with the MAP Toolkit 4
Collecting Performance Data with the MAP Tool 6
Analyzing Performance Data and Determining the SQL Server
Onboarding Scope 7
SQL Server Consolidation Planning 8
Support Policy for SQL Server in Virtualized Environments 8
Storage Considerations 10
Networking Considerations 12
Determining High Availability, Security and Disaster Recovery
Requirements 13
High Availability with Failover Clustering 13
High Availability with Guest Clustering Using iSCSI 14
Combining High Availability Alternatives 15
Security and Isolation Strategies 15
Disaster Recovery 16
Determining SQL Server Versions and Editions 17
Defining Private Cloud Onboarding Strategy 17
Physical-to-Virtual Conversions 18
New Virtualized SQL Server Instance 19
Monitoring 19
Performance Health Metrics on SQL Server Guest Machines 19
Performance Health Metrics on the Physical Host 20
Additional Resources 21
3
the delivery model defined in the flowchart below, where steps 1 to 5 are
specific to SQL Server environments and steps 6 to 8 are Private Cloud
related tasks:
Start
Step 1: Step 3:
Step 2:
Conduct SQL Server Determine High
Determine the SQL
Inventory and Availability, Security
Server Onboarding
Performance and Disaster Recovery
Scope
Collection Requirements
Step 6:
Step 4: Step 5:
Check Private Cloud
Determine SQL Server Define Private Could
Infrastructure
Versions and Editions Onboarding Strategy
Resources
Step 7:
Provision Virtual Step 8:
Machines for SQL Execute Onboarding End
Server Environment Strategy
The use of the Microsoft Assessment and Planning (MAP) Toolkit, a free
Solution Accelerator, provides a powerful foundation for conducting
inventories, assessments, and includes reports which can expedite the SQL
4
Server onboarding process. The MAP tool securely runs within your
network infrastructure without requiring the installation of agent software
on any SQL Server computer. Once the inventory is completed, the MAP
toolkit generates a series of reports and graphs summarizing the results of
the assessment. The MAP Solution Accelerator Toolkit can be downloaded
from Microsoft's TechNet website:
http://www.microsoft.com/downloads/details.aspx?FamilyID=67240b76-
3148-4e49-943d-4d9ea7f77730&displaylang=en
MAP 5.0 supports SQL Server 2008 R2, 2008, 2005 and 2000 with the SQL
Server Consolidation Report feature.
The database inventory engine in MAP 5.0 discovers SQL Server instances in
the network. It gathers and pulls database information together and
presents a SQL consolidation report of your current SQL Server
environment.
After selecting the SQL Server scenario, you can specify SQL Server names
manually or rely on the automatic discovery mechanism of MAP to discover
existing SQL Server instances. With the SQL Server instances discovered, the
MAP SQL Collector then collects SQL Server database information. The SQL
Server database information is collected through two mechanisms:
1. Establishing database connection via the SQL Server ADO.NET
provider
2. Through the SQL Windows® Management Instrumentation (WMI)
provider. To establish a database connection, you can specify SQL
or/and Windows authentication. The same Windows authentication
can be applied for retrieving data from the SQL WMI provider or a
different authentication can be provided separately.
5
Collecting Performance Data with the MAP Tool
For the purposes of this analysis, use the following reports to help identify
the opportunities for onboarding SQL Server workloads into a Private Cloud:
SQL Server Consolidation Report
Performance Metrics Analysis
Server Virtualization Recommendations
To begin the assessment, from the actions pane of the application, click
Select a Database. This will prompt for the name of a new database
repository where the analysis results will be kept. Next, create a text file
that contains the machine names that will be a part of the analysis. The file
should be a plain text file with each machine on a separate line. When
completed, select Capture performance metrics from the Actions pane. The
wizard will prompt the user to open a file that contains the listing of
machine names, created in the previous step. Open the file, and continue
with the dialog prompts. It is recommended that duration of the analysis be
for at least 24 hours to capture a representative sample of the workload
being performed on the targeted machine. It is important to take into
consideration when the analysis is performed as workloads may be
significantly different during certain times of the week, month or year
based on business requirements.
To generate the reports and proposals, based upon the data that has been
collected, from the Actions pane, select Prepare new reports and proposals.
In the wizard, verify the following reports and proposals are checked:
SQL Server Consolidation Report
Performance Metrics Report
Server Consolidation and Virtualization Recommendation Report
6
Depending on the number of servers analyzed, the generation of the
reports may take several minutes to complete. When finished, the reports
will be located in %userprofile%\documents\map\Repository where
Repository is the name of the database specified when the analysis was
started.
7
helpful as hardware may change and it is always best to detail the
assumptions used at the time of analysis. The next section of the proposal
details each proposed virtualization candidate and aggregates each of the
performance characteristics. This shows how each virtual guest will
consume the resources of the VM host.
Microsoft provides technical support for SQL Server 2005, SQL Server 2008,
and SQL Server 2008 R2 (this includes all components that that are included
with SQL Server 2005, SQL Server 2008, and SQL Server 2008 R2) for the
following supported hardware virtualization environments:
Windows Server 2008 and Windows Server 2008 R2 with Hyper-V
Microsoft Hyper-V Server 2008 and Hyper-V Server 2008 R2
8
The following restrictions and constraints may affect the support policy of
the above supported configurations:
Guest Failover Clustering is supported for SQL Server 2005, SQL
Server 2008, and SQL Server 2008 R2 in virtual machines when the
shared storage is provided by an iSCSI interface and provided all of
the following requirements are met:
o The Operating System running in the virtual machine (the
“Guest Operating System”) is Windows Server 2008 or
higher
o The virtualization environment meets the requirements of
Windows 2008 Failover Clustering, as documented in this
Microsoft Knowledge Base article:
http://support.microsoft.com/kb/943984 (The Microsoft
Support Policy for Windows Server 2008 Failover Clusters)
The SQL Server product must be a supported version under its
current Microsoft Support Lifecycle policy according to
http://support.microsoft.com/?pr=lifecycle
Virtualization Snapshots for Hyper-V are not supported to use with
SQL Server in a virtual machine. It is possible that you may not
encounter any problems when using snapshots and SQL Server, but
Microsoft will not provide technical support to SQL Server
customers for a virtual machine that was restored from a snapshot.
Live Migration is supported for SQL Server 2005, SQL Server 2008,
and SQL Server 2008 R2 when using Windows Server 2008 R2 with
Hyper-V or Hyper-V Server 2008 R2
When planning the Private Cloud onboarding strategy for SQL Server
workloads, it is beneficial to understand the maximum configurations with
Windows Server 2008 R2 Hyper-V.
Each virtual machine, also known as a guest operating system, can support
up to 4 virtual processors and 64 GB of memory.
The physical servers running Hyper-V in Windows Server 2008 R2 can have
the following maximums: 64 logical processors, 8 virtual processors per
logical processor, 512 virtual processors per server, 384 operating virtual
machines on a server, and up to 1 TB of memory. Therefore, when placing
multiple SQL Server virtual machines within a single Hyper-V host, you must
verify the total SQL Server workload fits within these boundaries.
9
Storage Considerations
Storage is a critical component to the SQL Server architecture. Database
servers could be heavily I/O bound because of database read and write
activity and transaction log processing. Additional SQL Server services can
also impact host I/O and CPU utilization.
The Hyper-V supported storage devices are Direct Attached Storage (DAS),
Fibre-Channel Storage Area Network (SAN) and iSCSI SAN.
A maximum of 4 Virtual IDE disks are supported on each machine. The boot
disk, commonly referred to as the startup disk must be attached to an IDE
device and a virtual machine. Either a virtual hard disk or a physical hard
disk can be used. A maximum of 256 SCSI disks are supported on each
virtual machine. This is possible because each virtual machine can support a
maximum of 4 virtual SCSI controllers and each controller can support a
total of 64 disks. Each Virtual hard disk can support up to 2040 GB. Virtual
SCSI disks are recommended over virtual IDE disks when implementing SQL
Server virtual machines. However, for SQL Server workloads, pass-through
disks provide the best performance from a disk perspective. Each SQL
Server workload placed in a virtual machine should comply with the
maximums.
For a virtualized SQL server, these are the recommendations for the storage
design:
Separate LUNs or spindles for the Host Operating System, guest OS
VHDs and SQL data, as shown Figure 2 below.
10
Figure 2 - Separate LUNs
LUNs must provide data protection using RAID 1, RAID 5 or RAID 10.
The guest OS must reside on a fixed size VHD.
o Due to Hyper-V requirements, even if Hyper-V host failover
cluster failover will not be used, a save state file (.vsv) must
be provisioned. Therefore, the minimum size must be at
least 15GB+ the VM memory size.
SQL storage must be configured as Fixed VHD, SCSI pass-through or
iSCSI.
o SCSI pass-though is preferred for storing databases and log
files.
On SQL servers, it is not recommended to use VHDs
near the 2040 GB maximum VHD size because of
the management overhead for managing large files.
Pass-through disks must be used in this scenario.
If Fixed VHDs are chosen for SQL storage, 250 GB is
the maximum recommended VHD size. A practical
and manageable size for a VHD is 100 GB.
o Databases and logs must be on separate LUNs and separate
VHDs.
o Fibre channel/SCSI HBAs require access to the hardware
layer on the operating system and the LUNs must be
configured on the host OS. The LUNs will be presented to
11
the guest OS as VHDs or pass-through disks.
o When using iSCSI, the iSCSI initiator can be configured to
the host or to the guest machines.
The best iSCSI performance occurs when the
initiator is configured to the Host Partition and
disks are presented to the guest Operating System
as pass-through disks. However, the pass-through
disks limit the portability of Virtual Machines to
other hosts, because the VM will be tied to the host
storage configuration.
If the iSCSI initiator is configured to the guest
Operating System, there will be a significant
performance impact but this configuration allows
more flexibility because the Virtual Machines can
be more easily moved to another host.
A separate iSCSI Gigabit network is recommended
when using iSCSI storage. The best performance is
achieved with a dedicated NIC with jumbo frame
configuration and no Virtual Network Switch.
Networking Considerations
It is recommended for each host server to have a dedicated management
NIC for each Hyper-V host.
For the configuration of virtual NICs, the Synthetic network adapters must
be used instead of the Legacy network adapters, due to overall better
performance (Legacy NICs are emulated devices).
Assuming that the host can handle the aggregate bandwidth of all guest
machines, the networking design must be as simple as possible, as shown in
Figure 3 below:
12
Figure 3 – Network diagram for Virtualized SQL Server
13
clustering feature to be added and configured on the servers running
Hyper-V. By utilizing Live Migration, architects and database administrators
can continue to verify service continuity and maintain their SQL Server
virtualization high availability objectives even during planned maintenance.
14
Figure 5 – Achieving High Availability with Guest Clustering
15
For example, strict security requirements may be in place for the Human
Resources department to verify their databases are isolated from other
production databases. These types of databases may require isolation as
they are governed by a specific regulatory compliance. Finally, the TempDB
database may be a performance bottleneck if you consolidate too many
databases onto a single virtual instance of SQL Server.
Disaster Recovery
As with any physical implementation of SQL Server, disaster recovery must
be a component of the design from the beginning. Based on the application
requirements, various means of recovering from a disaster can be
accomplished, with various levels of administrative actions required during
the failover process.
The Hyper-V Volume Shadow Copy Service (VSS) Writer allows for the
backup of Virtual Machines and their state information but it is not
integrated with the SQL Server VSS Writer under all supported storage
scenarios. Therefore, it is not recommended to back up the Virtual
Machines VHD files, but to perform a SQL Server aware snapshot from the
guest OS. Any backup software that supports a SQL Server-aware software-
based VSS solution (for example, Microsoft System Center Data Protection
Manager) can be used.
16
Apart from the limitations described above, recommended SQL Server
disaster recovery procedures for physical environments should be enforced.
The first option is using a conversion tool to execute operations "as is”.
17
The second option is deploying a new virtualized SQL Server instance and
conducting a database migration from the legacy physical server. During a
SQL Server virtualization strategy, many organizations take the opportunity
to upgrade their databases to the latest database platform or consolidate
their SQL Server instances and databases onto fewer virtualized systems
reducing costs and simplifying management.
Physical-to-Virtual Conversions
Microsoft System Center Virtual Machine Manager 2008 R2 can be used to
convert existing physical SQL Server computers into virtual machines
through a process commonly referred to as physical-to-virtual (P2V)
conversion. Virtual Machine Manager simplifies P2V conversions with the
use of a task-based wizard that automates much of the conversion process.
Since the P2V process is completely scriptable, you have the ability to
initiate large-scale P2V conversions of SQL Server through the Windows
PowerShell™ command line. It is worth mentioning that the conversion
from SQL Server physical servers to virtual servers in this strategy is
accomplished through a one-to-one mapping process. As a result, while you
will see a decrease in the number of physical servers in your infrastructure,
you will still have the same number of SQL Server instances to manage.
During a P2V conversion, disk images of the physical hard disks of the target
computer are created and formatted as virtual hard disks (.vhd files) for use
in the new, virtual machine. The new, virtual machine will have the same
identity as the original, physical machine upon which it is based.
The following table lists the online and offline support for P2V migrations
using System Center Virtual Machine Manager 2008 R2:
18
Windows Server 2008 R2
with Hyper-V role enabled
Windows Server 2008 / Yes Yes Yes
Windows Server 2008 R2
without Hyper-V role
enabled
Windows Server 2003 SP1 Yes Yes Yes
or later
Windows Server 2003 x64 Yes Yes Yes
Edition
Windows 2000 Server SP4 Yes No Yes
Monitoring
Performance Health Metrics on SQL Server Guest
Machines
In the resulting consolidated architecture, the SQL Server guest machines
should be monitored as any other SQL Server. The same performance
metrics are valid. They can be monitored using System Center Operations
Manager with the SQL Server Management Pack.
19
o Process Object
% Processor Time: On average, this should run
under 40% with occasional spikes as individual
queries run.
o System Object
Processor Queue Length: Less than 2 x the number
of CPUs in the system. If the counter is growing and
% Processor Time is continually over 80% you will
need to allocate more virtual processors to the
guest machine or adjust the virtual processors
speed.
o Memory Object
Pages / Sec: Monitor to verify the SQL Server is fully
taking advantage without starving the underlying
operating system.
o Physical Disk Object
Avg. Disk Queue Length: Less than 2 x the number
of spindles on the disk being monitored.
Average Disk Sec/Read: 11 – 15 ms or lower
Average Disk Sec/Write: 12 ms or lower
o Network Interface Object
Total Bytes / Sec: Average less than 60% of
theoretical maximum of NIC. However,` verify it
occasionally can peak over this to avoid a limit on
the network traffic due to a downstream problem.
On any SQL Server host, if the average CPU utilization on a server is
greater than 70% there will be little gain in consolidating that
particular server into a physical host with guests in other roles.
20
Write Bytes/sec)
On Network Interface, Bytes Total/sec must be lower than the
nominal NIC throughput to verify it is not exhausted.
If there is any indication that Virtual NIC packets are being dropped,
the physical NIC probably does not have enough throughput for the
aggregate bandwidth.
Additional Resources
Support policy for Microsoft SQL Server products that are running in a
hardware virtualization environment
http://support.microsoft.com/KB/956893
21
Disaster Recovery Planning (Database Engine)
http://msdn.microsoft.com/en-us/library/ms178128.aspx
22
The information contained in this document represents the current view of Microsoft Corporation on the
issues discussed as of the date of publication and is subject to change at any time without notice to you.
This document and its contents are provided AS IS without warranty of any kind, and should not be
interpreted as an offer or commitment on the part of Microsoft, and Microsoft cannot guarantee the
accuracy of any information presented. The information in this document represents the current view of
Microsoft on the content. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO
THE INFORMATION IN THIS DOCUMENT.
The descriptions of other companies’ products in this document, if any, are provided only as a convenience
to you. Any such references should not be considered an endorsement or support by Microsoft. Microsoft
cannot guarantee their accuracy, and the products may change over time. Also, the descriptions are
intended as brief highlights to aid understanding, rather than as thorough coverage. For authoritative
descriptions of these products, please consult their respective manufacturers.
23