SQL Server Permissions required for the DATA folder

hsgswve4  于 2023-10-15  发布在  其他
关注(0)|答案(2)|浏览(103)

I have Sql Server 2017 and the Data folder is the default at C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL . The access rights on the folder are:

I have an old database with its MDF file in My SQL Database . I tried to duplicate the same rights to My SQL Database :

I couldn't duplicate those for ALL APPLICATION PACKAGES as I don't know who it is.

With the above rights on My SQL Database I couldn't reattach a database from its MDF file in that folder. It keeps saying Operating system error 5: "5(Access is denied.)" on the MDF file.

What access permissions are required to have database files in another folder other than the default?

zf9nrax1

zf9nrax11#

Execute the following SELECT :

SELECT * FROM sys.dm_server_services

And check the value of service_account for the servicename thats SQL SERVER :

Then make sure that the folder and the files have the proper access rights for that account.

uujelgoq

uujelgoq2#

Add your user account in Advanced Security Setting of the Data folder with Full Control access

相关问题