Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to SQL Server 2017 on Linux

Similar presentations


Presentation on theme: "Introduction to SQL Server 2017 on Linux"— Presentation transcript:

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 Trainer, Consultant Architect of HA/DR Solutions, BI Solutions, Data Platform Solutions, Cloud Solutions Building proficiency in AI/ML and Data Science MCSE, MCITP, MCTS Certified 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 going to be available for Windows, Linux and Docker GA is expected in CY 2017

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 R Server on Linux Linux in Azure SQL Server drivers and connectivity Visual Studio Code extension for SQL Server .NET Core (2.0 now) PowerShell 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 (free) Evaluation (free) Preview is 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 Containers Windows Windows Server

10 SQL Tools for SQL Server on Linux

11 What’s already working?
Programming Features Support for RHEL, Ubuntu, Docker Package based installs, Docker image Support for Open Shift, Docker Swarm Failover Clustering through Pacemaker Backup/Restore SSMS on Windows connected to Linux Command line tools: sqlcmd, bcp, sqlpackage SQL Agent Replication Log Shipping Transparent Data Encryption SCOM Management Pack DMVs Full Text Search Operations Features All major language driver compatibility In memory OLTP and ColumnStore Compression Always Encrypted, Row Level Security, and Data Masking Service Broker Change Data Capture Partitioning Auditing CLR JSON, XML Third party tools …and more!

12 What’s coming – HA/DR Simple HADR VM Failure Backup/Restore
Resilience against guest & OS level failures Planned & unplanned events Minimum downtime for patching and upgrades Minutes RTO Simple HADR VM Failure Protection against accidental or malicious data corruption DR protection Minutes to hours RTO Backup/Restore Instance level protection Automatic failure detection & failover Seconds to minutes RTO Resilience against OS and SQL Server failures Standard HADR Failover Cluster AG with 2 replicas Basic Availability Groups* Warm standbys for DR Log Shipping Database level protection Seconds RTO No data loss Recover from unplanned outage No downtime for planned maintenance Offload read/backup workload to active secondaries Failover to geographically distributed secondary site Availability Groups* Mission-Critical HADR *In progress

13 SQL Server 2017 Failover Cluster on Linux

14 Integration Services IS for Linux is available since CTP dtexec tool for package execution

15 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

16 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)

17 Installation demo Minimum RAM requirement (for CTP): 3.5 GB Installation from packages

18 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)

19 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

20 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

21 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!

22 SQL Server on Linux - monitoring
collectd, InfluxDB, Grafana

23 Migration options backup/restore BACPAC SQL Server Migration Assistant bcp SSIS

24 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

25 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

26 What’s new in SQL Server 2017 in general?
SQL Server 2017 Machine Learning Services – support for Python language Automatic database tuning Graph database capabilities New T-SQL functions: CONCAT_WS, TRIM, TRANSLATE, STRING_AGG(…) WITHIN GROUP (…) Direct import of CSV data Clusterless availability groups SELECT INTO a specific filegroup Resumable online index rebuild

27 Q & A Thank you! @AndrzejKukula

28 Sponsors


Download ppt "Introduction to SQL Server 2017 on Linux"

Similar presentations


Ads by Google