Skip to content

Commit 8753fc6

Browse files
authored
Merge pull request #479 from wdfgeekos/mbs-sql
MS SQL support statement
2 parents f45d6a9 + 2a575a1 commit 8753fc6

File tree

3 files changed

+122
-29
lines changed

3 files changed

+122
-29
lines changed

DC-SBP-SLES-SQL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ADOC_TYPE="article"
44

55
ADOC_POST="yes"
66

7-
ADOC_ATTRIBUTES="--attribute docdate=2024-11-16"
7+
ADOC_ATTRIBUTES="--attribute docdate=2025-2-16"
88

99
# stylesheets
1010
STYLEROOT=/usr/share/xml/docbook/stylesheet/sbp

adoc/SLES-SQL-server-linux.adoc

Lines changed: 83 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
:sles: SUSE Linux Enterprise Server
1616
:sqls: SQL Server
1717

18-
image:sqlserver.svg[SQL Server,400,400]
19-
2018
== Motivation
2119

2220
=== Background
@@ -51,10 +49,15 @@ Another reason may be lower negotiated pricing for Linux subscriptions to replac
5149
The guide covers a basic installation of {sqls} on {sles} including the OS tuning specific for {sqls}.
5250
It is meant to be agnostic of underlying infrastructure excepting the nuance of registering your server discussed in <<server_registration>> <<Server registration>>.
5351

52+
=== Important notice
53+
54+
include::SLES-SQL-support.adoc[tags=mvs-general;mvs-sql]
55+
5456
== Installation
5557

56-
At first, the manual installation for a stand-alone {sqls} is described by starting in <<man_inst>>.
57-
The automated installation based on Ansible is decribed in<<ansi_inst>>.
58+
At first the manual installation for a standalone {sqls} is described by starting at <<man_inst>>.
59+
60+
// The automated installation based on Ansible is decribed in<<ansi_inst>>.
5861

5962
[id="man_inst"]
6063
=== System requirements
@@ -82,17 +85,18 @@ The automated installation based on Ansible is decribed in<<ansi_inst>>.
8285
To gain access to SUSE repositories, you first need to register your server with `SUSEConnect`. If you are launching an On-Demand (or Pay-As-You-Go)
8386
instance and not a BYOS (Bring Your Own Subscription) instance at a public cloud provider, skip this step.
8487

88+
Usage of SUSE SCC if you have Internet access.
89+
90+
* SUSE https://scc.suse.com[SCC] (SUSE Customer Center)
91+
8592
[source,shell]
8693
----
8794
sudo SUSEConnect --regcode ${REGISTRATION_CODE} --email ${EMAIL_ADDRESS}
8895
----
8996

90-
9197
Alternatively, if you have access to a
9298

9399
* SUSE https://documentation.suse.com/sles/15-SP6/single-html/SLES-rmt/#book-rmt[RMT] (Repository Mirroring Tool)
94-
* or https://documentation.suse.com/suma/5.0/[SUSE Manager]
95-
* or https://scc.suse.com/[SCC] (SUSE Customer Center)
96100

97101
server you want to use, use the `--url` option instead.
98102

@@ -101,6 +105,11 @@ server you want to use, use the `--url` option instead.
101105
sudo SUSEConnect --url ${REGISTRATION_SERVER_URL}
102106
----
103107

108+
The registration procedure for SUSE Multi-Linux Manager client's are different.
109+
110+
* SUSE https://www.suse.com/products/multi-linux-manager[Multi-Linux Manager] (former known as SUMA)
111+
** https://documentation.suse.com/suma/5.0/en/suse-manager/client-configuration/registration-overview.html[Client Registration]
112+
104113
More information about registering can be found in the https://documentation.suse.com/sles/15-SP6/single-html/SLES-deployment/#sec-yast-install-scc-registration[{sles} 15 SP6 Deployment Guide].
105114

106115

@@ -147,10 +156,10 @@ To install the {sqls} package non-interactively, and the add-ons, run the follow
147156
sudo ACCEPT_EULA=Y zypper install -y mssql-server mssql-tools18 unixODBC-devel glibc-locale-base sqlcmd tuned
148157
----
149158

