Click here to Skip to main content
15,909,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HI,

I want to backup my sql databse to windows temp folder, it shows error when i backup sql database using ssms to windows temp path.

error details:
C#
TITLE: Microsoft SQL Server Management Studio
------------------------------

Backup failed for Server 'KGMMURUGESH\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=13.0.15600.2+((SSMS_Rel).160712-1724)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: Cannot open backup device 'C:\Users\KGMMUR~1\AppData\Local\Temp'. Operating system error 5(Access is denied.). (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=13.0.15600.2+((SSMS_Rel).160712-1724)&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


What I have tried:

I tried using ssms and vb.net code, it works well for some other folders.
Posted
Updated 14-Nov-16 0:56am
Comments
[no name] 7-Nov-16 6:56am    
"Access denied" is pretty well self explanatory.

1 solution

Quote:
Cannot open backup device 'C:\Users\KGMMUR~1\AppData\Local\Temp'. Operating system error 5(Access is denied.)

It means that the user running the backup process has no access rights to that folder...
Check the backup job an see the user mapping for the owner of the job...
 
Share this answer
 
Comments
kgmmurugesh 8-Nov-16 0:46am    
No, I am logged in as kgmmurugesh and this user has full permission for the folder.
Kornfeld Eliyahu Peter 8-Nov-16 2:04am    
It has nothing! to do with the logged in user... There is the owner of the job, who sets up the security context. You have to see to what actual user it is mapped...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900