SQL Server 2005 and 2008 Setup Failures (Compressed DATA Directory)

We are always looking at customer issue reports in order to improve our software and your experience.   The SQL Server Setup development team has identified numerous Watson reports of failed setups due to the compression state of the DATA directory.

Shown below is a failure I reproduced on my local machine.   The DATA directory has been marked for compression but the (master, model, msdb and tempdb) are individual left uncompressed.   I did this by starting the instance and compressing the DATA directory, skipping any in-use file.    SQL Server starts and stops properly and setup generates the following error.

Error Number : 28062 (0x6d9e)
Error Description : MSP Error: 28062  SQL Server Setup cannot install files to the compressed or encrypted folder: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\. To continue, make sure that your installation directories are not compressed or encrypted, or specify a different directory, and then run SQL Server Setup again.

2005SetupFailure

Solution: The resolution is to remove compression from the DATA directory and execute setup again.  

Starting with SQL Server 2005 when the database is opened, if it is in read/write mode and the file is compressed it is considered a fatal error and the database remains closed.   The only exception to this is a user instance and those files will be expanded and opened.

  • I tested by compressing the files in the directory but not the entire directory itself.   SQL Server detected a system database was compressed and failed to start.
  • I tested by compressing the DATA directory but not the system database files.  SQL Server started but failed to open pubs and adventure works.

Below is an example of a failure on startup when I only compressed TEMPDB.

2009-02-20 13:57:24.56 spid9s      Error: 5118, Severity: 16, State: 1.
2009-02-20 13:57:24.56 spid9s      The file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\tempdb.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
2009-02-20 13:57:24.56 spid9s      Error: 5118, Severity: 16, State: 1.
2009-02-20 13:57:24.56 spid9s      The file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\tempdb.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
2009-02-20 13:57:24.62 spid9s      Error: 1802, Severity: 16, State: 4.
2009-02-20 13:57:24.62 spid9s      CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
2009-02-20 13:57:24.62 spid9s      Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.

Windows/Microsoft Update

When installing a SQL Server patch using Windows/Microsoft update you may receive the 0x6d9e error.

Important: Note the KB article number reported in the message.   The files associated with the fix contain the KB number in the name.   The files are located in you Program Files\Microsoft SQL Server\<<version>>\Setup Bootstrap\Log\Hotfix directories.   On 64 bit systems you can have them in Program Files and Program Files (x86).

image

If you view the update history it provides a link to a more detailed description.

image

Notice that the error code is 0x6d9e and can be used to search the detailed SQL Server setup logs for additional details.

image

Go to the log directory and sort by the date modified.   The summary.txt with the most recent date will contain more error details about the installation.   Shown below is the error text from the compressed DATA directory failure.   Notice that the instance name is provided in the log message and detailed log is noted as well.

Product                   : Database Services (SQL2005WOW)
Product Version (Previous): 3310
Product Version (Final)   :
Status                    : Failure
Log File                  : C:\Program Files (x86)\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB955706_sqlrun_sql.msp.log
Error Number              : 28062
Error Description         : MSP Error: 28062  SQL Server Setup cannot install files to the compressed or encrypted folder: C:\Program Files (x86)\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\. To continue, make sure that your installation directories are not compressed or encrypted, or specify a different directory, and then run SQL Server Setup again.

Opening the detailed log file the text indicates the location that is compressed incorrectly.

MSI (s) (E4!08) [11:23:43:488]: Product: Microsoft SQL Server 2005 -- Error 28062. SQL Server Setup cannot install files to the compressed or encrypted folder: C:\Program Files (x86)\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\. To continue, make sure that your installation directories are not compressed or encrypted, or specify a different directory, and then run SQL Server Setup again.

Error 28062. SQL Server Setup cannot install files to the compressed or encrypted folder: C:\Program Files (x86)\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\. To continue, make sure that your installation directories are not compressed or encrypted, or specify a different directory, and then run SQL Server Setup again.
<EndFunc Name='LaunchFunction' Return='28062' GetLastError='0'>

SQL Express

A common cause of this error is an install of the SQL Express edition and then compression of the Program Files folder.  The DATA directory is marked compressed and will fail the setup check.

SQL Server 2008

DATA Directory: SQL Server 2008 can fail with a similar error and the resolution is the same.

Other Directories: SQL Server 2008 has a known issue where is incorrectly checks all installation paths (TOOLS included) and if any of are marked compressed the setup will generate the error.   Make sure all setup destinations are uncompressed when installing SQL Server 2008.   This may include the Program Files (x86) on 64 bit installations for the 32 bit only components.

Bob Dorr
SQL Server Principal Escalation Engineer