locked
SQL database restore not working RRS feed

  • Question

  • Hi,

    I'm trying to a backup of a database calles WSS_Content_Base to a database of the same name on a different server.

    When I try restore the database through SSMS I get the attached error:

    When I then tried to run the backup with the below SQL:

    RESTORE DATABASE WSS_Content_Base 
    	FROM DISK = 'E:\WSS_Content_Base_20130917.bak'

    I got this error:

    Msg 3201, Level 16, State 2, Line 1
    Cannot open backup device 'E:\WSS_Content_Base_20130917.bak'. Operating system error 2(The system cannot find the file specified.).
    Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.

    Can anybody please advise what the issue might be?

    Oh, by the way the original database has the data in D:\Data\WSS_Content_Base.mdf and the log in D:\Logs\WSS_Content_Base_Log.ldf but on the new server I only have a c:\ and E:\ drive. I would like both files to go to E:\. I'm not sure if this has any impact on the restore.

    Cheers

    Paul

    Wednesday, September 25, 2013 9:24 AM

Answers

  • You may have to use the WITH move options or set the file paths (mdf & ldf) in SSMS restore window

    Satheesh
    My Blog


    • Proposed as answer by Shanky_621MVP Wednesday, September 25, 2013 9:56 AM
    • Marked as answer by Allen Li - MSFT Thursday, October 3, 2013 8:29 AM
    Wednesday, September 25, 2013 9:48 AM
    Answerer
  • but on the new server I only have a c:\ and E:\ drive. I would like both files to go to E:\.

    Hello Paul,

    Then you have to use the MOVE option for the restore command to locate the database in a different drive/folder.

    Is the backup file really located on drive E: on the server where you want to restore the backup file? Is E: a local drive or a mapped network share?


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, September 25, 2013 9:45 AM

All replies

  • but on the new server I only have a c:\ and E:\ drive. I would like both files to go to E:\.

    Hello Paul,

    Then you have to use the MOVE option for the restore command to locate the database in a different drive/folder.

    Is the backup file really located on drive E: on the server where you want to restore the backup file? Is E: a local drive or a mapped network share?


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, September 25, 2013 9:45 AM
  • 1) Make sure that you typed correct path to the BAK file

    2) Make sure that account you run the RESTORE statement has permission to read drive E:\


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    Wednesday, September 25, 2013 9:45 AM
    Answerer
  • You may have to use the WITH move options or set the file paths (mdf & ldf) in SSMS restore window

    Satheesh
    My Blog


    • Proposed as answer by Shanky_621MVP Wednesday, September 25, 2013 9:56 AM
    • Marked as answer by Allen Li - MSFT Thursday, October 3, 2013 8:29 AM
    Wednesday, September 25, 2013 9:48 AM
    Answerer