Restore a development DB form Prod.

  • I'm trying to restore a development DB form Prod.

    I get an error on the Log file but it is a valid path.

    I do not get it.

    Any help would be greatly appreciated.

    RESTORE DATABASE Cypress

    FROM DISK = 'I:\Backups\CYP_DW\Full\MyDBDW\MyDBDW_backup_2013_06_24_163430_3276765.bak'

    --WITH REPLACE,

    WITH NORECOVERY,

    MOVE 'MyDBDW' TO 'E:\MSSQL\Data\MyDBDW.mdf',

    MOVE 'MyDBDW_Horizon' TO 'E:\MSSQL\Data\MyDBDW_HorizonObjects1.NDF',

    MOVE 'MyDBDW_log' TO 'E\MSSQL\Log\MyDBDW.ldf'

    Msg 5105, Level 16, State 2, Line 1

    A file activation error occurred. The physical file name 'E\MSSQL\Log\MyDBDW_New.ldf' may be incorrect. Diagnose and correct additional errors, and retry the operation.

    Msg 3156, Level 16, State 3, Line 1

    File 'MyDBDW_log' cannot be restored to 'E\MSSQL\Log\MyDBDW_New.ldf'. Use WITH MOVE to identify a valid location for the file.

    Msg 3119, Level 16, State 1, Line 1

    Problems were identified while planning for the RESTORE statement. Previous messages provide details.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE DATABASE is terminating abnormally.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Hi Mate,

    Restore process:

    You want restore a fresh copy or over writing on exists?

    if you are creating a new database please check space for new database.

    if you are over writing please check the files

    1. location

    2. logical name should be source logical name

    3.how many files example: 1mdf, 5 ndf and 1ldf. the restore command also should be the same.

  • I commented out the Log file and I was able to restore.

    That is not necessarily what I want.

    I restore quite frequently but not to this Server.

    Very strange.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • You've made a type in the restore command. You have missed the ":" after the drive.

    MOVE 'MyDBDW_log' TO 'E\MSSQL\Log\MyDBDW.ldf'

    must be:

    MOVE 'MyDBDW_log' TO 'E:\MSSQL\Log\MyDBDW.ldf'

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • HanShi (6/25/2013)


    You've made a type in the restore command. You have missed the ":" after the drive.

    MOVE 'MyDBDW_log' TO 'E\MSSQL\Log\MyDBDW.ldf'

    must be:

    MOVE 'MyDBDW_log' TO 'E:\MSSQL\Log\MyDBDW.ldf'

    How often can we not see the wood for trees!!! 😛

  • HanShi (6/25/2013)


    You've made a type in the restore command. You have missed the ":" after the drive.

    MOVE 'MyDBDW_log' TO 'E\MSSQL\Log\MyDBDW.ldf'

    must be:

    MOVE 'MyDBDW_log' TO 'E:\MSSQL\Log\MyDBDW.ldf'

    I do not see a difference in the syntax?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • You have

    move to e

    It should be

    move to e:\

Viewing 7 posts - 1 through 6 (of 6 total)

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