---
title: "SQL Server Restore Error - Access is Denied"  
description: "SQL Server Restore Error - Access is Denied"  
author: "Allen Scott"  
published: 2015-09-08  
updated: 2015-09-08  
canonical: https://www.mindstick.com/forum/33446/sql-server-restore-error-access-is-denied  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# SQL Server Restore Error - Access is Denied

I created a [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax) on my [local](https://www.mindstick.com/forum/546/how-to-create-local-user-in-windows-8) machine and then did a [backup](https://www.mindstick.com/interview/1205/what-is-the-command-to-take-backup-and-restore-for-sharepoint-site) called tables.bak of [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) DataLabTables.\
I moved that backup to a [remote](https://www.mindstick.com/articles/85431/remote-employee-training-tips-tricks) machine without that table and tried to do a [restore](https://yourviews.mindstick.com/story/1480/ways-to-restore-ecosystems-and-heal-the-planet) but get the following [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing):\

```
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DataLabTables.mdf'.
```

How do I [fix](https://yourviews.mindstick.com/view/80763/donald-trump-ki-jeet-fix-hai) my [rights](https://answers.mindstick.com/qa/51244/how-do-jackson-and-calhoun-differ-when-it-comes-to-states-rights-vs-federal-rights), if that is the [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic)?


---

Original Source: https://www.mindstick.com/forum/33446/sql-server-restore-error-access-is-denied

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
