Tag Archives: setup

Add node fails with Attempted to read or write protected memory error

Recently I had worked on an issue where the end user was trying to add a third Node to an existing 2 node cluster. Soon after the setup is intiated, it would fail with the following error message (snippet from the Summary.txt).

Exception type: System.AccessViolationException
        Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
      DisableWatson = true
        at Microsoft.SqlServer.Chainer.Infrastructure.MsiNativeMethods.MsiOpenPackageEx(String szPackagePath, UInt32 dwOptions, UInt32& hProduct)
        at Microsoft.SqlServer.Configuration.MsiExtension.InstallPackage.SetCommonProperties()
        at Microsoft.SqlServer.Configuration.MsiExtension.InstallPackage.RunMsiCore(String commandLine)
        at Microsoft.SqlServer.Configuration.MsiExtension.InstallPackage.RunMsiWithRetry(String commandline)
        at Microsoft.SqlServer.Configuration.MsiExtension.InstallPackage.RunMsi(IEnumerable`1 commandLineProps)
        at Microsoft.SqlServer.Configuration.SetupExtension.MSIInstallerEngine.InstallPackage(PackageId pkg, InstallAction pkgAction)
        at Microsoft.SqlServer.Configuration.MsiExtension.PackageInstallAction.Execute(String actionId, TextWriter errorStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)

“Attempted to read or write protected memory. This is often an indication that other memory is corrupt.” Scary little error message! Since this is a setup related issue, the best place to start troubleshooting it is from the Setup Logs.  This article has more details on how to read SQL Server Setup logs.

Detail.txt pointed in the right direction as seen below.

Opening existing patch 'c:WindowsInstaller97363c.msp'.
Couldn't find local patch 'c:WindowsInstaller97363c.msp'. Looking for it at its source.
Resolving Patch source.
SOURCEMGMT: Looking for sourcelist for product {D7C6A337-F6BB-46CB-AE32-204DD6A8825D}
SOURCEMGMT: Trying source c:7cb5fee2d4775f9d53c7f95659x64setup.
Note: 1: 2203 2: c:7cb5fee2d4775f9d53c7f95659x64setupsql_ssms.msp 3: -2147287037 
SOURCEMGMT: Source is invalid due to missing/inaccessible package.
Unable to create a temp copy of patch 'sql_ssms.msp'.
Searching provided command line patches for patch code {D7C6A337-F6BB-46CB-AE32-204DD6A8825D}
Could not find source for missing patch {D7C6A337-F6BB-46CB-AE32-204DD6A8825D} -- orphaning this patch
SequencePatches starts. Product code: {72AB7E6F-BC24-481E-8C45-1AB

Now it was very clear that the issue is the classic missing MSI/MSP file issue. It was just matter of copying the right files to C:WindowsInstaller as explained here and here.

Once the missing files were replaced, the setup completed without any further errors.

SQL Server Install | Use Role Management Tool to install Microsoft .Net framework 3.5 SP1

I was trying to setup SQL Server 2008 on my lab machine running on Windows Server 2008 R2. When the setup was installing the prerequisites, the following error message popped up.


This is a very simple error message, which a DBA would come across often. However the next screen which popped up after this message was interesting.


Since Windows Server 2008 R2 has the .Net framework 3.5 already available as a feature, all we need to do is just enable that feature. There is no need to download the installer and install it separately. As the error message states, just enable it using the “Role Management Tool”. Role Management tool can be found under Server Manager –> Features –> Add features as seen in the following screenshot.



That’s all. Now the .Net framework 3.5.1 is installed and ready to use! After this the SQL Server setup completed successfully.

Find SQL Server version details from the Registry

Last week, the customer wanted to know the Edition information of a Non-Production SQL Server instance. We can easily get this information by executing the following query in SSMS.

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')


This article discusses various approaches that are available to get the SQL Server version information.

To get the Edition information on this Instance was not that straight forward. The Production DBA team was part of the Local Administrators but our group was not granted access on the SQL Server Instance. Hence executing the above query against the instance was not an option.

The information related to SQL Server Setup/version is stored in the Windows Registry. This helped us to get the information related to SQL Server Edition without having access to the instance.

In Windows Registry, this information is stored in the following path.

The highlighted part in the above screenshot varies depending on how many instances are installed on a server. The remaining part in the path does not vary. The information under the Setup key looks like this (click on the image to enlarge).

Do you think of any other approach to get this information? Please feel free to post it in Comments.

SQL Service Pack installation through Automatic Updates

My responses to 3 questions in the past 2 weeks has prompted this post. The issue is something like this.

  • Windows Automatic Updates is enabled on an instance running SQL Server
  • Windows Update prompts that a new SQL Service Pack/Hotfix is available to be installed and the user installs it through Windows Update.
  • Installation completes successfully and the correct version is reflected in SQL Server
  • After the next reboot, again the Windows Automatic Updates prompts to install the Service Pack which was previously installed. The installation would obviously fail since it is already applied.
  • Windows Update keeps prompting for the Service Pack to be installed.

This issue happens because the some of the cached files of the Windows Automatic Updates are corrupt. These files are located in [Default Windows Directory]\SoftwareDistribution\Download folder.

The following steps are useful to workaround this issue.

  • Stop the Automatic Updates service in the Service Control Manager (services.msc)
  • Open the folder C:\WINDOWS\SoftwareDistribution\Downloads
  • Delete all the files in this folder
  • Start the Automatic Update service

Since the cached files were cleared manually, when the Automatic Update service starts for the next time, it will recreate all the files required for its functionality and builds the cache afresh.

Missing domain group error while installing SQL Server 2008 failover cluster

One of the regular readers of my blog $sammy was trying to install SQL Server 2008 in a clustered environment on his Virtual Machine. The underlying operating system was Windows Server 2003. He had configured all the prerequisites correctly. But the Setup was not progressing beyond the Cluster Secutiry Policy screen. Even after giving the correct domain groups in this screen, he was getting an error.

The error message read

Missing domain group.
To continue, provide a valid domain group for the service.

When I looked at this error, I checked with him if the Domain Group was valid and it had the SQL Server Service Account as its member. He confirmed that it was a valid group and the startup account was already a member of that group. Moreover he had granted that group necessary privileges on the domain (enjoying the liberty of installing this on his on VM). He tried adding the group by clicking on the […] button on all the three text boxes and also tried copy/pasting the group name in all the fields. Same error. I was not sure what could be the reasons behind it and could not dig deeper into the issue, since I got caught up with several “production” instance issues.

A day after I got an email from him stating that he got past that error and I was surprised to see the workaround.

  • Click on the browse […] button in the first field i.e. Database Engine domain group text box and select the correct Domain Group.
  • Then copy the Domain Name from the first field and paste it on the next two fields (should not click on […] button)

No more error and the setup progresses to the next step. This could not get any weird than this. One of the most strange behavior I have seen in SQL Server setup!

SQL Server 2005 installation fails with MSXML 6 SP2 error

I have responded to numerous questions in forums where the SQL Server 2005 Installation would fail because MSXML 6 Service Pack 2 was already installed on the computer. This error would only occur on computers running Windows XP. Yesterday one of my team members faced the same issue on his laptop, so I thought of putting together the information here. The error message in the SQL Server Setup log would be something like this.

This package is not supported on this operating system.
SkipInstallCA. Return value 3.
Fatal error during installation
MainEngineThread is returning 1603
Error code 1603
Product: MSXML 6.0 Parser (KB933579)
Installation failed.
Created Custom Action Server with PID 2868 (0xB34).
Running as a service.
Hello, I'm your 32bit Impersonated custom action server.
This package is not supported on this operating system.
SkipInstallCA. Return value 3.

Till recently, the following were the only workarounds to fix this issue.

  • Install Windows Installer Cleanup Utility (MSICUU2.exe) from this KB article and remove MSXML 6 SP2. But this utility caused some irreversible issues to other applications in some occassions. Subsequently this utility was removed from this page.
  • Uninstall MSXML 6 SP2, reboot the computer. Then install MSXML parser from here. This workaround used to work sometimes.
  • If both of these does not work, the only option left was to reach out to Microsoft PSS and ask for a script that they would provide to work around this issue (which of course would come with a disclaimer).

Finally on November 8, 2010 Microsoft had published this KB article in which they have provided MSXMLFix.exe which easily fixes this issue quickly. Even though this fix is a bit late, better late than never.