Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RESTORE Error message.

Status
Not open for further replies.

vbjohn

Programmer
Joined
Aug 23, 2001
Messages
67
Location
US
Why I am getting this message and how do I resolve it?


"The file 'D:\Dynamics\data\GPSHOUSEDat.mdf' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file. Backup or restore operation terminating abnormally"

I did a back up on a database called "HOUSE" and then try to restore it on a test database called "THOUS". Please help me.


Thanks,
John-
 

How are you doing the restore - with enterprise Manager or via a query? In Enterprise Manager, you can change the name of the file to be restored so there is no conflict with the exisiting file. In a query, you need to use the WITH MOVE option on the restore statement. The following example should help you get started.

RESTORE DATABASE THOUS
FROM DISK = 'D:\Dynamics\backup\GPSHOUSE.BAK'
WITH MOVE 'House' TO 'D:\Dynamics\data\thouse.mdf',
MOVE 'House_log' TO 'D:\Dynamics\data\thouse.ldf' Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top