Permissions error when attaching a database: “Cannot access the specified path”

℡╲_俬逩灬. 提交于 2019-12-04 23:22:45

Put your files to default location for Database Engine data files. If you didn't reconfigure anything it should be

\Program Files\Microsoft SQL Server\MSSQL11.<InstanceID>\MSSQL\Data

And then Attach db using SSMS.

Connecting to the server by Windows Authentication worked for me. I don't know if that is possible in your case.

As Rogitel says about, this could be related to how you have logged in to SSMS itself, rather than the privilege level of the application.

It seems as though, if your user does not have the "sysadmin" role, then they will not have sufficient access to the filesystem on the machine in order to open the file browser.

Setting aside the security concerns for one moment....

In order to grant this role;

  1. Log in to SSMS using Windows Authentication
  2. Navigate to Security->Logins
  3. Either double Click, or Right Click and select Properties on the user you're interested in .
  4. In the "Select a page" box, select "Server Roles"
  5. Make sure that the "sysadmin" role is selected
  6. Press Ok to save the change and close the dialog
  7. Exit SSMS
  8. Reopen SSMS and login as the User you wanted, and you should now have sufficient Privileges to browse.

It doesn't matter what permissions the account that you open the management studio has, the important account is the one that the sql server service is running as. By default it only has access to the default location specified during the install, so you can either do as the previous poster said and move your files to there, or add the service account to the permissions of the folder where you want to store your files so that it can access that location.

In my case it was related to the drives not being dependencies of the SQL Server role (Clustered Server). When I added the disks as dependencies under the SQL Server role, I could browse the drives from SSMS again.

Connecting to the SQL server using the 'sa' user did the trick for me. Not everyone can have permission to do that so make sure the user you are using for SQL Authentication has all necessary privileges.

user5766120

Just go to service in your computer and search for MSSQLSERVER restart the service by stop and start.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!