SlideShare a Scribd company logo
1 of 25
Introduction to
SQL Server on RHEL
@TanakaTakayoshi
2018 July ver1
AGENDA
Quick Start SQL Server
Why SQL Server on RHEL?
Quick Troubleshooting
Monitoring
Active Directory Authentication
High Availability Basis
DEMO
RUN SQL SERVER AS A CONTAINER & CONNECT FROM
SQL SERVER OPS STUDIO
Why SQL Server on
RHEL?
High Performance
Supported Platform
Windows Server/Windows Desktop
Red Hat Enterprise Linux 7.3+
SUSE Enterprise Linux SLES v12 SP2
Ubuntu 16.04 LTS
Docker:
◦ Windows & Linux (Ubuntu) image
◦ RHEL base image is planning via Microsoft Container Catalog (MCR)
https://docs.microsoft.com/en-us/sql/sql-server/install/hardware-and-software-requirements-
for-installing-sql-server?view=sql-server-2017
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-linux-
2017&viewFallbackFrom=sql-server-2017#system
https://azure.microsoft.com/en-us/blog/microsoft-syndicates-container-catalog/
architecture
Linux Kernel
Linux Process
Linux Host Extension
SQL PAL Managed
SQL OS v2
SQL OS
Direct API
Win 32 like APIs
Software Isolated Process
SQL Server Database Engine SSIS
Linux OS call
ABI call
Install & Update
Fully managed by Linux package manager (yum, dnf, apt-get …)
Install example
Update example
$ sudo curl -o /etc/yum.repos.d/mssql-server.repo 
https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
$ sudo yum install -y mssql-server
$ sudo /opt/mssql/bin/mssql-conf setup
$ sudo yum update mssql-server
Container
Available on DockerHub (Ubuntu based image)
For RHEL based image, feel free to use my Docker file and build from scratch.
https://github.com/tanaka-takayoshi/mssql-docker-rhel
$ sudo docker pull microsoft/mssql-server-linux:2017-latest
$ sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' 
-p 1433:1433 --name sql1 
-d microsoft/mssql-server-linux:2017-latest
$ sudo docker exec -it sql1 "bash"
# /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<YourNewStrong!Passw0rd>'
Tools (Linux)
sqlcmd: command line interface. Intended to execute automate script.
◦ https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-
linux-2017
bcp: command line data import/export
◦ https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-migrate-bcp?view=sql-server-
linux-2017
mssql-cli (preview): dialog query execute with CLI.
◦ https://github.com/dbcli/mssql-cli
Visual Studio Code Extension: Query with auto completion & execution.
◦ https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode?view=sql-
server-linux-2017
SQL Operation Studio: x-platform GUI management tool
◦ https://github.com/microsoft/sqlopsstudio/
Linux & Windows
Linux
Windows
Linux
Windows
SQL
Server
SQL
Server
Troubleshoot
Service, Process, Directory
/opt/mssql: binary owner:root
/var/opt/mssql: database file. Log file owner:mssql
mssql-server service
Demo
SOSREPORT
sosreport
PR is merged to upstream.
◦ https://github.com/sosreport/sos/pull/1326
Collecting following information
◦ mssql.conf
◦ Logs
◦ keytab when AD authentication enabled
Security
AD Authentication
Default authentication: password
AD authentication: password-less authentication from the AD-joined computer/user
◦ Requires Active Directory rather than LDAP
◦ Administrator can centralize user identity management in to AD.
https://docs.microsoft.com/ja-jp/sql/linux/sql-server-linux-active-directory-
authentication?view=sql-server-linux-2017
Demo
AD AUTHENTICATION
Troubleshooting
SPN configuration (setspn) in Active Directory
◦ Check with “Get-ADUser” and “setspn –l mssql” command
klist command with Keytab file in SQL Server on RHEL server
◦ klist -e -k /var/opt/mssql/secrets/mssql.keytab
Kerberos (id, kinit) in client RHEL
◦ klist shows the user credential.
SSSD logs
◦ Check sosreport
Debug logging
◦ Add /var/opt/mssql/logger.ini
[Output:File]
Type = File
Filename = /var/opt/mssql/log/trace.log
[Output:SecFile]
Type = File
Filename = /var/opt/mssql/log/security.log
[Logger]
Level = Debug
Outputs = File
[Logger.security.kerberos]
Level = Debug
Outputs = SecFile
High Availability
Cluster/HA options
Failover Cluster Instance (FCI)
◦ Active/Standby
◦ Shared Storage: iSCSI, NFS, SMB
◦ RHEL HA Addon
AlwaysOn Availability Groups
◦ Primary/Secondary (and more). Read Replica can be included.
◦ Local Storage
◦ RHEL HA Addon
High Availability on kubernetes/OpenShift
◦ Will be released.
◦ Kubernetes/OpenShift integrated HA service
FCI
RHEL RHEL
Shared Disk (iSCSI, NFS, SMB)
HA add on
(pacemaker, pcs)
HA add on
(pacemaker, pcs)
SQL Server
(Active)
SQL Server
(Standby)
AlwaysOn Availability Group
RHEL RHEL
Local Disk
HA add on
(pacemaker, pcs, fence)
HA add on
(pacemaker, pcs, fence)
SQL Server
(Primary)
SQL Server
(Secondary)
Local Disk
VIP
STONITH
Shoot The Other Node In The Head (STONITH)
RHEL
HA add on
SQL Server
failover
RHEL HA add-on now
supports STONITH (fence
operation) on Azure.
References
de:code 2018 DA06 SQL Server 管理者におくる SQL Server on Linux Tips
docs.microsoft.com SQL Server on Linux
Technical support policy for Microsoft SQL Server
Support Policies for RHEL High Availability Clusters
mssql-server-ha GitHub repository
Microsoft Build 2018 Enhancing DevOps with SQL Server on Linux + containers
Microsoft Build 2018 Looking ahead with SQL Operations Studio
SQL Server on Linux : Troubleshooting tips and tricks
SQL Server on Linux Engineering Town Hall
◦ Please google and register. Then you can see videos on demand.

