Let's boldly go where no DBA has gone before... and follow this procedure: https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-suse

 

zypper install -y mssql-server

 

 

Maryland:/home # zypper addrepo -fc https://packages.microsoft.com/config/sles/12/mssql-server.repo

Adding repository 'packages-microsoft-com-mssql-server' ..........................................[done]

Repository 'packages-microsoft-com-mssql-server' successfully added

 

URI         : https://packages.microsoft.com/sles/12/mssql-server

Enabled     : Yes                                          

GPG Check   : Yes                                          

Autorefresh : Yes                                          

Priority    : 99 (default priority)                        

 

Repository priorities are without effect. All enabled repositories share the same priority.

Maryland:/home # zypper --gpg-auto-import-keys refresh

Repository 'Main Repository (NON-OSS)' is up to date.                                             

Repository 'Update Repository (Non-Oss)' is up to date.                                           

Repository 'Main Repository (OSS)' is up to date.                                                 

Repository 'Main Repository (Sources)' is up to date.                                             

Retrieving repository 'Main Update Repository' metadata ..........................................[done]

Building repository 'Main Update Repository' cache ...............................................[done]

Retrieving repository 'multimedia:apps' metadata ----------------------------------------------------[/]

 

Automatically importing the following key:

 

  Repository:       multimedia:apps                                           

  Key Name:         multimedia:apps OBS Project <multimedia:apps@build.opensuse.org>

  Key Fingerprint:  78AB2296 61D3830A 08939082 868E7FC4 E95B46D4              

  Key Created:      Sat 29 Jul 2017 10:43:51 CEST                             

  Key Expires:      Mon 07 Oct 2019 10:43:51 CEST                             

  Rpm Name:         gpg-pubkey-e95b46d4-597c4ac7                              

 

 

Retrieving repository 'multimedia:apps' metadata .................................................[done]

Building repository 'multimedia:apps' cache ......................................................[done]

Retrieving repository 'multimedia:libs' metadata .................................................[done]

Building repository 'multimedia:libs' cache ......................................................[done]

Repository 'libdvdcss repository' is up to date.                                                  

Retrieving repository 'Packman Repository' metadata ..............................................[done]

Building repository 'Packman Repository' cache ...................................................[done]

Retrieving repository 'packages-microsoft-com-mssql-server' metadata --------------------------------[\]

 

Automatically importing the following key:

 

  Repository:       packages-microsoft-com-mssql-server              

  Key Name:         Microsoft (Release signing) <gpgsecurity@microsoft.com>

  Key Fingerprint:  BC528686 B50D79E3 39D3721C EB3E94AD BE1229CF     

  Key Created:      Thu 29 Oct 2015 00:21:48 CET                     

  Key Expires:      (does not expire)                                

  Rpm Name:         gpg-pubkey-be1229cf-5631588c                     

 

 

Retrieving repository 'packages-microsoft-com-mssql-server' metadata .............................[done]

Building repository 'packages-microsoft-com-mssql-server' cache ..................................[done]

All repositories have been refreshed.

Maryland:/home # zypper install -y mssql-server

Loading repository data...

Reading installed packages...

Resolving package dependencies...

 

The following 2 NEW packages are going to be installed:

  libsss_nss_idmap0 mssql-server

 

2 new packages to install.

Overall download size: 165.4 MiB. Already cached: 0 B. After the operation, additional 165.4 MiB will be

used.

Continue? [y/n/...? shows all options] (y): y

Retrieving package libsss_nss_idmap0-1.13.4-5.3.1.x86_64           (1/2),  32.1 KiB ( 18.4 KiB unpacked)

Retrieving: libsss_nss_idmap0-1.13.4-5.3.1.x86_64.rpm ............................................[done]

Retrieving package mssql-server-14.0.900.75-1.x86_64               (2/2), 165.4 MiB (165.4 MiB unpacked)

Retrieving: mssql-server-14.0.900.75-1.x86_64.rpm ....................................[done (3.2 MiB/s)]

Checking for file conflicts: .....................................................................[done]

