The following error message has been observed while restoring the MSSQL database to an alternate location:
The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\XXXXXX.mdf'
We can use SQL Server Configuration Manager to find which account is used to run the SQL Server instance, and then make sure that account has full control
Steps to Resolve-
Sql Server Configuration manager
click on SQL Server (MSSQLSERVER
)Properties
log On As
value to LocalSystem
Re-run the restore job.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center