Purpose :

The purpose of this script is to send a daily report with the following informations :

– hostname

– software registry hive size

This script has been written to get a status of our SQL server with the problem described here (http://rusanu.com/2013/02/15/registry-bloat-after-sql-server-2012-sp1-installation/) :
SQL Server 2012 installation has the potential to leave an msiexec.exe installer process running after the installation finishes, as described in Windows Installer starts repeatedly after you install SQL Server 2012 SP1
But the this problem has a much sinister side effect: it causes growth of the HKLM\Software registry hive. Except for the System hive, all the other registry hives are still restricted in size to a max of 2GB, see Registry Storage Space:

Views of the registry files are mapped in paged pool memory…The maximum size of a registry hive is 2 GB, except for the system hive.

Pre-requesite :

Create a text file containing the hostname of the servers you want to check:

Example of “sql_upd.txt” :



Script :

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social Media Auto Publish Powered By : XYZScripts.com
%d bloggers like this: