[英]Failed Start for Microsoft SQL Server Database Engine on Linux
I have installed mssql on Ubuntu 16.04.我已经在 Ubuntu 16.04 上安装了 mssql。 following are the details of sql server.以下是 sql 服务器的详细信息。 ms sql (14.0.3015.40-1)
ie SQL server 2017
. sql 女士(14.0.3015.40-1)
即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
当我运行配置命令#sudo /opt/mssql/bin/sqlservr-setup
时出现错误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
当我通过命令#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://learn.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.但是无法启动SQL服务器。
Please guide me through this.请指导我完成这个。
I had the same two problems.我有同样的两个问题。
First, I was referencing very old documentation that applied to an early (preview) release for RHEL, and so I was using the wrong command.首先,我参考了适用于 RHEL 早期(预览)版本的非常旧的文档,因此我使用了错误的命令。 The correct command is:正确的命令是:
/opt/mssql/bin/mssql-conf setup
Second, the service was failing to start because my virtual machine did not have enough RAM available (SQL Server on Linux requires at least 2GiB of RAM available.) The documentation I was referred to incorrectly stated that only 0.5GiB was required, this is incorrect and journalctl
was not providing any useful information about the start failure.其次,该服务无法启动,因为我的虚拟机没有足够的可用 RAM(Linux 上的 SQL Server 需要至少 2GiB 的可用 RAM。)我被错误引用的文档指出只需要 0.5GiB,这是不正确的并且journalctl
没有提供有关启动失败的任何有用信息。
After configuring available memory to 2GiB and using the correct mssql-conf
command I was able to successfully configure and start an MSSQL Server instance on Linux.将可用内存配置为 2GiB 并使用正确的mssql-conf
命令后,我能够在 Linux 上成功配置和启动 MSSQL Server 实例。
References:参考资料:
The error says that the executable wasn't found in this path, not that the service couldn't start.该错误表示在此路径中找不到可执行文件,而不是服务无法启动。
According to the installation instructions for Ubuntu you need to run mssql-conf setup
to configure the server :根据Ubuntu的安装说明,您需要运行mssql-conf setup
来配置服务器:
sudo /opt/mssql/bin/mssql-conf setup
not sqlservr-setup
不是sqlservr-setup
Increasing the RAM size to 3GB on my VM resolved the issue for me.将我的 VM 上的 RAM 大小增加到 3GB 为我解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.