techniques to manage sql server sprawl - …...– sql version – purpose – type (prod, qa, test)...

Post on 07-Jul-2020

11 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Techniques to manage

SQL Server sprawl

Greg Robidoux

Edgewood Solutions

gregr@edgewoodsolutions.com

Greg Robidoux

• Founder of Edgewood Solutions LLC

– www.EdgewoodSolutions.com

• Co-founder of MSSQLTips.com

– www.mssqltips.com

• Contact Info– gregr@edgewoodsolutions.com

– http://www.mssqltips.com/sqlserverauthor/37/greg-robidoux/

2

What is sprawl

3

source: http://www.thefreedictionary.com/sprawl

What is SQL Server Sprawl

• A hodgepodge of underutilized and unmanaged

SQL Servers

• Unknown departmental servers

• Entire SQL installation for just one database

• Spinning up copies of Virtual Machines

• Proliferation of databases to other servers

• Physical, multiple instances, VMs

• Unjustified costs for hardware and licensing

4

Proliferation of Servers

• SQL Express

• SQL Developer Edition

• Virtual servers

• Dedicated servers per application

• Single instance servers

5

Why you should care

• Underutilized servers

• Wrong SQL Server licensing

• Multiple versions and editions to support

• Security concerns

• Management concerns

• Implement more robust environment

6

Questions for you

• How many SQL Server instances are there

• How many production instances are there

• How many versions and editions are there

• How many servers are at peak capacity

• How many servers are not properly patched

• How much could you save on licensing

7

SQL Server Editions

• Per seat or per core licensing– Enterprise

– Business Intelligence

– Parallel Data Warehouse

– Standard

– Web

• Free– Express with Advanced Services

– Express with Tools

– Express

– Evaluation

• Per user licensing– Developer

– Parallel Data Warehouse for Developers

8

SQL 2012 Licensing

• Per core vs per processor

• Licensing sold in 2-core packs

• Core-Based– Enterprise or Standard

• Server+CAL– Business Intelligence or Standard

• Web– Must have a Microsoft Services Provider License

Agreement (SPLA).

• Passive Nodes do not need another license

• Developer Edition – licensed by user

9

Licensing for Virtualization

• Four core minimum for each virtual

machine

• Enterprise you can run as many VMs as

there are licensed cores

– If you server has a license for 8 cores you can

run 8 VMs on the server

10

Server Discovery

• Microsoft Assessment and Planning Tool (MAP)

– Inventories SQL 2000 and later

– Uses Active Directory, System Center, IP ranges and more

– Uses WMI and SQL Server connection info to find

instances

– Inventory other items as well; servers, desktops, virtual

servers, Exchange, SharePoint, etc.

– http://technet.microsoft.com/en-us/solutionaccelerators/dd537566

11

Server Discovery

12

Server Discovery

• PowerShell– [System.Data.Sql.SqlDataSourceEnumerator]::Instance.GetDataSources()

• Requires SQL Browser to be running

• Example and explanation– http://www.mssqltips.com/sqlservertip/2013/find-sql-server-instances-

across-your-network-using-windows-powershell/

13

Server Discovery

• Windows Management Instrumentation (WMI)

• Reading the registry

• SMO

• Third Party Tools

14

Server Inventory

• Should build and maintain for all systems– Server Name / IP

– Physical location of server

– Business Contacts / Owners

– OS Version

– SQL Version

– Purpose

– Type (prod, qa, test)

– Primary DBA contact info

– Backup and Recovery SLA

– Installed SQL Services

– Criticality

– Security concerns

• Some of this can be automated

15

Collect Overall Server Metrics

• Metrics to collect– CPU usage

– Memory usage

– IO usage

– Database sizes

– Backup sizes

• Tools– Performance Monitor

– SQL Server DMVs

– Built in SQL Server Reports

– Third Party Tools

– Profiler / Traces

16

Server Consolidation

• Combine underutilized servers

• Combine like servers

• Combine servers where security is not a

concern

• Consolidation Issues

– Similar database names

– Login / Security

– Accounts needing elevated permissions

17

Multi-instance servers

• SQL Server supports up to 50 instances for all editions

• No additional licensing costs

• Take advantage of underutilized hardware

• Segment SQL Server databases and security

• Set maximum memory and processor affinity

• Multi-instance issues– Shared server resources; memory, cpu, possibly

disk

– Each instance needs to be maintained separately

18

Virtualized Servers

• SQL Enterprise Edition

• Easy to put up and take down

• Segment Windows and SQL Server

security

• Assign resources by VM

• Virtual Machine issues

– Need to keep track of servers and use

19

SQL Express

• Free for smaller databases (up to 10GB) and can reduce licensing fees

• Are there other production servers that exist that can be used instead

• Make sure you follow company protocols

• SQL Express issues

– Don’t introduce security risks

– Don’t assume it is being managed like other servers

– Don’t overlook patching

20

Policies and procedures

• Versions and editions supported

• Third party applications

• Security / service accounts

• Departmental servers

• Patching

• Scan network for new instances

• Maintain inventory database

• Recovery

21

Idera SQL Elements

Discover, track and manage your SQL Server environment effectively

Inventory View- see number of SQL Servers and where they reside

Continuous Discovery-regularly scan for newly added servers

Alerts-get alerts on availability and storage status of SQL Servers

Health Checks-find and fix poor server configurations

Agentless-download, install and use in under 5 minutes

Try out SQL Elements

www.idera.com

Questions and Wrap-up

Resources:

• SQL Server Consolidation Guidance– http://technet.microsoft.com/en-us/library/ee819082(v=sql.100).aspx

23

top related