Notifications
Clear all
How to change database default location in sql server running in linux VM
### Default Locations https://www.mssqlonlinux.com/post/change-default-folder-for-data-and-log-in-sql-server-on-linux sudo chown mssql /sqlserver # backup data log sudo /opt/mssql/bin/mssql-conf set filelocation.defaultdatadir /sqlserver/data sudo /opt/mssql/bin/mssql-conf set filelocation.defaultlogdir /sqlserver/log systemctl restart mssql-server.service SQL Server needs to be restarted in order to apply this setting. Please run 'systemctl restart mssql-server.service'. Msg 5123, Level 16, State 1, Line 1 CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file '/sqlserver/data/ETLStage.mdf'. Msg 1802, Level 16, State 4, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors
Topic starter
Posted : 04/12/2022 4:06 am