简体   繁体   English

Linux 上的 Microsoft SQL 服务器数据库引擎启动失败

[英]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.

相关问题 Microsoft SQL Server 2016安装错误-“等待数据库引擎恢复句柄失败” - Microsoft SQL Server 2016 Installation Error - 'Wait on the Database Engine Recovery Handle Failed' 插入到Microsoft SQL Server用户数据库失败 - Insert to microsoft sql server user database failed Google App Engine PHP连接到外部Microsoft SQL Server数据库 - Google app engine php connect to external microsoft sql server database 我可以从Linux转储整个Microsoft SQL Server数据库吗? - Can I dump an entire Microsoft SQL Server database from Linux? 将SchemaSpy连接到Linux for Docker Engine上的Microsoft SQL Server失败并显示连接失败 - connecting SchemaSpy to Microsoft SQL Server on Linux for Docker Engine fails with Connection Failure 连接到SQL Server(在Linux上)失败 - Connect to SQL Server (on Linux) failed TFS 2015 - TF401002:SQL Server 数据库引擎未能将数据库备份保存到路径 - TFS 2015 - TF401002: The SQL Server Database Engine failed to save the database backup to path Xamarin 与 Microsoft SQL 服务器数据库 - Xamarin with Microsoft SQL Server database Microsoft SQL Server 2008:写入服务器失败 - Microsoft SQL Server 2008: Write to the server failed SQL Server代理无法启动 - SQL Server Agent failed to start
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM