Automatic backup and restore using SQL Server 2014

  • Hi Everyone,

    I have 2 servers running SQL Server 2014 which are in different location. Server 1 does not see Server 2 and vice versa. I have a shared drive where both servers can access. I have created a Backup job to create the backup on the shared drive which is working fine. The issue I'm having is with the database restore.

    I'm seeing the following in the SQL log:

    Message

    Error: 18204, Severity: 16, State: 1.

    Message

    BackupDiskFile::OpenMedia: Backup device 'Z:\BackUp\SalesDB.bak' failed to open. Operating system error 32(The process cannot access the file because it is being used by another process.).

    Any help is greatly appreciated.

    Sal

  • Hi Sal, that error message usually indicates that something is still accessing the .bak file the same time you are running the restore command. Do you see any indication of this?

  • Can anyone provide me with a solution?

    Regards

    Sal

  • This was removed by the editor as SPAM

  • sal-295209 (12/8/2016)


    Hi Everyone,

    I have 2 servers running SQL Server 2014 which are in different location. Server 1 does not see Server 2 and vice versa. I have a shared drive where both servers can access. I have created a Backup job to create the backup on the shared drive which is working fine. The issue I'm having is with the database restore.

    I'm seeing the following in the SQL log:

    Message

    Error: 18204, Severity: 16, State: 1.

    Message

    BackupDiskFile::OpenMedia: Backup device 'Z:\BackUp\SalesDB.bak' failed to open. Operating system error 32(The process cannot access the file because it is being used by another process.).

    Any help is greatly appreciated.

    Sal

    Have you ensured that that backup isn't running at the same time you are trying to do the restore?

    Alternatively try using a URL rather than a mapped network drive.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply