0

I am running MS-SQL server for Linux. There are several databases on this machine, but one of them refuses to start up. The error log shows:

2019-07-30 16:29:36.76 spid19s     SQL Server is now ready for client connections. This is an informational message; no user action is required.
2019-07-30 16:29:36.80 spid39s     Error: 17204, Severity: 16, State: 1.
2019-07-30 16:29:36.80 spid39s     FCB::Open failed: Could not open file /var/opt/mssql/data/action_database.mdf for file number 1.  OS error: 5(Access is denied.).
2019-07-30 16:29:36.81 spid39s     Error: 5120, Severity: 16, State: 101.
2019-07-30 16:29:36.81 spid39s     Unable to open the physical file "/var/opt/mssql/data/action_database.mdf". Operating system error 5: "5(Access is denied.)".
2019-07-30 16:29:37.31 spid39s     Error: 17204, Severity: 16, State: 1.
2019-07-30 16:29:37.31 spid39s     FCB::Open failed: Could not open file /var/opt/mssql/data/action_database_log.ldf for file number 2.  OS error: 5(Access is denied.).
2019-07-30 16:29:37.31 spid39s     Error: 5120, Severity: 16, State: 101.
2019-07-30 16:29:37.31 spid39s     Unable to open the physical file "/var/opt/mssql/data/action_database_log.ldf". Operating system error 5: "5(Access is denied.)".
2019-07-30 16:29:37.32 spid39s     Error: 5105, Severity: 16, State: 1.
2019-07-30 16:29:37.32 spid39s     A file activation error occurred. The physical file name '/var/opt/mssql/data/action_database_log.ldf' may be incorrect. Diagnose and correct additional errors, and retry the operation.

I've checked the permissions of these files and they look fine, exactly the same as all the other databases that are working.

My version:

Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)
Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (CentOS Linux 7 (Core))

Can someone help me debug this issue? I really don't know where to start.

The OS is CentOS 7.6 installed in a virtual machine (proxmox). The database files are stored in /var/opt/mssql/data

Here are the files in question:

-rw-rw---- 1 mssql mssql 209715200 Jul 31 09:54 action_database_log.ldf -rw-rw---- 1 mssql mssql 411041792 Jul 31 08:23 action_database.mdf

The ownership / group and permissions are exactly the same as all other database files in this directory.

  • Does lsof see these 2 files as open? Possibly another instance is using them? Maybe there is a process that needs to be killed; or create or attach database has not completed? What does it say in sys.databases? – la_mochila Jul 31 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.