C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Errors and Solutions » General »

Error attaching an mdf file - compressed but does not reside in a read-only database or filegroup


Posted Date: 04 Sep 2009    Resource Type: Errors and Solutions    Category: General
Author: ABitSmartMember Level: Diamond    
Rating: 1 out of 5Points: 4



Certain times we get an error while attaching an mdf file saying,

The file "D:\DataBaseFile.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Could not open new database 'D:\DataBaseFile.mdf'. CREATE DATABASE is aborted.

This is because MSSQL Server does not support reading from a compressed drive. (This is supported by SQL Express edition though)

When the mdf file is created on Vista it is in a compressed version. So when trying to use the same file on Win XP which is an uncompressed disc this problem occurs. The solution to this is marking the mdf and ldf file as uncompressed. Follow the following steps,
1. Right-click the .mdf file and select the properties menu.
2. From the Properties dialog box select the Advanced button
4. From the Advanced Dialog un-tick the "Compress Contents To Save Disk Space check box"

Do the same thing for the .ldf file

Try it now and it should work.

Have fun.

For more details, visit http://abitsmart.com/?p=163



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
SQL Server compressed but does not reside in a read-only database or filegroup. The file must be dec  .  SQL Server attaching a database error  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Smtp - Error while sending mail from smtp
Previous Resource: MS SQl server as project prerequisite installation error
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use