Tag Cloud

Tuesday, April 26, 2011

Installing SQL Server 2008 R2 Cumulative Update from a Network Share

Note: this bug only exists if the machine you are running the update on has .Net 4 installed.


It has been the process at my work location that we store all install media and patches on a network share - as is probably a common practice (much easier than CDs/DVDs).  And this practice has worked well for us.  But to expound just a little, here is the standard practice of how we prep that install share - using SQL Server 2008 R2 Cumulative Update 6.
  1. Create a directory to hold the patches (<install share>\SQL2008R2\patches\rtm\cum07\x64).
  2. Download the SharePoint and Native Client updates to this new directory.
  3. Under this directory create a sub-directory (cum07).
  4. Download the main updater to this sub-directory.
  5. Using 7-Zip, extract the three downloads from their EXE containers.
  6. The main updater extracted another installer.  Extract this installer using 7-Zip.
And now the install share has been prepped.  Prior to Cumulative Update 6, this is all that needed to happen (given - I don't remember which update prior to 6 I had previously attempted; but I believe it was CU5).  Starting with CU6, the main installer fails with a very non-helpful error dialog (asking if you want to debug).
After some searching it appears that this is a new feature in the installer that causes install from a network share to fail.  But this can be fixed.  There are two files that need to be edited to allow installing from a network share.
  1. <main installer directory>\setup.exe.config
  2. <main installer directory>\x64\setup100.exe.config
  3. <main installer directory>\x64\fixsqlregistrykey_x64.exe.config
  4. <main installer directory>\x64\fixsqlregistrykey_ia64.exe.config
  5. <main installer directory>\x64\fixsqlregistrykey_x86.exe.config
  6. <main installer directory>\x64\landingpage.exe.config
Inside both of these files there is this following snippet.

<runtime>
  <legacyCasPolicy enabled="true" />
</runtime>

This section should be changed to the following, and installing from a network share will work.  I do not know what other impact this has - but have not noticed any negative side affects yet.

<runtime>
  <!--<legacyCasPolicy enabled="true" />-->
  <!-- The following two changes allow for install from network drives -->
  <legacyCasPolicy enabled="false" />
  <loadFromRemoteSources enabled="true" />
</runtime>

legacyCasPolicy: http://msdn.microsoft.com/library/ee191568.aspx
loadFromRemoteSources: http://msdn.microsoft.com/library/dd409252.aspx

Discussions
http://connect.microsoft.com/SQLServer/feedback/details/573043/sql-server-2008-r2-cumulative-updates-wont-install-with-dotnet-framework-4-0-30319
http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/3bc7cebb-2264-4e51-878b-0cce193c2780

0 comments: