30
© dbi services dbi services Windows Server Core & SQL Server 2012 1 26.04.2012 www.dbi-services.com Stéphane Haby Consultant Mobile +41 79 103 89 60 [email protected] www.dbi-services.com

Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

Embed Size (px)

DESCRIPTION

Windows Server 2008 dispose désormais d'un nouveau mode d'installation : Windows Server Core permet d'améliorer la sécurité et de diminuer la charge administrative part le nombre limité de composants installés. Pourquoi privilégier un tel environnement avec SQL Server 2012, quels bénéfices peut-on en tirer et quelles limitations en découlent ? Dans cette session, nous apporterons des réponses à ces questions. Vous découvrirez également le fonctionnement de SQL Server 2012 sur Windows Server Core en démonstration "live".

Citation preview

Page 1: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

dbi services Windows Server Core & SQL Server 2012

1 26.04.2012 www.dbi-services.com

Stéphane Haby

Consultant

Mobile +41 79 103 89 60

[email protected]

www.dbi-services.com

Page 2: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Agenda

dbi services

i. Introduction

ii. Why Windows Server Core ?

iii. Configuration & Management

iv. SQL Server Installation

v. SQL Server Configuration

vi. Conclusion

Windows Server Core & SQL Server 2012

26.04.2012 2 www.dbi-services.com

Page 3: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Introduction

What is Windows Server Core? 1/2

www.dbi-services.com 3 26.04.2012

Page 4: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Not a Windows Server Edition

Installation & Configuration option without GUI

Introduction

What is Windows Server Core? 2/2

www.dbi-services.com 4 26.04.2012

Page 5: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Introduction

Server roles supported

www.dbi-services.com 5 26.04.2012

Failover Clustering

10 roles

Page 6: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Agenda

dbi services

i. Introduction

ii. Why Windows Server Core ?

iii. Configuration & Management

iv. SQL Server Installation

v. SQL Server Configuration

vi. Conclusion

Windows Server Core & SQL Server 2012

26.04.2012 6 www.dbi-services.com

Page 7: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Ensure the server stability

Less down time

Smaller attack surface – higher security

Reduce servicing and management requirements

Reduce Hardware constraints : Disk / Memory

Why Windows Server Core ?

Benefits

www.dbi-services.com 7 26.04.2012

The perfect platform for databases and naturally SQL Server

Page 8: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

If Server Core had existed

Windows 2000 is ~60% reduction

Windows Server 2003 is ~40% reduction

Windows Server 2008:

~35% reduction if accepting all patches

~59% reduction if applying only necessary patches

~59% elimination of reboots

Why Windows Server Core ?

Reduce OS patches

www.dbi-services.com 8 26.04.2012

Page 9: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Agenda

dbi services

i. Introduction

ii. Why Windows Server Core ?

iii. Configuration & Management

iv. SQL Server Installation

v. SQL Server Configuration

vi. Conclusion

Windows Server Core & SQL Server 2012

26.04.2012 9 www.dbi-services.com

Page 10: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

Basic Configuration

www.dbi-services.com 10 26.04.2012

All command are “case sensitive” Server Core Installation overview http://technet.microsoft.com/en-us/library/cc753802(WS.10).aspx Basic configuration: Commande sconfig

Computer name

Domain

Windows update

Network Settings

Page 11: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

Licensing

www.dbi-services.com 11 26.04.2012

cscript C:\windows\system32\slmgr.vbs –dli

cscript C:\windows\system32\slmgr.vbs –ipk XXXXX-XXXXX-

XXXXX-XXXXX-XXXXX

cscript C:\windows\system32\slmgr.vbs -ato

Page 12: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

Firewall Configuration

www.dbi-services.com 12 26.04.2012

netsh firewall set icmpsetting 8

netsh firewall set icmpsetting type=ALL mode=enable

Internet Control Message Protocol (ICMP) Settings Windows 2008

Windows 2008 R2 netsh advfirewall firewall add rule name=”ICMP Allow

incoming V4 echo request” protocol=icmpv4:8,any dir=in

action=allow

netsh advfirewall firewall add rule name=”All ICMP V4”

protocol=icmpv4:any,any dir=in action=allow

Page 13: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

Activate features

www.dbi-services.com 13 26.04.2012

DISM /online /enable-feature /featurename:NetFx2-

ServerCore /featurename:ServerCore-WOW64

/featurename:NetFx3-ServerCore-WOW64 /featurename:NetFx2-

ServerCore-WOW64 /featurename:NetFx3-ServerCore

No Server Manager Interface Use Disk Image Service Management (DISM)

Failover Clustering activation

PowerShell activation

DISM /online /enable-feature

/featurename:FailoverCluster-Core

DISM /online /enable-feature

/featurename:MicrosoftWindowsPowerShell-WOW64

Page 14: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

Usefull Commands

www.dbi-services.com 14 26.04.2012

Read the 10 last lines from the system event log

Regional option, date & hours

List all installed hotfix

List all drivers

Magic Command

wevtutil qe system /f:text /c:10 /rd:true

control intl.cpl

control timedate.cpl

wmic qfe list

pnputil -e

cscript c:\Windows\System32\SCregEdit.wsf /CLI|more

Page 15: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

GUI

www.dbi-services.com 15 26.04.2012

Command prompt

Microsoft Support Diagnostic Tool

