Ms Sql Error 5118
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Why Error 5118? My disk is not compressed? SQL Server > SQL Server Database Engine Question 0 Sign in to vote 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 Reply | Quote Answers 0 Sign in to vote I resolved the problem by backing up all files in the (compressed) disk, and thenreformat 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 nothelp to change the compressed property of a disk. I realized the disk is formattedwith 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,
SERVER - Startup Problem – FIX - Error 5118, Severity 16, State 1 June 15, 2015Pinal DaveSQL, SQL Server, SQL Tips and Tricks4 commentsI have been monitoring some of the error messages that SQL Server has been throwing in the recent versions and they are self-explanatory. If we understand the English, then half the problem is solved. It becomes easier and quicker for an administrator if they ever encounter such errors. This blog is an inspiration to one such error which one of my readers found it difficult to understand because he was just hired from college.My blog reader contacted me via comments and told that he is not able to start SQL Service. Without any https://social.msdn.microsoft.com/Forums/sqlserver/en-US/01576f36-8016-4274-a038-bed6f6268b1e/why-error-5118-my-disk-is-not-compressed?forum=sqldatabaseengine delay, I have asked to share the error message. He told that he is stating it from Services.msc and getting an error: ------------------ Services ------------------ Windows could not start the SQL Server (SQL2014) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417. ------------------ OK ------------------I told that this is not an error which http://blog.sqlauthority.com/2015/06/15/sql-server-startup-problem-fix-error-5118-severity-16-state-1/ can help much and I asked to share SQL Server ERRORLOG. Since he was not a SQL person, he was not aware of that file. I shared below blog: SQL SERVER – Where is ERRORLOG? Various Ways to Find its LocationWhen I looked into the ERRORLOG, found below messages.2015-06-10 20:54:44.00 spid7s Starting up database ‘master'. 2015-06-10 20:54:44.00 spid7s Error: 5118, Severity: 16, State: 1. 2015-06-10 20:54:44.00 spid7s The file "C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\master.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.I asked the question – Did you make some changes with the file master.mdf? He said NO so I asked to share screenshot.Blue color of the file indicates that files are compressed and that’s the precise error, we are seeing in the ERRORLOG also. I asked him to un-compress the file using below option.After that he was able to start SQL Service. I asked him the changes which are done and he told that due to disk space issues, complete C:\ drive was compressed.Have you ever enabled compression on SQL machines on the folder which has SQL database files? Never do that! Have you ever encountered these errors? Let me know some of the reasons you did so and faced this issue.
database in SQL Express 2005 Attach database; open encyclopedia; error 5118; unrecognized type; MDF; LDF; datafiles; http://www.ibm.com/support/docview.wss?uid=swg21403492 uncompress; SA; SAEM; SQL Technote (FAQ) This document applies only to the http://www.sqlteam.com/forums/topic.asp?topic_id=128032 following language version(s): US English Question I cannot attach database in SQL Express 2005. Error is: Error: 5118, Severity: 16, State: 1. The file "c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\filename.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed. Cause ms sql The error message appears in the SQL Server 2005 ERRORLOG file. The error is caused when the drive or location of the .mdf or .ldf files is compressed or the individual .mdf or .ldf files are compressed. SQL Server 2005 doesn't support compressed files. With the release of SQL 2005, you can no longer create a read/write database on ms sql error a compressed file system. Answer The .mdf and .ldf files are SQL Server datafiles which are typically located in "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data" folder. To resolve the error you will need to decompress the .mdf or .ldf files (mentioned in the error message) or decompress the drive location of the entire drive has been compressed. To decompress a file or a folder: Right-click the file or folder and select Properties. Select the General tab and click the Advanced button. De-select the "Compress Contents to Save Disk Space" check box. The Compress feature is something that your IT Administration team may have enforced as a security policy. You may need to consult your IT Administration team to provide rights and ability to de-select the compression. Document information More support for: Rational System Architect Installation Software version: 11.3 Operating system(s): Windows Reference #: 1403492 Modified date: 16 September 2009 Site availability Site assistance Contact and feedback Need support? Submit feedback to IBM Support 1-800-IBM-7378 (USA) Directory of worldwide contacts Contact Privacy Terms of use Accessibility
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get your question answered! Username: Password: Save Password Forgot your Password? All Forums SQL Server 2005 Forums Other SQL Server Topics (2005) Attach/Detach Database Confusion Reply to Topic Printer Friendly Author Topic kashif27 Starting Member Pakistan 7 Posts Posted-06/22/2009: 15:05:17 Hi . . . . .I created a database in SQL Server 2005 on one machine. On that machine the database was stored in the default "....\Microsoft SQL Server\MSSQL.1\MSSQL\Data" folder. After that I detached the DB and copied it to another machine. On that machine, initially I stored the database file at location other than the default db file location of sql server. When I tried to attach the db file, it gave me teh following error.TITLE: Microsoft SQL Server Management Studio------------------------------Attach database failed for Server 'UZ'. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------The file "G:\..........\abc.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.Could not open new database 'Dotnet67'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 5118)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=5118&LinkId=20476------------------------------BUTTONS:OK------------------------------Then I copied the db file on this new machine in the default sql server db file folder "....\Microsoft SQL Server\MSSQL.1\MSSQL\Data" and then when I attached the db, it was attached.So though my problem is