none
Why Error 5118? My disk is not compressed?

    Question

  • Hi all,

    I encountered problems like the one ever posted here and in the forum SQL Server Tools.
    In one case, the user solved the problem by turning dynamic disk into static (basic) disks.
    In another case, the soution was not known.

    Here is the message I encountered.

    Msg 5118, Level 16, State 1, Line 1

    The file "E:\Database\Microsoft\Usage.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.

    The problem is : my disk is static (basic), and not compressed. How can this happen?
    I also have Oracle installed. Oracle instance is able to process files in the disk E.
    Again, the disk E is not compressed since the beginning of its creation, neither is disk D.
    If I moved the data files and transaction log files to disk D, I'm able to attach the database.
    How can this be?

    Thank you,

    Bernaridho
    Saturday, August 19, 2006 4:51 AM

Answers

  • I resolved the problem by backing up all files in the (compressed) disk, and then
    reformat the disk with the value of False on checkbox about compressing the disk.

    After the disk is formatted, the checkbox on Properties dialog of a disk does not
    help to change the compressed property of a disk.  I realized the disk is formatted
    with compression enabled.  I turned it off.  But it does not solve the problem.
    SQL Server 2005 still cannot create database on that disk.

    The solution is as I described.  Reformat the disk.  I did it, and it worked well.
    Now I can create databases on that disk. Remember to restore the backed-up files.

    Regards,

    Bernaridho
    Tuesday, August 29, 2006 8:12 AM

All replies

  • Right click on the file on the E:, go into properties and make sure the file isn't marked as compressed.  Just because the drive isn't compressed doesn't mean the attributes of the file are non-compressed.
    Monday, August 21, 2006 8:25 PM
  • I resolved the problem by backing up all files in the (compressed) disk, and then
    reformat the disk with the value of False on checkbox about compressing the disk.

    After the disk is formatted, the checkbox on Properties dialog of a disk does not
    help to change the compressed property of a disk.  I realized the disk is formatted
    with compression enabled.  I turned it off.  But it does not solve the problem.
    SQL Server 2005 still cannot create database on that disk.

    The solution is as I described.  Reformat the disk.  I did it, and it worked well.
    Now I can create databases on that disk. Remember to restore the backed-up files.

    Regards,

    Bernaridho
    Tuesday, August 29, 2006 8:12 AM
  • Hi.. But I resolved this problem without formatting my had drive.. you just right click on the folder in which you are going to save your Database files and then in Advanced options uncheck the compress option. by doing this only that folder will be uncompressed and rest of the drive will remain compressed and now we can create database in the folder. I hopw you got hte point...

    Regards,
    Abdul Majid

    • Proposed as answer by Robins Tomar Wednesday, February 23, 2011 10:01 AM
    Thursday, August 28, 2008 11:00 AM
  • Hi,

    I agree with Abdul.

    I went to the folder, where I could see 'blue' coloured files and some 'black'.

    The blue were the ones compressed.

     

    1. I closed all the windows of SQL

    2. Stopped the SQL Server service.. (To open it Run -> services.msc)

    3. Selected all blue ones -> Right click properties -> Advanced -> Unchecked "Compress files to save disk space"

    4. Press ok and again ok.

    Bingo -> All the files are uncompressed.

    5. Start the SQL Server service and start ur Management studio and viola.. it works.

     

    Thanks All Smile

     

    Regards

    Praveen Behara.

    Wednesday, October 15, 2008 12:58 PM
  • Hi everyone and thanks Abdul Majid.... the way you define resolve this issue... worked for me.  SQL server was not letting me to create any new database. But i followed your guidance and its working.. Thanks a lot.

     

    Fazal-e-Rabbi (Karachi-Pak)

    Saturday, September 25, 2010 11:31 AM
  • Hi everybody and thanks to Abdul Majid... I've got the point. I resolved this problem without formatting my hard drive. You just right click on the MDF and _log files for which you are encountered the error, choose properties and then in Advanced options uncheck the compress contents to save to disk space. By doing this only the file will be uncompressed and you'll stop receiving the error.

    Jorge Roman Castañeda

    Friday, August 22, 2014 12:14 AM