Restore fails for one, not the other

  • RESTORE DATABASE DB1 FROM DISK='\\NEO\E_Drive\MSSQL\Backup\DB1_Dump.bak' WITH RECOVERY , REPLACE , MOVE 'DB1_dat' TO '\\MUFASA\E_Drive\MSSQL$VISION\Data\DB1_Data.mdf', MOVE 'DB1_log' TO '\\MUFASA\F_Drive\MSSQL$VISION\LOG\DB1_Log.ldf'

    RESTORE DATABASE DB2 FROM DISK='\\NEO\E_Drive\MSSQL\Backup\DB2_Dump.bak' WITH RECOVERY , REPLACE , MOVE 'DB2_dat' TO '\\MUFASA\E_Drive\MSSQL$VISION\Data\DB2_Data.mdf', MOVE 'DB2_log' TO '\\MUFASA\F_Drive\MSSQL$VISION\LOG\DB2_Log.ldf'

    The first one succeeds, the second one fails.

    I can make the second succeed by substituting the local drive for the UNC version. They're both being run on the same server, and being restored to it.

    Any ideas?

  • What is the Error that you get?

    Moreover, it is not recommended to have data files of a live database on UNC paths!

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Ah sorry, the errors (copied from another post):

    Msg 5110, Level 16, State 2, Line 3

    The file "\\web-server6\FreeAgent\Backups\SQLtest\Data\Test_COR_Online.mdf" is on a network path that is not supported for database files.

    Msg 3156, Level 16, State 3, Line 3

    File 'COR_Online_Data' cannot be restored to '\\web-server6\FreeAgent\Backups\SQLtest\Data\Test_COR_Online.mdf'. Use WITH MOVE to identify a valid location for the file.

    As I mentioned in the post, the UNC paths are local to the server on which I'm running the restore.

    Moreover, the first one works, while the second one does not.

    Further investigation: I changed the UNC path on the second one to local drive, then do the restore. It works. Run the restore again with UNC path, and it now works.

    P

Viewing 3 posts - 1 through 2 (of 2 total)

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