More Related Content

What's hot

OpenStack keystone identity service
OpenStack keystone identity serviceOpenStack keystone identity service
OpenStack keystone identity service
openstackindia
 

What's hot (20)

IIS Cookbook
IIS CookbookIIS Cookbook
IIS Cookbook
 
OpenStack keystone identity service
OpenStack keystone identity serviceOpenStack keystone identity service
OpenStack keystone identity service
 
Midwest PHP Presentation - New MSQL Features
Midwest PHP Presentation - New MSQL FeaturesMidwest PHP Presentation - New MSQL Features
Midwest PHP Presentation - New MSQL Features
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
 
Keystone: Federated
Keystone: FederatedKeystone: Federated
Keystone: Federated
 
Database change management with Liquibase
Database change management with LiquibaseDatabase change management with Liquibase
Database change management with Liquibase
 
Manual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLManual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQL
 
Elastic beanstalk
Elastic beanstalkElastic beanstalk
Elastic beanstalk
 
Projects and Tasks
Projects and TasksProjects and Tasks
Projects and Tasks
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
Liquibase
LiquibaseLiquibase
Liquibase
 
Weblogic Administration Managed Server migration
Weblogic Administration Managed Server migrationWeblogic Administration Managed Server migration
Weblogic Administration Managed Server migration
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with Docker
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
 
Glassfish AP server 連結 oracle DB 11g
Glassfish AP server 連結 oracle DB 11gGlassfish AP server 連結 oracle DB 11g
Glassfish AP server 連結 oracle DB 11g
 
Cloudera and Spark setup
Cloudera and Spark setupCloudera and Spark setup
Cloudera and Spark setup
 
Secure Keystone Deployment
Secure Keystone DeploymentSecure Keystone Deployment
Secure Keystone Deployment
 
Don't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadDon't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 Instead
 
Li liq liqui liquibase
Li liq liqui liquibaseLi liq liqui liquibase
Li liq liqui liquibase
 
MySQL on Docker and Kubernetes
MySQL on Docker and KubernetesMySQL on Docker and Kubernetes
MySQL on Docker and Kubernetes
 

Similar to Introduction to SQL Server on RHEL

Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 EditionEnter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
Mark Broadbent
 

Similar to Introduction to SQL Server on RHEL (20)

Tech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on LinuxTech-Spark: SQL Server on Linux
Tech-Spark: SQL Server on Linux
 
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 EditionEnter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
 
SQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux IntroductionSQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux Introduction
 
The roadmap for sql server 2019
The roadmap for sql server 2019The roadmap for sql server 2019
The roadmap for sql server 2019
 
SQL on linux
SQL on linuxSQL on linux
SQL on linux
 
Bootcamp 2017 - SQL Server on Linux
Bootcamp 2017 - SQL Server on LinuxBootcamp 2017 - SQL Server on Linux
Bootcamp 2017 - SQL Server on Linux
 
SQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux IntroductionSQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux Introduction
 
Gab17 lyon SQL on Linux - David BARBARIN
Gab17 lyon SQL on Linux - David BARBARINGab17 lyon SQL on Linux - David BARBARIN
Gab17 lyon SQL on Linux - David BARBARIN
 
Nordic infrastructure Conference 2017 - SQL Server on Linux Overview
Nordic infrastructure Conference 2017 - SQL Server on Linux OverviewNordic infrastructure Conference 2017 - SQL Server on Linux Overview
Nordic infrastructure Conference 2017 - SQL Server on Linux Overview
 
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
SQL Server vNext on Linux
SQL Server vNext on LinuxSQL Server vNext on Linux
SQL Server vNext on Linux
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
 
Day2
Day2Day2
Day2
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
Linux Experience for Herman
Linux Experience for HermanLinux Experience for Herman
Linux Experience for Herman
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and docker
 

More from Takayoshi Tanaka

.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
Takayoshi Tanaka
 

More from Takayoshi Tanaka (20)

deep dive distributed tracing
deep dive distributed tracingdeep dive distributed tracing
deep dive distributed tracing
 
202202 open telemetry .net handson
202202 open telemetry .net handson202202 open telemetry .net handson
202202 open telemetry .net handson
 
202109-New_Relic-for-csharp-engineers
202109-New_Relic-for-csharp-engineers202109-New_Relic-for-csharp-engineers
202109-New_Relic-for-csharp-engineers
 
20210129 azure webapplogging
20210129 azure webapplogging20210129 azure webapplogging
20210129 azure webapplogging
 
20201127 .NET 5
20201127 .NET 520201127 .NET 5
20201127 .NET 5
 
Unity(再)入門
Unity(再)入門Unity(再)入門
Unity(再)入門
 
最近のQ#について
最近のQ#について最近のQ#について
最近のQ#について
 
SRENEXT 2020 [B5] New RelicのSREに学ぶ SREのためのNew Relic活用法
SRENEXT 2020 [B5] New RelicのSREに学ぶSREのためのNew Relic活用法SRENEXT 2020 [B5] New RelicのSREに学ぶSREのためのNew Relic活用法
SRENEXT 2020 [B5] New RelicのSREに学ぶ SREのためのNew Relic活用法
 
20191024 Get Start gRPC with ASP.NET
20191024 Get Start gRPC with ASP.NET20191024 Get Start gRPC with ASP.NET
20191024 Get Start gRPC with ASP.NET
 
New Relicで始める、.NET Applications on AWSのObservability
New Relicで始める、.NET Applications on AWSのObservabilityNew Relicで始める、.NET Applications on AWSのObservability
New Relicで始める、.NET Applications on AWSのObservability
 
C#エンジニアのためのdocker kubernetesハンズオン (再)
C#エンジニアのためのdocker kubernetesハンズオン (再)C#エンジニアのためのdocker kubernetesハンズオン (再)
C#エンジニアのためのdocker kubernetesハンズオン (再)
 
20190806 Q# Measurements
20190806 Q# Measurements20190806 Q# Measurements
20190806 Q# Measurements
 
C#エンジニアのためのdocker kubernetesハンズオン
C#エンジニアのためのdocker kubernetesハンズオンC#エンジニアのためのdocker kubernetesハンズオン
C#エンジニアのためのdocker kubernetesハンズオン
 
20190604 Containerized MagicOnion on kubernetes with Observability with New R...
20190604 Containerized MagicOnion on kubernetes with Observability with New R...20190604 Containerized MagicOnion on kubernetes with Observability with New R...
20190604 Containerized MagicOnion on kubernetes with Observability with New R...
 
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
 
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
 
Try! Visual Studio 209 git feature
Try! Visual Studio 209 git featureTry! Visual Studio 209 git feature
Try! Visual Studio 209 git feature
 
Q#基礎 ver1.1
Q#基礎 ver1.1Q#基礎 ver1.1
Q#基礎 ver1.1
 
(過去バージョン) Q#基礎 ver1.0
(過去バージョン) Q#基礎 ver1.0(過去バージョン) Q#基礎 ver1.0
(過去バージョン) Q#基礎 ver1.0
 
