# SLQ Server .BAK file



## malcolmd3111 (Aug 6, 2005)

Hi any SQL Server 2005 folks,

I have a .BAK file from SQL Server 2005. I'm trying to restore the database and get errors. I believe the file is corrupt, but my colleague assures me it is okay. Below is the Restore sql syntax folowed by the error msg. Am I correct to beleive the file is bad? Or is the problem in the syntax? btw I am new to SQL Server Express.

RESTORE DATABASE YestDB FROM DISK= 'e:\yest\QA\YestDB.BAK'
WITH MOVE 'MagiDB_data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MagiDB_data.mdf',
MOVE 'MagiDB_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MagiDB_log.ldf'

to get the file names I did a RESTORE FILELISTONLY FROM DISK= 'e:\yest\QA\YestDB.BAK'

Here is the error msg.

Msg 3183, Level 16, State 2, Line 1
RESTORE detected an error on page (0:0) in database "YestDB" as read from the backup set.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

thanks for any direction or recommendations.

malcolmd3111


----------



## Rockn (Jul 29, 2001)

Looks like you are trying to restore over the original DB as well as the log files. I bet it would work if you wrote it to a new database and log database. You may have to detach the database and delete the LDF file to get it to restore.


----------

