DB restoration is one of a often needed SQL operation.
Error: while transferring a SQL DB from one server to other server.
——————————
TITLE: Microsoft SQL Server Management Studio Express
——————————
Restore failed for Server ‘TEST-SRVSQLEXPRESS’. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.4035.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
——————————
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The operating system returned the error ‘5(Access is denied.)’ while attempting ‘RestoreContainer::ValidateTargetForCreation’ on ‘C:Program Files (x86)Microsoft SQL ServerMSSQL.1MSSQLTEST-DB.mdf’. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.4035.00&LinkId=20476
——————————
BUTTONS:
OK
——————————
Fix:
Ensure that you have the appropriate permissions to the location where you are trying to restore the DB. Alternatively, you can use other location where you have full access, for this click on Options section in SQL –> Restore Wizard –> Restore, as shown below: