Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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
Hig...
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 ...
architecture
Linux Kernel
Linux Process
Linux Host Extension
SQL PAL Managed
SQL OS v2
SQL OS
Direct API
Win 32 like APIs
...
Install & Update
Fully managed by Linux package manager (yum, dnf, apt-get …)
Install example
Update example
$ sudo curl -...
Container
Available on DockerHub (Ubuntu based image)
For RHEL based image, feel free to use my Docker file and build from...
Tools (Linux)
sqlcmd: command line interface. Intended to execute automate script.
◦ https://docs.microsoft.com/en-us/sql/...
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...
Demo
SOSREPORT
sosreport
PR is merged to upstream.
◦ https://github.com/sosreport/sos/pull/1326
Collecting following information
◦ mssql....
Security
AD Authentication
Default authentication: password
AD authentication: password-less authentication from the AD-joined comp...
Demo
AD AUTHENTICATION
Troubleshooting
SPN configuration (setspn) in Active Directory
◦ Check with “Get-ADUser” and “setspn –l mssql” command
kli...
High Availability
Cluster/HA options
Failover Cluster Instance (FCI)
◦ Active/Standby
◦ Shared Storage: iSCSI, NFS, SMB
◦ RHEL HA Addon
Alwa...
FCI
RHEL RHEL
Shared Disk (iSCSI, NFS, SMB)
HA add on
(pacemaker, pcs)
HA add on
(pacemaker, pcs)
SQL Server
(Active)
SQL ...
AlwaysOn Availability Group
RHEL RHEL
Local Disk
HA add on
(pacemaker, pcs, fence)
HA add on
(pacemaker, pcs, fence)
SQL S...
STONITH
Shoot The Other Node In The Head (STONITH)
RHEL
HA add on
SQL Server
failover
RHEL HA add-on now
supports STONITH ...
References
de:code 2018 DA06 SQL Server 管理者におくる SQL Server on Linux Tips
docs.microsoft.com SQL Server on Linux
Technical ...
Upcoming SlideShare
Loading in …5
×

Introduction to SQL Server on RHEL

306 views

Published on

An introduction to SQL Server on Red Hat Enterprise Linux.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Introduction to SQL Server on RHEL

  1. 1. Introduction to SQL Server on RHEL @TanakaTakayoshi 2018 July ver1
  2. 2. AGENDA Quick Start SQL Server Why SQL Server on RHEL? Quick Troubleshooting Monitoring Active Directory Authentication High Availability Basis
  3. 3. DEMO RUN SQL SERVER AS A CONTAINER & CONNECT FROM SQL SERVER OPS STUDIO
  4. 4. Why SQL Server on RHEL?
  5. 5. High Performance
  6. 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. 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. 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. 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. 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/
  11. 11. Linux & Windows Linux Windows Linux Windows SQL Server SQL Server
  12. 12. Troubleshoot
  13. 13. Service, Process, Directory /opt/mssql: binary owner:root /var/opt/mssql: database file. Log file owner:mssql mssql-server service
  14. 14. Demo SOSREPORT
  15. 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
  16. 16. Security
  17. 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
  18. 18. Demo AD AUTHENTICATION
  19. 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
  20. 20. High Availability
  21. 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. 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. 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. 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. 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.

×