150-
159+
////
151160
[id="ansi_inst"]
152-
// === Automated Deployment with Ansible
153-
161+
=== Automated Deployment with Ansible
162+
////
154163

155164
== Configuration
156165

@@ -161,12 +170,10 @@ This section is covering the OS modification, the NIC configuration, the recomme
161170
==== OS configuration (CPU, Kernel, Memory)
162171

163172
[discrete]
164-
==== CPU/sysctl/disk/memory setting
165-
{sles} contains a `TuneD` profile for mssql (within the `tuned` package), but it does not align with the {sqls} best practices guide. The next steps outline and describe the changes recommended for {sqls}.
166-
Using TuneD it automatically configures CPU frequency governor, ENERGY_PERF_BIAS, and min_perf_pct settings appropriately because of the `throughput-performance` profile being used as base for the `mssql profile`.
167-
C-States parameter must be configured manually. The disk readahead section is also covered by including the file `throughput-performance`, check the settings if they are equal and skip them if not needed.
168-
169-
Create an mssql profile:
173+
==== CPU | sysctl | disk | memory setting
174+
{sles} contains a `TuneD` profile for mssql (within the `tuned` package), but it's not according to the {sqls} best practices guide. The next steps describe and line out the changes recommended for {sqls}.
175+
Using TuneD it automatically configures CPU frequency governor, ENERGY_PERF_BIAS, and min_perf_pct settings appropriately due to the `throughput-performance` profile being used as base for the `mssql profile`.
176+
C-States parameter must be configured manually. The disk readahead section is also covered by including the file `throughput-performance`, please check the settings if they are equal and skip them if not needed.
170177

171178
[source,shell]
172179
----
@@ -213,9 +220,11 @@ transparent_hugepages = madvise
213220
mssql_is_multi_instance: true
214221
----
215222

216-
Depending on the infrastructure it might be necessary that the CPU setting is disabled (for example log message: `cpu0: 'energy_perf_bias' = 'None', expected 'performance'`).
217-
This can be achieved by copying the source file `throughput-performance` and modifying it. Comment the line `energy_perf_bias=performance`. This will avoid error messages (like mentioned before) if `TuneD` is started and cannot set this parameter.
223+
Depending on the infrastructure it might be necessary that the CPU setting must be disabled (e.g. log message: `cpu0: 'energy_perf_bias' = 'None', expected 'performance'`).
224+
225+
This can be achieved by copying the source file `throughput-performance` and modifying it.
218226

227+
Comment the line `energy_perf_bias=performance`, this will avoid error messages (like mentioned before) if `TuneD` is started and can't set this parameter.
219228
[source,shell]
220229
----
221230
mkdir -p /etc/tuned/throughput-performance
@@ -556,8 +565,7 @@ Optional:
556565
firewall-cmd --permanent --add-port=135/tcp --add-port=1433/tcp && firewall-cmd --reload
557566
----
558567

559-
Check the configuration:
560-
568+
Check the configuration
561569
[source,shell]
562570
----
563571
firewall-cmd --list-ports
@@ -572,9 +580,38 @@ Use storage subsystem with appropriate IOPS, throughput, and redundancy. Based o
572580
* transaction log (mount point /log)
573581
* tempdb (mount point /tempdb)
574582