ゼロから始めるQ#
ゼロから始めるQ#ゼロから始めるQ#
ゼロから始めるQ#
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Introduction to SQL Server on RHEL

  • 1. Introduction to SQL Server on RHEL @TanakaTakayoshi 2018 July ver1
  • 2. AGENDA Quick Start SQL Server Why SQL Server on RHEL? Quick Troubleshooting Monitoring Active Directory Authentication High Availability Basis
  • 3. DEMO RUN SQL SERVER AS A CONTAINER & CONNECT FROM SQL SERVER OPS STUDIO
  • 4. Why SQL Server on RHEL?
  • 6. Supported Platform Windows Server/Windows Desktop Red Hat Enterprise Linux 7.3+ SUSE Enterprise Linux SLES v12 SP2 Ubuntu 16.04 LTS Docker: ◦ Windows & Linux (Ubuntu) image ◦ RHEL base image is planning via Microsoft Container Catalog (MCR) https://docs.microsoft.com/en-us/sql/sql-server/install/hardware-and-software-requirements- for-installing-sql-server?view=sql-server-2017 https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-linux- 2017&viewFallbackFrom=sql-server-2017#system https://azure.microsoft.com/en-us/blog/microsoft-syndicates-container-catalog/
  • 7. architecture Linux Kernel Linux Process Linux Host Extension SQL PAL Managed SQL OS v2 SQL OS Direct API Win 32 like APIs Software Isolated Process SQL Server Database Engine SSIS Linux OS call ABI call
  • 8. Install & Update Fully managed by Linux package manager (yum, dnf, apt-get …) Install example Update example $ sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo $ sudo yum install -y mssql-server $ sudo /opt/mssql/bin/mssql-conf setup $ sudo yum update mssql-server
  • 9. Container Available on DockerHub (Ubuntu based image) For RHEL based image, feel free to use my Docker file and build from scratch. https://github.com/tanaka-takayoshi/mssql-docker-rhel $ sudo docker pull microsoft/mssql-server-linux:2017-latest $ sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 --name sql1 -d microsoft/mssql-server-linux:2017-latest $ sudo docker exec -it sql1 "bash" # /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<YourNewStrong!Passw0rd>'
  • 10. Tools (Linux) sqlcmd: command line interface. Intended to execute automate script. ◦ https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server- linux-2017 bcp: command line data import/export ◦ https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-migrate-bcp?view=sql-server- linux-2017 mssql-cli (preview): dialog query execute with CLI. ◦ https://github.com/dbcli/mssql-cli Visual Studio Code Extension: Query with auto completion & execution. ◦ https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode?view=sql- server-linux-2017 SQL Operation Studio: x-platform GUI management tool ◦ https://github.com/microsoft/sqlopsstudio/
  • 13. Service, Process, Directory /opt/mssql: binary owner:root /var/opt/mssql: database file. Log file owner:mssql mssql-server service
  • 15. sosreport PR is merged to upstream. ◦ https://github.com/sosreport/sos/pull/1326 Collecting following information ◦ mssql.conf ◦ Logs ◦ keytab when AD authentication enabled
  • 17. AD Authentication Default authentication: password AD authentication: password-less authentication from the AD-joined computer/user ◦ Requires Active Directory rather than LDAP ◦ Administrator can centralize user identity management in to AD. https://docs.microsoft.com/ja-jp/sql/linux/sql-server-linux-active-directory- authentication?view=sql-server-linux-2017
  • 19. Troubleshooting SPN configuration (setspn) in Active Directory ◦ Check with “Get-ADUser” and “setspn –l mssql” command klist command with Keytab file in SQL Server on RHEL server ◦ klist -e -k /var/opt/mssql/secrets/mssql.keytab Kerberos (id, kinit) in client RHEL ◦ klist shows the user credential. SSSD logs ◦ Check sosreport Debug logging ◦ Add /var/opt/mssql/logger.ini [Output:File] Type = File Filename = /var/opt/mssql/log/trace.log [Output:SecFile] Type = File Filename = /var/opt/mssql/log/security.log [Logger] Level = Debug Outputs = File [Logger.security.kerberos] Level = Debug Outputs = SecFile
  • 21. Cluster/HA options Failover Cluster Instance (FCI) ◦ Active/Standby ◦ Shared Storage: iSCSI, NFS, SMB ◦ RHEL HA Addon AlwaysOn Availability Groups ◦ Primary/Secondary (and more). Read Replica can be included. ◦ Local Storage ◦ RHEL HA Addon High Availability on kubernetes/OpenShift ◦ Will be released. ◦ Kubernetes/OpenShift integrated HA service
  • 22. FCI RHEL RHEL Shared Disk (iSCSI, NFS, SMB) HA add on (pacemaker, pcs) HA add on (pacemaker, pcs) SQL Server (Active) SQL Server (Standby)
  • 23. AlwaysOn Availability Group RHEL RHEL Local Disk HA add on (pacemaker, pcs, fence) HA add on (pacemaker, pcs, fence) SQL Server (Primary) SQL Server (Secondary) Local Disk VIP
  • 24. STONITH Shoot The Other Node In The Head (STONITH) RHEL HA add on SQL Server failover RHEL HA add-on now supports STONITH (fence operation) on Azure.
  • 25. References de:code 2018 DA06 SQL Server 管理者におくる SQL Server on Linux Tips docs.microsoft.com SQL Server on Linux Technical support policy for Microsoft SQL Server Support Policies for RHEL High Availability Clusters mssql-server-ha GitHub repository Microsoft Build 2018 Enhancing DevOps with SQL Server on Linux + containers Microsoft Build 2018 Looking ahead with SQL Operations Studio SQL Server on Linux : Troubleshooting tips and tricks SQL Server on Linux Engineering Town Hall ◦ Please google and register. Then you can see videos on demand.