(1/2) Installing: libsss_nss_idmap0-1.13.4-5.3.1.x86_64 ..........................................[done]

(2/2) Installing: mssql-server-14.0.900.75-1.x86_64 ..............................................[done]

Maryland:/home

 

fd@Maryland:/home> sudo /opt/mssql/bin/mssql-conf setup

Locale en_GB not supported. Using en_US.

The license terms for this product can be found in

/usr/share/doc/mssql-server or downloaded from:

https://go.microsoft.com/fwlink/?LinkId=852741

 

The privacy statement can be viewed at:

https://go.microsoft.com/fwlink/?LinkId=853010

 

Do you accept the license terms? [Yes/No]:Yes

 

 

I chose "2) Developer (free, no production use rights)"  French   sa and a password that meets the following requirements:

Regarding the "days left in the evaluation period", the procedure reassures us: "This message does not reflect the edition you selected. It relates to the preview period for RC2."

 

If I look at Ksysguard, I see that a chunk of my laptop's RAM is now being used by an unexpected process on a Linux machine.

Let's explore this new piece of sofware:

fd@Maryland:/home> systemctl status mssql-server

● mssql-server.service - Microsoft SQL Server Database Engine

   Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)

   Active: active (running) since Fri 2017-09-01 19:03:56 CEST; 6min ago

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

Main PID: 6620 (sqlservr)

   CGroup: /system.slice/mssql-server.service

           ├─6620 /opt/mssql/bin/sqlservr

           └─6645 /opt/mssql/bin/sqlservr

fd@Maryland:/home> ps aux | grep 6620

mssql     6620  0.0  0.2  89060 22604 ?        Ssl  19:03   0:00 /opt/mssql/bin/sqlservr

 

But we've only installed the database engine -- can't do much with that!  the procedure https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-suse  continues to explain how to install the tools: "to create a database, you need to connect with a tool that can run Transact-SQL statements on the SQL Server. The following steps install the SQL Server command-line tools: sqlcmd and bcp."

sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/prod.repo

sudo zypper --gpg-auto-import-keys refresh

sudo zypper --gpg-auto-import-keys refresh

 

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc

source ~/.bashrc

The simplicity of SQLServer at work:

1> create database oddsandends

2> go

1> SELECT Name from sys.Databases

2> go

Name                                                                                                                       

--------------------------------------------------------------------------------------------------------------------------------

master                                                                                                                     

tempdb                                                                                                                     

model                                                                                                                      

msdb                                                                                                                       

oddsandends

 

1> INSERT INTO meals  VALUES (1, 'lunch','cheese', 120,'g',CURRENT_TIMESTAMP)

2> go

 

(1 rows affected)

1> select * from meals

2> go

id          meal_type            food                                               quantity    unit                 moment     

----------- -------------------- -------------------------------------------------- ----------- -------------------- ----------------

          1 lunch                broccoli                                                   150 g                          2017-09-01

          1 lunch                cheese                                                     120 g                          2017-09-01

 

(2 rows affected)

 

2> go

SELECT   CASE      WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '8%' THEN 'SQL2000' WHEN CONVERT(VARCHAR(128),SERVERPROPERTY ('productversion')) like '9%' THEN 'SQL2005' WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.0%' THEN 'SQL2008' WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.5%' THEN 'SQL2008 R2' WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '11%' THEN 'SQL2012' WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '12%' THEN 'SQL2014' WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '13%' THEN 'SQL2016' ELSE 'unknown' END AS MajorVersion,   SERVERPROPERTY('ProductLevel') AS ProductLevel,SERVERPROPERTY('Edition') AS Edition,SERVERPROPERTY('ProductVersion') AS ProductVersion ;

 

MajorVersion ProductLevel                             Edition                                  ProductVersion                      

------------ ---------------------------------------- ---------------------------------------- ----------------------------------------

unknown      RC2                                      Developer Edition (64-bit)               14.0.900.75

 

But:

1> :serverlist

Server list is currently unavailable in the Linux version.