bak file not visible when trying to restore database

e0001304 picture e0001304 · Aug 5, 2016 · Viewed 18.4k times · Source

I am trying to run a classic asp project on visual studio and therefore I am trying to restore a database. I cannot seem to find the .bak file when trying to restore it. It wasn't visible in the C-drive. I have looked it up and have seen that it has something to do with permissions. I have tried enabling permissions after properties>security of .bak file to 'Everyone', it did not work. I have also tried NT Service\MSSQLSERVER. Please see the following below.

enter image description here

enter image description here

Answer

Anton picture Anton · Aug 5, 2016

You also have to enable permissions to the folder where the file is located. SSMS first needs to browse the folder, then to read the file.

In your case, SQL server tries to access the folder using NT Service\MSSQLSERVER account, so permissions should be granted to that account, no need to give more permissions (to everyone).

Also try below if above doesn't help:

  • close/open SSMS
  • move the file from root to some folder and grant permissions to that folder
  • use TSQL script to restore the database instead of SSMS