sql server on linux fundamentals for dbas · docker engine 1.8+ command what it does ......

40

Upload: others

Post on 23-May-2020

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 3: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 4: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

Choice

Containers

Page 5: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 6: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

Platform

Supported

version(s)

Red Hat Enterprise Linux 7.3 or 7.4

SUSE Linux Enterprise Server v12 SP2

Ubuntu 16.04

Docker Engine 1.8+

Page 7: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

Command What it does

man Manual – help files for a command

grep Filter info from first data - sort of like POSH |

pwd Present Working Directory – shows where you

are

cd Change directory

ls List files in a directory

cat Concatenate

chmod Change directory or file read/write permissions

chown Change directory or file owner

systemctl Tool for controlling the init system – start and

stop services

Page 8: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

File and folder permissions

rwxr-xr-x

Page 9: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

sudo systemctl restart mssql-server

Page 10: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

/ root (equivalent of C:\)

/bin system binaries

/dev devices

/etc host-specific system-wide config files

/home/username user's directory

/opt optional software packages - like SQL Server

/var files with frequently varying content – like data and

log files

Page 11: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 12: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 13: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 14: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 15: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 16: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 17: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 18: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 19: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 20: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 21: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

Preview (2019) mssql-server-preview

SQL Server 2019 preview and RC

repository.

CU - base package + bug

fixes mssql-server-2017

SQL Server 2017 Cumulative Update

(CU) repository.

GDR - base package + critical

fixes/security updates mssql-server-2017-gdr

SQL Server 2017 GDR repository for

critical updates only.

Page 22: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 23: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 24: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

sudo dpkg -i mssql-server_versionnumber_amd64.deb

Page 25: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 26: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 27: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 28: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 29: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

sqlcmd -S localhost -U <username> -P <password>

Page 30: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

sudo cat /var/opt/mssql/mssql.conf

sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled

true

Page 31: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

Enable SQL Server Agent

Change default file directories

Enable Availability Groups

Set the memory limit for SQL Server

Set trace flags

...and more

Page 32: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 33: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

df file system disk usage

dstat system statistics - sort of like

PerfMon!

free free and used memory

htop interactive process viewer

iostat CPU and I/O statistics

mpstat processor-related statistics

pidstat statistics for tasks

Page 34: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 35: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

https://www.digitalocean.com/community/tutorials/an-introduction-

to-linux-basics

https://www.certdepot.net/rhel7-get-

started-cpu-governor/

https://www.thegeekdiary.com/understanding-automatic-numa-

balancing/

https://www.linux.com/learn/understanding-linux-file-permissions

Page 36: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

https://docs.microsoft.com/en-us/sql/linux/sql-server-

linux-performance-best-practices?view=sql-server-2017

https://blogs.msdn.microsoft.com/bobsql/2018/12/10/sql-server-

instant-file-initialization-setfilevaliddata-windows-vs-fallocate-linux/

https://docs.microsoft.com/en-us/sql/linux/sql-

server-linux-setup?view=sql-server-2017#platforms

https://docs.microsoft.com/en-us/sql/linux/sql-server-

linux-setup?view=sql-server-2017#offline

Page 37: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates

https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-

mssql-conf?view=sql-server-2017

https://github.com/Microsoft/DiagManager/tree/master/LinuxPSSDiag

https://techcommunity.microsoft.com/t5/DataCAT/How-the-SQLCAT-

Customer-Lab-is-Monitoring-SQL-on-Linux/ba-p/305467

https://github.com/Microsoft/mssql-monitoring

Page 38: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates
Page 39: SQL Server on Linux Fundamentals for DBAs · Docker Engine 1.8+ Command What it does ... fixes/security updates mssql-server-2017-gdr SQL Server 2017 GDR repository for critical updates