Notepad

System Information

Task Manager

Registry Editor

%WINDIR%\System32\cmd.exe

%WINDIR%\System32\Msdt.exe

%WINDIR%\System32\Notepad.exe

%WINDIR%\System32\Msinfo32.exe

%WINDIR%\System32\Taskmgr.exe

%WINDIR%\System32\Regedt32.exe

Page 16: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

Core configurator

www.dbi-services.com 16 26.04.2012

Codeplex download: http://coreconfig.codeplex.com/

Page 17: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Configuration & Management

Checklist

www.dbi-services.com 17 26.04.2012

Setup Windows Server Core: Installation Option Activate Windows Server Core license Integrate in domain Configure Firewall Install features:

.NET Failover Clustering PowerShell

Update patches

Page 18: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Agenda

dbi services

i. Introduction

ii. Why Windows Server Core ?

iii. Configuration & Management

iv. SQL Server Installation

v. SQL Server Configuration

vi. Conclusion

Windows Server Core & SQL Server 2012

26.04.2012 18 www.dbi-services.com

Page 19: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

SQL Server Installation

Requirement: .Net 4 Core

www.dbi-services.com 19 26.04.2012

Not include in Windows Server Core and not in SQL Server 2012

Specific package for Core

Requirement for SQL Server 2012 .NET 4 Core download :

http://www.microsoft.com/download/en/details.aspx?id=22833

Page 20: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

All Edition (including Express)

Engine

SQLCMD

Analysis Service (SSAS)

Integration Service (SSIS)

Connectivity SDK

Sync Fx2

SQL Server Installation

Features

www.dbi-services.com 20 26.04.2012

Reporting Services (SSRS)

Most SDKs

Master Data Service (MDS)

Data Quality Service (DQS)

Books Online

Management Tools on remote

Page 21: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Setup.exe /QS /ACTION=Install /FEATURES=SQLENGINE,FULLTEXT

/INSTANCENAME=MSSQLCORE /IAcceptSQLServerLicenseTerms

/SQLSVCACCOUNT=MSTEST\sqlservices /SQLSVCPASSWORD=xxxxx

/SQLSYSADMINACCOUNTS=MSTEST\Administrator /AGTSVCACCOUNT=

MSTEST\sqlservices /AGTSVCPASSWORD=xxxx /TCPENABLED=1

Command-line install only No « Wizard »

With configuration file

Setup automatically installs/enables pre-requisites

Rules to detect unsupported features/scenarios

SQL Server Installation

SQL Server Setup

www.dbi-services.com 21 26.04.2012

Setup.exe /QS /Configurationfile=W:\ConfigurationFile.ini

Page 22: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Agenda

dbi services

i. Introduction

ii. Why Windows Server Core ?

iii. Configuration & Management

iv. SQL Server Installation

v. SQL Server Configuration

vi. Conclusion

Windows Server Core & SQL Server 2012

26.04.2012 22 www.dbi-services.com

Page 23: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

SQL Server Configuration

Configure Firewall

www.dbi-services.com 23 26.04.2012

netsh firewall set portopening TCP 1433 "SQLServer"

Port de communication SQL Server Windows 2008

Windows 2008 R2 netsh advfirewall firewall add rule name=”SQL Server

default port 1433” dir=in action=allow protocol=TCP

localport=1433

Page 25: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

SQL Server Configuration

Useful Commands

www.dbi-services.com 25 26.04.2012

Enable and Start SQL Browser

New DMVs :

Identify all processes that are blocked for more than 10 seconds

Check if there are any deadlocks

sc config SQLBROWSER start=auto

net start SQLBROWSER

sqlcmd -q "SELECT * FROM sys.dm_os_windows_info“

sqlcmd -q "SELECT * FROM sys.dm_server_services“

sqlcmd -q "SELECT * FROM sys.sysprocesses WHERE

blocked<>0 AND waittime > 10000”

sqlcmd -q "SELECT * FROM sys.dm_os_performance_counters

WHERE counter_name = 'Number of Deadlocks/sec‘ AND

cntr_value <> 0”

Page 26: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

SQL Server Configuration

Checklist

www.dbi-services.com 26 26.04.2012

Install requirements like .Net 4 Core

Install SQL Server in command-line Configure the Firewall for SQL Server ports Apply Best Practice to configure Instance

Load or install the databases

Page 27: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Agenda

dbi services

i. Introduction

ii. Why Windows Server Core ?

iii. Configuration & Management

iv. SQL Server Installation

v. SQL Server Configuration

vi. Conclusion

Windows Server Core & SQL Server 2012

26.04.2012 27 www.dbi-services.com

Page 28: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

Windows Core for SQL Server

Reduce Downtime

Attack surface

OS footprint

Critical DB Workload

Without BI

Reduce update

Consult Windows Core Blog:

http://blogs.technet.com/b/server_core/

Conclusion dbi services recommend

www.dbi-services.com 28 26.04.2012

The perfect platform for SQL Server 2012

Page 30: Windows Server Core : environnement pour SQL Server 2012 - Stéphane Haby - dbi services

© dbi services

dbi services

Any Questions? Please Do Ask!

30 26.04.2012 www.dbi-services.com

„We look forward to working with you!“

Stéphane Haby

Consultant

Mobile +41 79 103 89 60

[email protected]

www.dbi-services.com