Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 High Availability (2008)
 Resroring a backup from 3 files

Author  Topic 

jasofunk
Starting Member

2 Posts

Posted - 2010-09-06 : 18:24:33
I am trying to import a new database from my company to my laptop. They have provided me with 3 separate files. I have read several post and realize that I need all three of these files. Here is what I put into Query Analyzer:

RESTORE DATABASE BookCrossing
FROM DISK = 'E:\MSSQL\BACKUP\FULL_(local)_BookCrossing_20100806_013000_00.bak',
DISK = 'E:\MSSQL\BACKUP\FULL_(local)_BookCrossing_20100806_013000_01.bak',
DISK = 'E:\MSSQL\BACKUP\FULL_(local)_BookCrossing_20100806_013000_02.bak',
WITH replace,
MOVE 'BookCrossing_Data' TO 'E:\MSSQL\DATA\BookCrossing_Data.MDF',
MOVE 'BookCrossing_Log' TO 'E:\MSSQL\DATA\BookCrossing_Log.LDF',
Move 'BookCrossing_Index' TO 'E:\MSSQL\DATA\BookCrossing_Index.NDF'


The error I get is this:

Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'WITH'.
Msg 319, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.


Please tell me what I am doing wrong.

jasofunk
Starting Member

2 Posts

Posted - 2010-09-06 : 18:35:38
I figured out the issue.

I needed to remove the comma "," from after the third backup file.

Theoretically, this should work for any number of "broken apart" backup files.
Go to Top of Page
   

- Advertisement -