SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restore a development DB form Prod.


Restore a development DB form Prod.

Author
Message
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27482 Visits: 4895
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/
AAKR
AAKR
Old Hand
Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)

Group: General Forum Members
Points: 302 Visits: 439
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.
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27482 Visits: 4895
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/
HanShi
HanShi
SSCrazy Eights
SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)

Group: General Forum Members
Points: 8738 Visits: 3718
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’! **
kevaburg
kevaburg
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4553 Visits: 1025
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!!! :-P
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27482 Visits: 4895
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/
Steve Jones
Steve Jones
SSC Guru
SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)

Group: Administrators
Points: 148486 Visits: 19444
You have

move to e\

It should be

move to e:\

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search