Download presentation
Presentation is loading. Please wait.
1
Introduction to SQL Server 2017 on Linux
Andrzej Kukuła Introduction to SQL Server 2017 on Linux
2
Sponsors
3
About me 20+ years of professional experience in IT Consultant, Trainer Architect of HA/DR Solutions, BI Solutions, Data Platform Solutions, Cloud Solutions Polish Data Community (former PLSSUG) – PASS Chapter Leader Conference and user group
4
Agenda Multi-platform SQL Server Linux offerings Licensing Supported platforms Client tools Features System architecture Installation from package – demos Docker – demos Random notes
5
Platform is your preference
SQL Server 2017 is available for Windows, Linux and Docker GA was announced at Ignite conference on You can download it right now
6
Multi-platform SQL Server
SQL Server is just a part of Data Platform offering It’s about giving business a choice OS platform Data diversity Development environment Cloud/on prem/hybrid { } T-SQL Java C/C++ C#/VB.NET PHP Node.js Python Ruby
7
Linux offerings NEW SQL Server on Linux HDInsight on Linux Machine Learning Server on Linux Linux in Azure SQL Server drivers and connectivity Visual Studio Code + extension for SQL Server .NET Core 2.0 PowerShell v6 (beta) Python, Ruby, …
8
Same license, new choice
A license can be used on Windows or Linux Same editions on Linux: Express (free) Standard Web Enterprise Developer * Evaluation * * Free to download and use (non-production)
9
Supported platforms RedHat Enterprise Linux (RHEL) 7.3 SUSE Enterprise Linux (SLES) v12 SP2 Ubuntu 16.04, (runs on other Linux distributions) Docker: Windows & Linux containers Windows Server / Windows 10 Linux: Selected filesystems Linux Containers Windows Windows Server
10
SQL Tools for SQL Server on Linux
11
What’s working in SQL Server 2017 on Linux?
Everything! Relational engine Agent HA/DR (including FCI and Availability Groups) Windows authentication Full-Text Search daemon Integration Services (+dtexec utility) Just a few exceptions (planned to be addressed in the future) Log reader agent (CDC, Replication - expected very soon) Analysis Services, Reporting Services, DQS, MDS Machine Learning Services Stretch DB, Polybase FileTable
12
SQL Server 2017 Failover Cluster on Linux
13
SQL Platform Abstraction Layer
All resources managed by SQL PAL Benefit for SQL Server on Windows and on Linux Abstraction for high-level dependencies Reduce kernel ABI surface from > 1200 calls to < 50 calls Everything in user mode Improved performance SOS + LibOS = SQLPAL SOS will be removed from SQL Server and merged with SQLPAL Linux Host Extensions convert ABI calls, stack layout, results
14
System Architecture System Resource & Latency Sensitive Code Paths
Everything else RDBMS IS AS RS SQL Platform Abstraction Layer (SQLPAL) SQL OS API Win32-like APIs SQL Platform Abstraction Layer (SQLPAL) SQL OS v2 Windows Host Ext. Linux Host Extension Windows Linux Host Extension mapping to OS system calls (IO, Memory, CPU scheduling)
15
Installation demo Minimum RAM requirement: 3.25 GB ext4 or XFS filesystem (btrfs is not supported ) NFS 4.2 or newer to host files on an NFS server Installation from packages
16
2 repositories Servicing change – no more service packs GDR repository – only official release + critical security fixes CU repository – all updates will go here
17
Installation layout Instant File Initialization is always enabled
Binaries - /opt/mssql Data, transaction logs, error logs, default trace - /var/opt/mssql Command line tools: sqlservr – core executable – not used directly mssql-conf – configure (setup, change collation, sa password, …) bcp – bulk import/export tool sqlcmd – command line query execution tool mssql-scripter – easily create scripts of your databases (installed separately) dbfs – view DMVs from the file system (installed separately)
18
Instances and Docker SQL Server instance is a non-trivial thing on Windows Long set up process „Magic” happening to fs, registry and who knows what during installation Often requires reboot of Windows host system Docker containers change that dramatically Instances are easy to set up and remove Few seconds to spin a new SQL Server No reboot necessary in between The process is always reproducible Almost complete independence from host system
19
A few words about Docker
A platform that allows to package and run an app in isolated environment Single OS, multiple containers Sort of „leaner” virtualization (one kernel) Much lower overhead compared to full virtualization Container has everything needed to run an app Will run the same way no matter what changes happen at the host level (libraries, packages) Building blocks Docker packaging format (docker file) Docker Hub - distribution platform (container repository) Docker tools
20
SQL Server Instances and Docker
Helpful in many scenarios SP & CU installations Upgrades Temporary instances Test SP & CU Test restores Test configuration changes Dev instances Database unit testing made easier CI/CD Let’s see this in action – demo!
21
SQL Server on Linux - monitoring
collectd, InfluxDB, Grafana
22
Migration options backup/restore BACPAC SQL Server Migration Assistant bcp SSIS
23
Surprises for Windows admins
Some knowledge of Linux platform will be required File names are case sensitive in Linux /var/opt/mssql/data/TestDB.MDF != /var/opt/mssql/data/testdb.mdf Pay attention when doing ALTER DATABASE … MODIFY FILE Files/directories can be deleted while in use They’re not protected from deletion in the sense we know from Windows Only the name is removed, file data (inode) remains available until closed (can be recovered) You can also rename/move them (within one filesystem) while in use DON’T WORK AS ROOT – EVER use su / sudo to do admin stuff Beware of accidental spaces in rm –rf ./* vs rm –rf . / * Normal (non-admin) user cannot damage the system
24
File and directory permissions basics
rwx rwx rwx rwx r-x --x rwx --x rwx First part: user owner, second part: the group owner, third part: every other user Files: Read – read data from a file, Write – write data to a file Execute – execute a file (native executables, scripts in various languages) Directories: Read – list contents of directory Write – make changes to directory (create and delete files and directories within it) Execute – traverse directory (ability to „cd” to it, or specify it as part of longer path) --x will work properly in many cases r-- will not do what you want DO NOT EVER USE 777 (rwx rwx rwx) !!! Try to have as little bits set as possible SQL Server has good defaults – and it doesn’t run as root
25
What’s new in SQL Server 2017 in general?
Machine Learning Services – support for Python and R languages Automatic database tuning – regressing plan choice correction Adaptive query processing (batch mode adaptive joins, memory grant feedback, interleaved execution for MS TVF) Graph database capabilities New T-SQL functions: CONCAT_WS, TRIM, TRANSLATE, STRING_AGG(…) WITHIN GROUP (…) PREDICT function Direct import of CSV data Clusterless availability groups SELECT INTO a specific filegroup Resumable online index rebuild Online non-clustered columnstore index rebuild
26
Hidden gem SELECT * FROM sys.dm_os_enumerate_filesystem('C:\', '*’) Easily replace xp_cmdshell in many cases!
27
Q & A Thank you! @AndrzejKukula
29
Sponsors
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.