We help IT Professionals succeed at work.

Not a Valid Database File Header

RichW
RichW asked
on
Hi all,

I'm trying to attach a db file to an MSDE server.

The .mdf and .ldf files attach fine to a SQL Server db either run in VB code or done through Query Analyzer.

When I try to attach the files in VB to MSDE I get the following error:

Database failed to attach
SQL-DMO error: -2147217900 The header for file 'c:\mssql7\Data\testdb.mdf' is not a valid database file header.  The PageAudit property is incorrect.

Does anyone know what the problem is?

Thanks



Comment
Watch Question

Brendt HessSenior DBA
CERTIFIED EXPERT

Commented:
(1)  If you are using a DPT RAID controller, check this MS article:

http://support.microsoft.com/support/kb/articles/Q268/4/81.ASP

(2)  What version of SQL Server?  MSDE?.  If SQL 2000 and MSDE 1.0 / 7.0, then you are out of luck (I think), since the MSDE expects SQL 7 format, and, although SQL 2000 can handle SQL 7 files, I don't believe the reverse is correct.

Author

Commented:
The tables were created in SQL Server 2000.  I'm using MSDE 1.0.  I don't know if there's an MSDE version for SQL Server 2000.  I thought 1.0 was the only version out there?

Is this the problem?
Senior DBA
CERTIFIED EXPERT
Commented:
It may be.  If this is the case, you are out of luck - however, it's worth looking around to see whether there is a more recent MSDE based on SQL2K.

In any case, SQL 2000 .mdf and .ldf files are not backward compatable to SQL 7.0/MSDE 1.0 engines.

Author

Commented:
Thanks bhess1.  I'm gonna look for a version for SQL2k or we'll just have to downgrade.

Thanks again!