SMB Shares and SQL

We have an SMB share that doesn’t work with SQL. In SQL management studio running on the windows server with SQL login sa.
We we try to create a Database on the SMB share configured on the TrueNAS, we get the following error:

CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Operating system error 5: “5(Access is denied.)”.

I think you need to post more details on this issue. How is the SMB share set up on TrueNAS, what version of TrueNAS, access permissions?

Wild guess is SQL login ‘sa’ doesn’t have permissions

So you have installed your SQL instance in the Win server, but want to create a database in a remote SMB folder?
Honestly i don’t get what pro this layout have (but in case i’m happy to learn something new :smiley: ).
Anyway… for sure you have to give to the SQL server service account the full control on the smb share (and probably to the agent service too, but im not sure)

thanks for replying. Yes, i want to create a DB in the SMB folder and restore DBs there. How can i give the SQL service account full control on the SMB? just create an “SA” account with the same password on the TrueNAS?

Afaik on my little experience, every sql server instance have a service account, and the default is NT Service/MSSQL$istancename. I don’t think that this account can access to the SMB resource, so you should use a “privilgied” account instead.
My strongly advice, if you wanna avoid issue on your actual instance (eg you are in production or have data on it), you really should try those things installing a new instance for be sure to don’t mess up everything :smiley:

“Triggered” by your request, i have made some read on the Microsoft site, and how i initially think i don’t think is a good layout, but for sure you have your reason for that; in my case, sometimes i need to perform some potentially destructive operation on production DB, or just keep continue working from 2 different location… so i have installed directly MSSQL in a docker container, and despite i don’t really think TN is WHQL, at least i have bypassed easy the limitation of the network