brokeMyLegBiking
asked on
delete failure on backup device, Access is denied.
I can't figure out why I am getting an access denied error. The file does not seem to be in use.
I tried to drop my database and get this error:
AsynchronousDiskAction::Do DeleteFile : delete failure on backup device 'C:\Program Files\Datalink\SFS\SqlServ er\SFS_ISL AND_200605 01.ldf'. Operating system error 5(Access is denied.).
The database is dropped from sysdatabases, but the physical files are still there.
I tried to drop my database and get this error:
AsynchronousDiskAction::Do
The database is dropped from sysdatabases, but the physical files are still there.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
how can I check that?
ASKER
sweatCoder, yes, master DB is current DB. I am executing the command from a VB.NET windows application.
per aneeshattingal, make sure the user that runs mssql has write permissions on that ldf file and on the folder.
Easiest way is to goto
C:\Program Files\Datalink\SFS\SqlServ er\
try to delete the log file . watch the error message ..
C:\Program Files\Datalink\SFS\SqlServ
try to delete the log file . watch the error message ..
aneeshattingal, your experiment is only worthwhile if the logged in user is the same as the user context that mssql runs under. they are often not the same. just because the logged in user can delete a file doesn't mean mssql can.
You are Right SweatCoder. If he uses the windows Authentication, then the above strategy will work
ASKER
OK, I think we are on to something.
When I connect to my database using windows authentication, I have no problem, but when I attach using the sa login (which is what my application is using to connect to the DB) it has the problem...
hm, now I have to figure out how to grant read-write access to the sa login, for the directory: C:\Program Files\Datalink\SFS\SqlServ er\
I don't have this problem in sql Server 2005 developer edition, just express edition.
When I connect to my database using windows authentication, I have no problem, but when I attach using the sa login (which is what my application is using to connect to the DB) it has the problem...
hm, now I have to figure out how to grant read-write access to the sa login, for the directory: C:\Program Files\Datalink\SFS\SqlServ
I don't have this problem in sql Server 2005 developer edition, just express edition.
ASKER
correction : *but when I use the sa login
ASKER
Excellent!
Thanks for your help. This issue was really causing me some serious headaches.
To fix it I just have my program log in with windows authentication instead of using the sa login for any attach databse and drop databse commands.
-brokeMyLegBiking
Thanks for your help. This issue was really causing me some serious headaches.
To fix it I just have my program log in with windows authentication instead of using the sa login for any attach databse and drop databse commands.
-brokeMyLegBiking
>> The database is dropped from sysdatabases
?? you mean dropped when "master" is current db?