Sunday, February 19, 2012

Attachment Error received

Hi all,
I've just started dabbling with SQL Express (I've an up-coming project and
would like to use it). I had no hassles connecting to the db I created in
VS2005 std but now I want to test connectin to it outside of the inetpub. I
copied the MDF and LDF to another folder on my drive and changed the conn
string to reflect this but I get the following error:
The header for file 'w:\temp\Test.mdf' is not a valid database file header.
The PageAudit property is incorrect.
An attempt to attach an auto-named database for file w:\temp\Test.mdf
failed. A database with the same name exists, or specified file cannot be
opened, or it is located on UNC share.
Clearly something's gone wrong here but what would I need to do to fix this
problem (and be able to connect to SQL Express db's from other folders in
future)?
Regards
John.
Moving the database files and then not being able to attach them is usually
a permissions problem but I've never seen this error. You might try the
copy again - this error sounds like a corrupted file.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"John" <a@.b.c> wrote in message news:uhr9aYCOGHA.916@.TK2MSFTNGP10.phx.gbl...
> Hi all,
> I've just started dabbling with SQL Express (I've an up-coming project and
> would like to use it). I had no hassles connecting to the db I created in
> VS2005 std but now I want to test connectin to it outside of the inetpub.
> I
> copied the MDF and LDF to another folder on my drive and changed the conn
> string to reflect this but I get the following error:
> The header for file 'w:\temp\Test.mdf' is not a valid database file
> header.
> The PageAudit property is incorrect.
> An attempt to attach an auto-named database for file w:\temp\Test.mdf
> failed. A database with the same name exists, or specified file cannot be
> opened, or it is located on UNC share.
> Clearly something's gone wrong here but what would I need to do to fix
> this
> problem (and be able to connect to SQL Express db's from other folders in
> future)?
> Regards
> John.
>
>

No comments:

Post a Comment