SQL Server 2017
Aufbruch zu neuen Ufern
WWW.SOFTED.DE/NETNIGHT
SPEAKER
Thomas Pfeiffer
Senior Consultant Database & BIMCT, MCSE, MCITP, …
Schwerpunkte:- Performance - High Availability- Business Intelligence
2
WWW.SOFTED.DE/NETNIGHT
Agenda› Allgemeine Angaben› Linux - Plattform› Neuerungen in der Datenbank-Engine / Performance› Hochverfügbarkeit› Business Intelligence
3
WWW.SOFTED.DE/NETNIGHT
Editionen
4
Feature Enterprise Standard Web Express
CPU – DB Engine OS maximumLimited to lesser of 4 sockets or 24 cores
Limited to lesser of 4 sockets or 16 cores
Limited to lesser of 1 socket or 4 cores
CPU – SSAS & SSRS OS maximumLimited to lesser of 4 sockets or 24 cores
Limited to lesser of 4 sockets or 16 cores
Limited to lesser of 1 socket or 4 cores
Memory – Buffer Pool OS maximum 128 GB 64 GB 1410 MB
Memory – Columnstore Data OS maximum 32 GB 16 GB 352 MB
Memory – InMemory Objects OS maximum 32 GB 16 GB 352 MB
Memory - SSAS OS maximumTabular: 16 GBMOLAP: 64 GB
N/A N/A
Memory - SSRS OS maximum 64 GB 64 GB4 GB (Express edition with Advanced Services)
Maximum relational DB size 524 PB 524 PB 524 PB 10 GB
WWW.SOFTED.DE/NETNIGHT
› Jahre 0-5 (Mainstream Support):› Security- und › Featureupdates
› Jahre 6-10 (Extended Support):› Securityupdates› Updates für “critical function issues”
› Jahre 11-16 (Premium Assurance):› Optionale kostenpflichtige Erweiterung
des Extended Support
› Ab SQL 2017› GDR und CU – Linien (früher QFE)› Einzelne Security-Patches wie
bisher für GDR + CU › Im Extended Support CU für
GDR-Linie› CU-Zyklus:
› Jahr 1: Monatlich› Jahre 2-5: Quartalsweise› http://sqlserverbuilds.blogspot.de/
Update-Zyklus
5
Modern Servicing Model
WWW.SOFTED.DE/NETNIGHT
SQL Server 2017 - Architektur› Erneuerung SQLOS (SOS)
auf Version 2› Kapselung der OS-Zugriffe
und OS-Verwaltung über den Platform AbstractionLayer (SQLPAL)
6
SQL Server
Hosted Win32 APIs
NT User Mode APIs
SQLOS
Direct APIs
SQLOS v2
Storage ManagerNetwork
Manager
Resource
ManagerProcess Manager Security Manager
Operating System (Windows or Linux)
SQ
LPA
L
WWW.SOFTED.DE/NETNIGHT
› RAM› 3.25 GB (1 GB min)
› Storage› 6 GB of free disk space
› CPU› x64 compatible› 2 cores or more› 2 GHz or faster (1,4 GHz min)
› Enterprise & Standard› Windows Server 2012 (R2) & 2016
› Developer› Windows 8 & 10› Windows Server 2012 (R2) & 2016
› Linux (DB Engine)› Red Hat Enterprise Linux 7.3 oder 7.4› SUSE Linux Enterprise Server v12 SP2› Ubuntu 16.04› Docker-Modul 1.8+
› SQL Server Virtual Machines in Azure
Anforderungen
7
WWW.SOFTED.DE/NETNIGHT
› Online-Repository aufpackages.microsoft.com
› Offline Packages zumDownload verfügbar
› SQL Server› Server: mssql-server package› Client: mssql-tools package› Konfiguration: mssql-conf
› SQL Server Agent› mssql-server-agent package› Runs as a systemd service
› sudo apt-get install -y mssql-server
› sudo apt-get install -y mssql-tools
› sudo /opt/mssql/bin/mssql-conf setup
› sudo apt-get install -y mssql-server-agent
SQL Server auf Linux
8
WWW.SOFTED.DE/NETNIGHT
› Online-Repository aufpackages.microsoft.com
› Offline Packages zumDownload verfügbar
› Volltextsuche› mssql-server-fts package
› SQL Server Integration Services› mssql-server-is package› Konfiguration: ssis-conf
› sudo apt-get install -y mssql-server-fts
› sudo apt-get install mssql-server-is
› sudo /opt/mssql/bin/mssql-conf setup
SQL Server auf Linux
9
WWW.SOFTED.DE/NETNIGHT
› Raw File: source and destination› Flat File: source and destination› XML: source› ADO.NET: SQLClient provider
only; source and destination› ODBC: any 64-bit Unicode ODBC
driver; source and destination› OLE DB: SQL Server Native Client
11.0 and Microsoft OLE DB Provider for SQL Server only; source and destination
› SSIS on Linux uses Windows-style paths:› C:\ is converted to /› For example, refer to
/data/measurements/current_day.txt as c:\data\measurements\current_day.txt
› dtexec paths:› Use a Linux-style path for the /File
argument› Use a Windows-style path for the
/Project argument
SSIS-Datenquellen
10
SSIS-Pfadangaben
WWW.SOFTED.DE/NETNIGHT
SQL Tools unter Linux› Kommandozeilen-Tools wurden
portiert
› SQLCMD› T-SQL Interface› Batch-Verarbeitung mittels
<GO>› bcp
› Bulk - Im-/Export für Tabellen in den Databanken
11
•Connection and authentication
•Executing Transact-SQL commands with sqlcmd
sqlcmd -S localhost -U SA -P 'Password'
CREATE DATABASE myDataSELECT Name FROM sys.DatabasesGOUSE myDataCREATE TABLE StaffMembers (memberID INT, firstNameNVARCHAR(50), lastName NVARCHAR(50))INSERT INTO StaffMembers VALUES (1, 'Patrick’, 'Hines’);INSERT INTO StaffMembers VALUES (2, 'Jennifer’, 'Kim’);GOSELECT * FROM StaffMembers;GO
WWW.SOFTED.DE/NETNIGHT
SQL Server unter Docker› Anforderungen
› Docker Engine 1.8 +› RAM: 4 GB min› Storage: 4 GB +› Windows Server 2016,
Windows 10, Linux› On Linux, XFS or EXT4› Processor:
› x64 compatible› 2 or more cores› 2 GHz or faster
12
SQL
Server
Hypervisor
Host OS
Guest OS:
Windows
Hardware
Guest OS:
Linux
App
Virtual Machines:
SQL
Server
Host OS
Hardware
App
Containers:
Libraries Libraries
Docker
Libraries Libraries
WWW.SOFTED.DE/NETNIGHT
High Availability› Log-Shipping
› Anpassungen für Linux› Failover-Cluster
› Anpassungen für Linux› Availability Groups
› Anpassungen für Linux› Erweiterung in SQL Server 2017
13
WWW.SOFTED.DE/NETNIGHT
Log Shipping› Zwischen-
speicherung der Backup-Filesnotwendig
› Nutzung von SMB-Shares mit Samba oder vergleichbaren Tools
› Jobs laufen über Agent
14
Primary
server
Primary database
Backup directory
Backup
server
Copy database
Copy directory
backup restore
copy
WWW.SOFTED.DE/NETNIGHT
Failover Cluster Instanzen und Availability Groups› Cluster-Dienst von Windows
wird ersetzt› Pacemaker (bevorzugt)› Corosync
› Failover Cluster› Shared Storage
erforderlich› Availability Groups
› Jeder Knoten hostet eigene Daten-Dateien
15
Cluster servicesSQL Server
(active node)
SQL Server
(passive node)
Cluster manager
Pacemaker
Corosync
Hardware
Linux
(active node)
Linux
(passive node)
Shared storage
WWW.SOFTED.DE/NETNIGHT
Availability Groups 2017› Availability Group für HA
› Aktiver Knoten: Lese-/Schreibzugriff für Appliaktionen› Passiver Knoten:
› lesender Zugriff möglich, › Load-Balancing zur Lastverteilung› Backup, HA
› Distributed availability group› Verknüpfung mehrerer HA-Gruppen
› Read-scale availability group› Nur Lese-Zugriff, besseres Load-Balancing, kein Cluster erforderlich
16
WWW.SOFTED.DE/NETNIGHT
Neuerungen in SQL Server 2017› SQL Graph DB
› Performance› Adaptive Query Processing› Automatic Tuning› Plan choice correction
17
WWW.SOFTED.DE/NETNIGHT
SQL Graph DB› Auflistung von Knoten und
Beziehungen› Flexible Verbindungen› Multi-Hop Abfragen
› SQL 2017› Implementiert in DB
Engine› Erweiterungen bei
› create table› select
18
WWW.SOFTED.DE/NETNIGHT
Adaptive Query Processing› Cardinality estimation (CE)
› Grundlage für Ausführungspläne› CE kann unter Umständen “suboptimale” Pläne erzeugen
› Adaptive Query Processing:› Batch mode memory grant feedback› Batch mode adaptive joins› Interleaved execution
› Voraussetzung:› Database compatibility level 140
19
WWW.SOFTED.DE/NETNIGHT
Batch mode adaptive joins› Dynamically select between hash join and nested loop join operators at
execution time› New adaptive join logical operator
› Choice between operators is decided by the actual number of rows in comparison to an adaptive join threshold
› Query must meet eligibility criteria› Database compatibility level 140› Columnstore index› SELECT statement
20
WWW.SOFTED.DE/NETNIGHT
Interleaved execution› Multi-Statement Table Value
Functions› Für den SQL Optimizer als
„Black Box“ ausgeführt› „Interner“ Ausführungsplan
korreliert nicht mit dem Plan der nutzenden Abfrage
21
OptimizeExecute
MSTVFOptimize Execute
SQL Server 2017
MSTVF
identified
MSTVF
actual
cardinality
Better
performance
Optimize Execute
Before SQL Server 2017
MSTVF fixed
cardinality
Potential poor
performance
WWW.SOFTED.DE/NETNIGHT
Automatic Tuning› Query execution plan and query performance data is collected› Reduction in query performance that is correlated to a change in query
execution plan is automatically identified› A script to force the previous plan is generated
› Optionally, the previous plan can be applied automatically
› sys.dm_db_tuning_recommendations› Returns a record of tuning recommendations, and when and how they
were applied› Results are recorded until the instance is restarted
22
WWW.SOFTED.DE/NETNIGHT
Plan choice correction› Automatic plan choice correction
› Enabled at database level› Plan choice recommendations are automatically forced when:
› CPU time gain is greater than 10 seconds› Fewer errors exist in the recommended plan
› Results are monitored; if performance does not improve, the plan is recompiled
› Manual plan choice correction› Manually apply recommendations from DMV› Must monitor to verify the outcome
23
WWW.SOFTED.DE/NETNIGHT
Business Intelligence› Power BI Report Server› Report Kommentare› Machine Learning und Python Integration
24
WWW.SOFTED.DE/NETNIGHT
Power BI Report Server› On-Premise – Lösung für
Power BI Dashboards› SSRS 2017 mit Power BI
Integration› Lizenz: Enterprise Edition mit SA› Aktualisierung über:
› Zeitpläne in SSRS, › Live-Daten über SSAS-Modelle
25
WWW.SOFTED.DE/NETNIGHT
Report Kommentare› User können:
› Kommentare zu Berichten hinzufügen› Dokumente anhängen› Antworten zu Kommentaren hinzufügen
› Diskussionsbeträge zwischen Entwickler/Nutzer› Berechtigungen können auf verschiedenen Ebenen erteilt werden
26
WWW.SOFTED.DE/NETNIGHT
Machine Learning Services and Python Integration› SQL Server R Services renamed Machine Learning Services
› R and Python now supported› In-Database and Standalone editions
› Python and R languages installed independently of Machine Learning Services
› Open R 3.3› Python 3.5 (Anaconda distribution)
› Call Python from Transact-SQL with sp_execute_external_script› Install Machine Learning Services packages for R or Python on client PCs
27
WWW.SOFTED.DE/NETNIGHT
Azure Cloud› Azure SQL Managed Instance
› Die meisten Features sind unterstützt› Nicht verfügbar: SSIS, SSAS› “Isolated Managed Instance” - nicht im Update-Zyklus von Azure
› Database Migration Assistant› Azure-Migration von Oracle oder SQL Server Datenbanken
› Prüfung der Migrationsfähigkeit› Bericht über potentielle Probleme und Vorschläge› Migration
28
Unser Datenbankteam unterstützt Sie mit: • B e r a t u n g s - u n d P r o j e k t u n t e r s t ü t z u n g b e i d e r M i g r a t i o n ,
K o n s o l i d i e r u n g u n d E n t w i c k l u n g• T r a i n i n g s z u m S Q L S e r v e r 2 0 1 7 :
U p g r a d e , S Q L a u f L i n u x , S Q L A d m i n i s t r a t i o n , S Q L E n t w i c k l u n g u n d B I P r o z e s s e
A n f r a g e n u n d B e r a t u n g : T h o m a s P f e i f f e r p f e i f f e r @ s o f t e d . d e T e l e f o n 0 3 5 1 8 6 7 7 0 0