575-
The default file system for the OS is Btrfs, all others use XFS. Based on the database sizing the required disk must be provided. The example will decribe a Linux Software RAID based setup.
576-
The disks `sdb - sdh` are the partitions from the NVME storage underneath. The command `lsblk` helps to find the right partition name to build a reasonable RAID setup later and avoid having all partitions
577-
from one NVME only in the same RAID configuration.
583+
The default filesystem for OS will be btrfs all others will have xfs. Based on the database sizing the required disk must be provided. The example will decribe a Linux Software RAID based setup.
584+
The disk `sdb - sdi` are the partitions from the NVME storage underneath. The command `lsblk` helps to find the right partition name to build a reasonable RAID setup later and avoid having all partitions
585+
from only one NVME in the same RAID configuration.
586+
587+
.Example for `lsblk`
588+
[source,shell]
589+
----
590+
# lsblk
591+
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
592+
sda 8:0 0 50G 0 disk
593+
├─sda1 8:1 0 8M 0 part
594+
├─sda2 8:2 0 48G 0 part /var
595+
│ /opt
596+
│ /home
597+
│ /srv
598+
│ /root
599+
│ /usr/local
600+
│ /tmp
601+
│ /boot/grub2/x86_64-efi
602+
│ /boot/grub2/i386-pc
603+
│ /.snapshots
604+
│ /
605+
└─sda3 8:3 0 2G 0 part [SWAP]
606+
sdb 8:16 0 10G 0 disk
607+
sdc 8:32 0 10G 0 disk
608+
sdd 8:48 0 10G 0 disk
609+
sde 8:64 0 10G 0 disk
610+
sdf 8:80 0 11G 0 disk
611+
sdg 8:96 0 11G 0 disk
612+
sdh 8:112 0 12G 0 disk
613+
sdi 8:128 0 12G 0 disk
614+
----
578615

579616
INFO: The following chapter is done as `root` user, if this is not possible the `sudo` must be put in front of each command.
580617

@@ -734,7 +771,10 @@ MSSQL_MEMORY_LIMIT_MB='<some value here>' ACCEPT_EULA='Y' MSSQL_PID='Developer'
734771
WARNING: It is recommended to change the SA password later with `mssql-conf set-sa-password`
735772
or disable the history prior to configuring SQL Server with `set +o history`, and re-enabling it afterward with `set -o history` (Bash).
736773

737-
If specifying a *product key*, it must be in the form of #####-#####-#####-#####-#####, where '#' is a number or a letter.
774+
:hash: #
775+
:hash5: #####
776+
777+
If specifying a `product key`, it must be in the form of `{hash5}`-`{hash5}`-`{hash5}`-`{hash5}`-`{hash5}`, where `{hash}` is a number or a letter in summary 25.
738778

739779
- {sqls} should be started at this point. You can verify this with `systemctl status mssql-server.service`.
740780
- {sqls} listens for connections on port `1433` by default, that is a second option to verify the {sqls} is up and running.
@@ -780,7 +820,7 @@ tcp LISTEN 0 128 *:1433
780820
----
781821
sqlcmd -S mssql -U SA -P Strong\!Passw0rd -Q "SELECT @@VERSION" 2>/dev/null
782822
783-
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
823+
----------------------------------------------------------------------------------
784824
Microsoft SQL Server 2022 (RTM-CU15-GDR) (KB5046059) - 16.0.4150.1 (X64)
785825
Sep 25 2024 17:34:41
786826
Copyright (C) 2022 Microsoft Corporation
@@ -798,8 +838,9 @@ The following example moves `tempdb` from its current default location on the di
798838
MSSQLSERVER service is started, you do not need to physically move the data and log files. The files are created when the service is restarted.
799839
Until the service is restarted, tempdb continues to function in its existing location. Determine the logical file names of the tempdb database and their current location on disk.
800840
801-
Check the current location and decided if a move is required or not with `sqlcmd -S <hostname> -U SA -P <password>`:
841+
.Check the current location with `sqlcmd -S <hostname> -U SA -P <password>`
802842
843+
(decide if a move is required or not)
803844
[source,sql]
804845
----
805846
sqlcmd -S mssql -U SA -P Strong\!Passw0rd
@@ -993,7 +1034,7 @@ To start Azure Data Studio run the command on your shell:
9931034
azuredatastudio
9941035
----
9951036

996-
image:azure-data-studio.png[Azure Data Studio,480,360,scaledwidth=90%]
1037+
image:azure-data-studio.png[Azure Data Studio,480,360,float="right",align="center"]
9971038

9981039
With `Create a connection` the {sqls} can be added. A pop-up window is asking for the required parameter. The connection can be established to a single node or the virtual IP of a cluster setup.
9991040

