Ubuntu mssql server Corruption detected in persistent registry: \SystemRoot\security.hiv

0

I started having this issue today on our production sql server. I have tried a variety of different fixes proposed online. We are using MSSQL server 2017 (14.0.3257.3-13). I'm out of ideas on what could be causing the server to crash. Below is the recent crash log.

This program has encountered a fatal error and cannot continue running at Sat Feb 1 14:21:21 2020 The following diagnostic information is available:

     Reason: 0x00000007
     Status: 0xc000014c
    Message: Corruption detected in persistent registry: \SystemRoot\security.hiv.
Stack Trace:
             000000006b137250
             000000006b1345bf
             000000006b1347a3
             000000006b1337d3
             000000006b1326f2
             000000006b175c31
    Process: 8815 - sqlservr
     Thread: 8819 (application thread 0x4)
Instance Id: e5a2f812-0426-4d92-b9b2-1db1e60d957c
   Crash Id: 60073e70-4042-4275-9fcd-a05ae84d26f5
Build stamp: 9726a6583fe7826f57b03fd1c7adf12bebe7692cb64630fccb0541c06820af4d

Distribution: Ubuntu 16.04.6 LTS Processors: 9 Total Memory: 8589934592 bytes Timestamp: Sat Feb 1 14:21:21 2020 Last errno: 2 Last errno text: No such file or directory

sql-server
ubuntu-16.04
asked on Stack Overflow Feb 1, 2020 by Toret

2 Answers

0

After working through multiple proposed solutions online nothing worked. Some of the things I tried:

  1. Upgrading mssql-server to latest version.
  2. Repairing missing files or dependencies.
  3. Changing access permissions to the directory.
  4. Elevating access permissions for the mssql user.
  5. Changing user access to root for the .hiv files located in the mssql .system/system folder

The only way to for me to get it to work was to:

  1. Delete all the folders manually from /var/opt/mssql/ except for the data folder.
  2. Re-link python from 3.5 to 2.7
  3. Then I downgraded the mssql-server version to Microsoft SQL Server 2017 14.0.3192.2.
  4. Run the sudo /opt/mssql/bin/mssql-conf setup

    **Python Re-link**
    sudo rm /user/bin/python
    sudo ln -s /user/bin/python[version] /user/bin/python
    

After that everything worked again.

answered on Stack Overflow Feb 2, 2020 by Toret
0

Thank you for the ideas, Toret. I have faced the same issue, but I solved it just by deleting the security.hiv file.

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

After that the mssql-server service started normaly.

answered on Stack Overflow Feb 9, 2021 by Lyon Piccoli

User contributions licensed under CC BY-SA 3.0