Editor's Notes

  1. [TODO] Run docker opsstudio-2018-06-18_16.52.57.mp4 https://1drv.ms/v/s!AqwIyH6ypmaykOEuEVJe5cIOQXOZ1g Let’s start with a quick demo, I’m running SQL Server container and connect with Operation Studio.
  2. Why SQL Server is being used by so many users?
  3. SQL Server shows the highest performance in TPC-H. Linux shows slightly higher performance than Windows, but the difference is expected to be reduved in the future release.
  4. The latest SQL Server supports Windows Server and various Linux distribution. It also supports docker image. Right now the image is based on Windows Server and Ubuntu Server. RHEL based image will be released.
  5. Red Hat users can get benefits when using SQL Server on Linux. RHEL is a supported OS and records the 2nd highest performance. Red Hat and Microsoft provide the Integrated Support. SQL Server features depend on Red Hat packages. For example, SQL Server HA depends on Red Hat HA add on. Active Directory authentication depends on ldaps client.
  6. This diagram shows how SQL Server process works on Linux. SQL Server binaries are same as Windows. They run as a software isolated process. To run on multiple platform, SQL Server team decided to introduce an platform abstraction layer, called SQL PAL. SQL PAL is created with SQL Operating System and Drawbridge. SQL Operation system is an existing layer on SQL Server on Windows for performance. Drawbridge is a research project for new type of application virtualization. SQL PAL is launched by Linux Host Extension, which is the groups of Linux native binary.
  7. It’s fully managed by Linux package manager to install and update SQL Server on Linux. For RHEL, add a package repository and run yum command. For the initial configuration, you can run mssql-conf command.
  8. As I demonstrated in the beginning, SQL Server can run as a container. The official image is available on Docker Hub and based on Ubuntu. Microsoft and Red Hat will provide the RHEL based image in the future. If you want to run right now, I have created a docker file.
  9. Regarding the client tools on Linux, SQLCMD is the basic CLI tool. However, it’s not easy to use for executing SQL manually, mssql-cli is now developing. For the GUI tool, Visual Studio Code extension is available for developers. SQL Operation studio is a GUI based management tool.
  10. These client tools on Linux are available for SQL Server running on Windows. Or, client tools on Windows such as SQL Server Data Tools are available for SQL Server running on Linux.
  11. We ‘re sometimes asked about “Azure SQL Database”. Azure SQL Database is a “SQL Server” as a Service on Azure. Microsoft says near 100% compatibility, but not ensured. We sometimes see “Managed Instance”, which is an optional service for more on-premised like service. Microsoft also provides MySQL and PostgreSQL as a Service, called Azure Databse for MySQL or PostgreSQL,
  12. The binaries are located at /opt/mssql directory. Root has an ownership. Database files and log files are located at /var/opt/mssql. Mssql user has an ownership. MSSQL user is created during install and configuration process. You don’t have to create or modify it and not recommended to do so. The service name is mssql-server.
  13. I’ll show how to collect information with sosreport.
  14. This plugin is not available at the current stable release. Since the pull request has been merged into the upstream master, it will be available at the next release.
  15. https://1drv.ms/u/s!AqwIyH6ypmaykOI-lhmJ9YWHHc_nIQ SQLServeronRHEL-ADAuth.mp4