8

I have installed mssql on Ubuntu 16.04. following are the details of sql server. ms sql (14.0.3015.40-1) i.e SQL server 2017.

when I run the configuration command #sudo /opt/mssql/bin/sqlservr-setup I got error sudo: /opt/mssql/bin/sqlservr-setup: command not found

I have stopped and restarted but of no use.

When I check the status by command #systemctl status mssql-server

I got

mssql-server.service - Microsoft SQL Server Database Engine
   Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Fri 2018-02-02 16:15:29 IST; 4min 20s ago
     Docs: https://docs.microsoft.com/en-us/sql/linux
  Process: 28050 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=200/CHDIR)
 Main PID: 28050 (code=exited, status=200/CHDIR)

Feb 02 16:15:28 chetan-desktop systemd[1]: mssql-server.service: Unit entered failed state.
Feb 02 16:15:28 chetan-desktop systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Feb 02 16:15:29 chetan-desktop systemd[1]: mssql-server.service: Service hold-off time over, scheduling restart.
Feb 02 16:15:29 chetan-desktop systemd[1]: Stopped Microsoft SQL Server Database Engine.
Feb 02 16:15:29 chetan-desktop systemd[1]: mssql-server.service: Start request repeated too quickly.
Feb 02 16:15:29 chetan-desktop systemd[1]: Failed to start Microsoft SQL Server Database Engine.

I have googled and tried all possible options. But unable to start SQL server.

Please guide me through this.

4

3 回答 3

2

我有同样的两个问题。

首先,我引用了适用于 RHEL 早期(预览版)版本的非常旧的文档,因此我使用了错误的命令。正确的命令是:

/opt/mssql/bin/mssql-conf setup

其次,服务无法启动,因为我的虚拟机没有足够的可用 RAM(Linux 上的 SQL Server 需要至少 2GiB 的可用 RAM。)我被引用的文档错误地指出只需要 0.5GiB,这是不正确的并且journalctl没有提供有关启动失败的任何有用信息。

在将可用内存配置为 2GiB 并使用正确的mssql-conf命令后,我能够在 Linux 上成功配置和启动 MSSQL Server 实例。

参考:

于 2021-01-23T18:11:14.100 回答
1

该错误表示在此路径中找不到可执行文件,而不是服务无法启动。

根据Ubuntu 的安装说明,您需要运行mssql-conf setup以配置服务器:

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

不是sqlservr-setup

于 2018-02-02T11:10:41.463 回答
0

将我的 VM 上的 RAM 大小增加到 3GB 为我解决了这个问题。

于 2021-10-07T06:02:52.117 回答