问题
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.
回答1:
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
回答2:
I'm facing simpler issue for sql server standalone 2014 enterprise edition ,installed in my home system . I tried every possibility provided in various article but strangely the issue is with my 2 named instance . I can restore database on my default instance with query and GUI . I tried changing log-on as account of sql server service for named instance to 'network service' or 'local system' and giving them full control permission to backup holding folder .
回答3:
I had the same issue. I get to know that it was a a permissions issue.
Here are the following steps to solve this problem
Go to Control panel > Administrative Tools > Services double click on the services. copy the log on account name of sql service as shown in the picture.
Go to your backup folder and right click and select properties. Follow the steps as shown in picture. After clicking on edit you will get new window.
Click on add
Paste here the Log on account name of sql service account which you had copied earlier. then Click on check name button.
Select MSSQLSERVER then click ok.
Now you will get your sql server account name in security tab.
Select sql server account name that and in permission box select Allow in all check boxes(I added Full Control) then click apply.
Now you will be able to select and restore your backup file.
回答4:
you can copy the backup folder in to C:\Users\MSSQL$HCMIS\Desktop sql server users folder.Now it will be accessible
来源:https://stackoverflow.com/questions/38779718/bak-file-not-visible-when-trying-to-restore-database