次の方法で共有


Do NOT delete files from the Windows Installer folder

C:\windows\Installer is not a temporary folder and files in it should not be deleted. If you do it on machines on which you have SQL Server installed you may have to rebuild the operating system and reinstall SQL Server.

 

The Windows Installer Cache, located in c:\windows\installer folder, is used to store important files for applications installed using the Windows Installer technology including SQL Server and should not be deleted.

 

The installer cache is used to maintain(remove / update) the applications and patches installed on the machine . The installer files are a record of file versions and registry dependencies involved in a particular application or application update installation. The availability of this record in the cache helps to uninstall and update applications properly.

 

Without them the already installed applications like SQL Server may continue to run fine. However, the existing patches and applications cannot be uninstalled cleanly nor updates applied properly. This implies that when any of vendors of the applications installed on this machine, Microsoft or otherwise, were to release a security patch or fix or update, you will very likely not be able to apply them to the machine. Given that being unable to patch / update an application essentially makes the application unmaintainable, this puts you outside support boundaries.

 

A server rebuild is required to get back to a supportable state because there are multiple applications that need fixing and each will need all the right versions and editions and patches to be put back into the cache. The registry dependencies and product ID dependencies need to be taken care of as well. A full system state restore from when the cached files were present MAY help if there have been no updates or changes between the backup and the loss of the cached files.

 

The SQL Support team uses a script that helps us tide over situations where a few of the SQL Server installer cache files go missing. This is used on a best effort basis with the explicit understanding that we make no assertions of its infallibility and we cannot be sure that all future updates will work correctly.

 

More details about this is documented on KB https://support.microsoft.com/kb/2667628 { Missing Windows Installer Cache Files Will Require a Computer Rebuild}

 

If you have faced this issue on any of your server and not certain on who deleted this files please enable auditing on “C:\windows\installer” folder to track the user or application which deletes this folder.

 

The audit log appears in the Security log in Event Viewer. To enable this feature:

 

1. Click Start, click Control Panel, click Performance and Maintenance, and then click Administrative Tools.

2. Double-click Local Security Policy.

3. In the left pane, double-click Local Policies to expand it.

4. In the left pane, click Audit Policy to display the individual policy settings in the right pane.

5. Double-click Audit object access.

6. To audit successful access of specified files, folders and printers, select the Success check box.

7. To audit unsuccessful access to these objects, select the Failure check box.

8. To enable auditing of both, select both check boxes.

9. Click OK.

Specifying Files and Folders to Audit

1. After you enable auditing Right-click the “c:\windows\installer” folder then click Properties.

2. Click the Security tab, and then click Advanced.

3. Click the Auditing tab, and then click Add.

4. In the Enter the object name to select box, type Everyone.

5. Click OK.

6. Select the Successful or Failed check boxes for the delete and “Delete subfolders and files” and then click OK.

7. Click OK, and then click OK.

 

 

Authored by:

Karthick PK, Technical Lead, Microsoft SQL Server Support

Ajith Krishnan, Escalation Engineer, Microsoft SQL Server Support

Comments

  • Anonymous
    April 29, 2013
    Good one! I hope every DBA will keep this in mind!

  • Anonymous
    June 04, 2013
    Helpful

  • Anonymous
    March 13, 2014
    Have the bloggers tested the behavior of cleanmgr.exe, "Disk Cleanup" tab, "Windows Update Cleanup" and (less likely) "Service Pack Backup Files" (both are listed in Disk Cleanup's "Files to delete" list)? Could it be that the left hand (SQL Server's Setup) does not know what damage the right hand (Windows' Disk Cleanup) has done? Just a thought - I cannot afford to test this :)

  • Anonymous
    June 05, 2014
    The comment has been removed

  • Anonymous
    November 02, 2015
    The comment has been removed