database attached is read only

后端 未结 12 1119
借酒劲吻你
借酒劲吻你 2020-12-08 19:03

I used the following the script to attach a database. But the database created is read only.
What modifications should I make in the script to make it read-write. Pl

12条回答
  •  一向
    一向 (楼主)
    2020-12-08 19:46

    You need to change permission for your database folder: properties -> security tab -> edit... -> add... -> username "NT Service\MSSQL$SQLEXPRESS" or "NT Service\MSSQLSERVER". Close the windows, open Advanced..., double click the user and set as follows: Type: Allow Applies to: This folder, subfolder and files Basic permissions: all Make sure the owner is set too.

提交回复
热议问题