I am deleting restored backup files using script xp_cmdshell and it gives the meaage as access denied .I am logging into sql using windows login and sysadmin priviledge on the system and i HAVE FULL CONTRROL OF THE FOLDER WHERE THE FILE RESIDES .tHE FILE NAME IS CREATED AUTOMATICALLT tHE command used isselect @FName =filename from #JSfiles where filename like '%.RSTRD'SET @Delete = 'DEL "\B5-r1Production' + @FName + '"' exec master..xp_cmdshell @Delete
I have changed shared path to local path ie to eroduction and it worked . Thanks a lot for your comments and suggestions
What i have done is a temporory fix.I tried to delete file from the shard drive and able to do it .but it is not working from sql query analyser.THE error message was access denied .