Das Konfigurations-Setup von MS SQL unter Ubuntu 18.04 funktioniert nicht wie erwartet

Das Konfigurations-Setup von MS SQL unter Ubuntu 18.04 funktioniert nicht wie erwartet

Ich versuche, MS SQL Server auf Ubuntu 18.04 zu installieren. Alles lief gut, bis ich

sudo /opt/mssql/bin/mssql-conf setup

Zuerst bekam ich:

usermod: no changes
Choose an edition of SQL Server:
  1) Evaluation (free, no production use rights, 180-day limit)
  2) Developer (free, no production use rights)
  3) Express (free)
  4) Web (PAID)
  5) Standard (PAID)
  6) Enterprise (PAID)
  7) Enterprise Core (PAID)
  8) I bought a license through a retail sales channel and have a product key to enter.

Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x409

Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.

Enter your edition(1-8): 2
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x409

The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409

Enter the SQL Server system administrator password:

Ich habe 2) Entwickler gewählt, das SA-Passwort eingerichtet (und bestätigt), nachdem ich folgende Meldungen erhalten habe:

Configuring SQL Server...

This is an evaluation version.  There are [155] days left in the evaluation period.
This program has encountered a fatal error and cannot continue running at 
Sun Mar 24 18:42:36 2019
The following diagnostic information is available:

       Reason: 0x00000007
      Message: Cannot open or read the persistent registry: \SystemRoot\security.hiv.
      Process: 5172 - sqlservr
       Thread: 5176 (application thread 0x4)
  Instance Id: c5829295-47bb-4e81-9889-5a20fd444087
     Crash Id: c2863467-bd75-467c-b954-3ae7f2474296
  Build stamp: c086a7e8c128fab0a270cb245183bad3f01b6afc6e38b5bc449a12e8fedc1cd1
 Distribution: Ubuntu 18.04.2 LTS
   Processors: 4
 Total Memory: 3296792576 bytes
    Timestamp: Sun Mar 24 18:42:36 2019

Ubuntu 18.04.2 LTS
Capturing core dump and information to /var/opt/mssql/log...
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
No journal files were opened due to insufficient permissions.
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
No journal files were opened due to insufficient permissions.
/usr/bin/tail: cannot open '/var/log/syslog' for reading: Permission denied
Attempting to capture a dump with paldumper
Captured a dump with paldumper
Core dump and information are being compressed in the background. When
complete, they can be found in the following location:
  /var/opt/mssql/log/core.sqlservr.03_24_2019_18_42_37.5172.tbz2
Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
in /var/opt/mssql/log for more information.

Ich kann nicht herausfinden, wo es schief gelaufen ist.

Antwort1

Weitere Informationen finden Sie in

/var/opt/mssql/log

Meiner sagte:

{
    "reason": "0x00000007",
    "processName": "sqlservr",
    "pid": "5773",
    "instanceId": "d7df749c-50e6-4f3b-b894-2aa7c743f33d",
    "crashId": "281e772a-5946-4349-aa9e-671cd0a3772c",
    "threadId": "5777",
    "libosThreadId": "0x4",
    "buildStamp": "70437f6583b8ef39b1ef70539ef84690980315dc7a4436c9c40015f28610e4aa",
    "message": "Cannot open or read the persistent registry: \\SystemRoot\\lsa.hiv.",
    "last_errno": "13",
    "last_errno_text": "Permission denied",
    "distribution": "Ubuntu 16.04.6 LTS",
    "processors": "4",
    "total_memory": "16732037120",
    "timestamp": "Fri Apr 12 22:02:44 2019"
}

Also habe ich „locate“ ausgeführt, um zu sehen, wo systemrootsich befindet:

locate security.hiv
/var/opt/mssql/.system/system/security.hiv

Ich wusste nicht, welche Berechtigungen angewendet werden sollten, also habe ich einfach Lese- und Schreibberechtigungen erteilt others.

Dann das gleiche mit:

lsa.hiv
licensing.hiv

Erneut ausgeführt:

sudo /opt/mssql/bin/mssql-conf setup

Und dann startet der SQL-Server und die Berechtigungen für andere sind wieder weg.

Übrigens kann man den SQL Server auch ohne Dienst laufen lassen, dann funktioniert er auch, wenn der Dienst ausfällt:

/opt/mssql/bin/sqlservr

verwandte Informationen