Click here to Skip to main content
15,905,915 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to Restore SQL DataBase from Network Device in SQL Query.I have tired below Query but its shows an error message as "Msg 3201, Level 16, State 2, Line 1 Cannot open backup device '\ARINDSQL\D-Drive\SQLBackup\Mis.BAK'. Operating system error 5(Access is denied.). Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally." 


RESTORE DATABASE Mis
FROM DISK = '\\ARINDSQL\D-Drive\SQLBackup\Mis.BAK'
WITH MOVE 'Mis_Data' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\Mis.mdf',
MOVE 'Mis_Log' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\Mis.ldf'  


What I have tried:

I have tried above Query but its not solved
Posted
Updated 15-Feb-18 9:35am
Comments
ZurdoDev 14-Feb-18 15:48pm    
I'm not sure you can do it that way. A mapped drive may be OK.

1 solution

The error message is quite clear: the account which SQL Server is running as does not have permission to read the backup file.

Talk to your network administrators to have the permissions on that file changed, or have the file copied to a local folder on the SQL box.
 
Share this answer
 

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