Tuesday, April 9, 2013

Solved Attach SQL database fail in SQL Server 2008

 

To solve this issue :

The file "D:\Databases\TwaDev.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Could not open File Control Bank (FCB) for invalid file ID 2 in database 'TwaDev'. Verify the file location. Execute DBCC CHECKDB.
Could not open new database 'TwaDev'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 5118)


Solution :
1. Go to file .mdf and .ldf with window explorer
2. Right click that file and click advance button

image

3. Uncheck option “Compress contents to save disk space”

image

4. Re attach that file again with Ms. SQL Server Management Studio


Hope it will help you.

No comments: