首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在ubuntu上配置MSSQL无法打开或读取持久注册表:\SystemRoot\security.hiv

在ubuntu上配置MSSQL无法打开或读取持久注册表:\SystemRoot\security.hiv
EN

Stack Overflow用户
提问于 2019-04-01 13:14:37
回答 2查看 8.6K关注 0票数 7

我使用下面的指南在我的ubuntu16.04机器https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-2017上安装MSSQL服务器

当我跑步的时候:

代码语言:javascript
复制
sudo /opt/mssql/bin/mssql-conf setup

无论我选择哪种类型的Server版本,我都会得到以下错误:

代码语言:javascript
复制
    Confirm the SQL Server system administrator password: 
Configuring SQL Server...

This program has encountered a fatal error and cannot continue running at Mon Apr  1 16:06:07 2019
The following diagnostic information is available:

       Reason: 0x00000007
      Message: Cannot open or read the persistent registry: \SystemRoot\security.hiv.
      Process: 19600 - sqlservr
       Thread: 19604 (application thread 0x4)
  Instance Id: 7ebfcf27-db60-460d-afd3-6d852b70069e
     Crash Id: d99ba388-d323-43f3-b758-e116f42bb2e8
  Build stamp: 70437f6583b8ef39b1ef70539ef84690980315dc7a4436c9c40015f28610e4aa
 Distribution: Ubuntu 16.04.6 LTS
   Processors: 8
 Total Memory: 16673366016 bytes
    Timestamp: Mon Apr  1 16:06:07 2019

Ubuntu 16.04.6 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 the 'systemd-journal' group 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 the 'systemd-journal' group 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.04_01_2019_16_06_07.19600.tbz2
Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
in /var/opt/mssql/log for more information.

also I found this post,看起来这家伙也有类似的问题,但遗憾的是没有解决办法

有谁知道怎么解决我的问题吗?

谢谢

编辑:在实现了答案之后,我得到了另一个错误:

代码语言:javascript
复制
Confirm the SQL Server system administrator password: 
Configuring SQL Server...

Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG in /var/opt/mssql/log for more information

为了清理日志文件夹中的混乱,我决定使用

sudo -rf /var/opt/mssql/log

并重新运行安装,显然这解决了我的最后一个问题,最后:安装已经成功完成。Server现在正在启动.

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-04-12 20:11:56

您可以在

代码语言:javascript
复制
/var/opt/mssql/log

我的说:

代码语言:javascript
复制
{
    "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"
}

因此,我运行了locate来查看"systemroot“的位置:

定位security.hiv /var/opt/mssql/.system/security.hiv

我不知道应该应用哪种权限,所以我只给“其他人”读和写。

然后同样的

代码语言:javascript
复制
lsa.hiv
licensing.hiv

重新运行

代码语言:javascript
复制
sudo /opt/mssql/bin/mssql-conf setup

然后,sql-server启动,加上对其他服务器的权限再次消失.

顺便说一句,您可以在没有服务的情况下运行sql-server,那么即使服务失败,它也能工作:

代码语言:javascript
复制
/opt/mssql/bin/sqlservr
票数 5
EN

Stack Overflow用户

发布于 2020-12-13 12:54:44

在我的例子中(@ my ),不仅仅是licensing.hiv。My /var/opt/mssql/..system/instance_id以某种方式被销毁,还有更多带有所有者根的文件。删除/var/opt/ mssql /.system/instance_id并将所有root.root文件更改为mssql.mssql (chown mssql.mssql /opt/mssql/.system/system/*)之后,我能够重新运行"/opt/mssql/bin/mssql-conf安装程序“,之后mssql再次运行良好。

我非常希望“/var/opt/mssql/..system/instance_id”能够自己运行。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55456061

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档