0

I'm new using the tool of azure data studio, and when trying to create a database I skip the following error.

Msg 5123, Level 16, State 1, Line 8 The CREATE FILE statement encountered operating system error 2 (The system cannot find the specified file.)

I was wondering if anyone knew of any solutions. By the way I work on a machine with Kubuntu 19.10 in case it has something to do with it.

I use this code to create the database:

-- Create a new database called 'DATA_1'
-- Connect to the 'master' database to run this snippet
USE master
GO
-- Create the new database if it does not exist already
IF NOT EXISTS (
    SELECT [name]
        FROM sys.databases
        WHERE [name] = N'DATA_1'
)
CREATE DATABASE DATA_1
GO
v4r0_30
  • 1
  • 1

1 Answers1

0

Solved, the problem was that you had to make a sudo mssql chgrp and the path of the folder where the mdf and ldf are saved

https://learn.microsoft.com/es-es/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-ver15#change-the-default-data-or-log-directory-location

v4r0_30
  • 1
  • 1