title: Restore database from a shared folder
body: <p>I did a backup of a database on Prod. I need to restore it to cert. 
  I am Running below query on Cert to access the backup residing on prod</p>
  
  <p>Query:</p>
  
  <pre><code>USE [master]
  RESTORE DATABASE DB
  FROM  DISK = N'\\SQL2005Prod\Backups\DB\DB.bak' WITH  FILE = 1,  
  GO
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Msg 3201, Level 16, State 2, Line 3<br>
    Cannot open backup device '\\SQL2005Prod\Backups\DB\DB.bak'. Operating system error 5(Access is denied.).<br>
    Msg 3013, Level 16, State 1, Line 3<br>
    RESTORE DATABASE is terminating abnormally.</p>
  </blockquote>
  
  <p>Additional notes:
  I am a sys admin on the server.
  SQL Server Agent and I have full access to the folder Backups. 
  SQL Server Agent account and SQL server Service account are under the same domain name. They have full control under folder permissions.</p>