@@ -1202,8 +1243,15 @@ To stay up to date on the latest SQL Server on Linux features, bookmark https://
12021243
[id="password_requirements"]
12031244
=== SQL Server password requirements
12041245
1246+
<<<<<<< HEAD
1247+
Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.
1248+
When password complexity policy is enforced, new passwords must meet the following guidelines:
1249+
1250+
* The password doesn't contain the account name of the user.
1251+
=======
12051252
Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords. When password complexity policy is enforced, new passwords must meet the following guidelines:
12061253
* The password does not contain the account name of the user.
1254+
>>>>>>> main
12071255
* The password is at least eight characters long.
12081256
* The password contains characters from three of the following four categories:
12091257
** Latin uppercase letters (A through Z)
@@ -1216,9 +1264,16 @@ Passwords can be up to 128 characters long. Use passwords that are as long and c
12161264
=== Security limitations of SQL Server on Linux
12171265
12181266
SQL Server on Linux currently has the following limitations:
1267+
<<<<<<< HEAD
1268+
1269+
* A standard password policy is provided. `MUST_CHANGE` is the only option you might configure. The `CHECK_POLICY` option isn't supported.
1270+
* Extensible Key Management isn't supported.
1271+
* SQL Server authentication mode can't be disabled.
1272+
=======
12191273
* A standard password policy is provided. `MUST_CHANGE` is the only option you might configure. The `CHECK_POLICY` option is not supported.
12201274
* Extensible Key Management is not supported.
12211275
* SQL Server authentication mode cannot be disabled.
1276+
>>>>>>> main
12221277
* Password expiration is hard-coded to 90 days if you use SQL Server authentication.
12231278
* Using keys stored in the Azure Key Vault is not supported.
12241279
* SQL Server generates its own self-signed certificate for encrypting connections. SQL Server can be configured to use a user provided certificate for TLS.
@@ -1266,7 +1321,7 @@ lspci |grep balloon
12661321
=== References
12671322
12681323
* https://documentation.suse.com/sles/15-SP6/[SUSE Linux Enterprise Server 15 SP6]
1269-
* https://documentation.suse.com/suma/5.0/[SUSE Manager 5.0 Documentation]
1324+
* https://www.suse.com/products/multi-linux-manager[SUSE Multi-Linux Manager]
12701325
* https://documentation.suse.com/sles/15-SP6/single-html/SLES-rmt/#book-rmt[Repository Mirroring Tool Guide]
12711326
* https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-ver16[Installation guidance for SQL Server on Linux]
12721327
* https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-suse?view=sql-server-ver16[Quickstart: Install SQL Server and create a database on SUSE Linux Enterprise Server]

adoc/SLES-SQL-support.adoc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//multi vendor solution (mvs)
2+
3+
# tag::mvs-general[]
4+
5+
==== Multi Vendor solution
6+
7+
This section will provided some advise how to handle business critical solutions where multiple vendors are involved.
8+
9+
# end::mvs-general[]
10+
11+
# tag::mvs-sql[]
12+
13+
==== SUSE and Microsoft SQL Server
14+
15+
The solution in this guide requires a support contract for both products. With SUSE (valid and active subscription) for the operating system and with Microsoft a license for MS SQL Server.
16+
17+
Details about the SUSE subscriptions can be found here:
18+
19+
* https://www.suse.com/support/
20+
21+
Details about the SQL Server licensing can be found here:
22+
23+
* https://www.microsoft.com/en-us/sql-server/sql-server-2022-pricing
24+
* https://www.microsoft.com/licensing/docs/view/SQL-Server
25+
26+
In case your infrastructure is running in a public cloud environment, your CSP (cloud service provider) may have different support contract offerings.
27+
28+
* BYOS ( = SUSE Subscription + support for OS)
29+
* PAYG ( = only CSP support for OS)
30+
31+
In case of support is required: Depending on the support contract, a decision must be made.
32+
33+
[discrete]
34+
.Support from Microsoft
35+
A collection support channels can be found here:
36+
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/install/windows/support-policy-sql-server#obtain-support-from-microsoft
37+
38+
# end::mvs-sql[]

0 commit comments

Comments
 (0)