Upload
dbi-services
View
1.028
Download
2
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
© 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
www.dbi-services.com
© 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
© dbi services
Introduction
What is Windows Server Core? 1/2
www.dbi-services.com 3 26.04.2012
© 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
© dbi services
Introduction
Server roles supported
www.dbi-services.com 5 26.04.2012
Failover Clustering
10 roles
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© dbi services
Configuration & Management
Core configurator
www.dbi-services.com 16 26.04.2012
Codeplex download: http://coreconfig.codeplex.com/
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© dbi services
SQL Server Configuration
Configure SQL Server Instance
www.dbi-services.com 24 26.04.2012
Apply best practices: http://www.slideshare.net/dbiservices /d-dbif20110830005sql-serverbestpractice Use SQL Server on remote with SSMS or directly SQLCMD:
sqlcmd -S <server>\<instance> -i W:\sqlinstconfig.sql
sqlcmd -S <server>\<instance> -i W:\tempdbconfig.sql
© 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”
© 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
© 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
© 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
© dbi services
Adapt Database Management Kit features:
Using WMI
Using PowerShell
Using SQLCMD
Using GUI like Notepad
Commands sample:
DMK link :
http://www.dbi-services.com/index.php/products/database-management-kit
Conclusion Futur management : DMK for SLQ 2012
www.dbi-services.com 29 26.04.2012
sq => sqlcmd -S <ComputerName>\<InstanceName>
via => notepad.exe <SQL Server Log File Path>\ERRORLOG
© 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
www.dbi-services.com