<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Mark Michaelis' Weblog - .Net</title>
    <link>http://mark.michaelis.net/Blog/</link>
    <description>A cacophony of ramblings from my potpourri of notes</description>
    <copyright>Mark Michaelis</copyright>
    <lastBuildDate>Tue, 09 Dec 2008 04:56:10 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>mark@michaelis.net</managingEditor>
    <webMaster>mark@michaelis.net</webMaster>
    <item>
      <trackback:ping>http://mark.michaelis.net/Blog/Trackback.aspx?guid=e0b70f97-72df-4bc6-8775-8523483c38a2</trackback:ping>
      <pingback:server>http://mark.michaelis.net/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://mark.michaelis.net/Blog/PermaLink.aspx?guid=e0b70f97-72df-4bc6-8775-8523483c38a2</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://mark.michaelis.net/Blog/CommentView.aspx?guid=e0b70f97-72df-4bc6-8775-8523483c38a2</wfw:comment>
      <wfw:commentRss>http://mark.michaelis.net/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e0b70f97-72df-4bc6-8775-8523483c38a2</wfw:commentRss>
      <slash:comments>25</slash:comments>
      <title>SQL Server 2008 Install Nightmare</title>
      <guid isPermaLink="false">http://mark.michaelis.net/Blog/PermaLink.aspx?guid=e0b70f97-72df-4bc6-8775-8523483c38a2</guid>
      <link>http://mark.michaelis.net/Blog/SQLServer2008InstallNightmare.aspx</link>
      <pubDate>Tue, 09 Dec 2008 04:56:10 GMT</pubDate>
      <description>&lt;p&gt;
It all started with an installation of Visual Studio 2008 SP1, which included SQL
Server Express 2005.&amp;nbsp; From there I wished to install SQL Server 2008 Standard
on the default port and upgrade SQL Server 2005 Express to SQL Server 2008 express.&amp;nbsp;
Unfortunately, this proved to be a troublesome desire.&amp;nbsp; I have no idea what the
cause is exactly, except that I was not the only one on my team to have issues.
&lt;/p&gt;
&lt;p&gt;
At this point, I am not sure the order that things occurred exactly, but I have a
host of error messages and ways to handle them.&amp;nbsp; I can't say it will work for
you - I sure hope you didn't have to go through all these to install SQL Server 2008
- but I did so I decided to share the experience.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;a name="Uninstall"&gt;Uninstall procedure:&lt;/a&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The most important step with any failed SQL Server 2008 installation is uninstalling
the failed attempt - yes, SQL Server 2008 needs to be uninstalled if an installation
fails as it doesn't automatically roll back.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
At the moment there is no complete knowledge base article on how to manually uninstall
SQL Server 2008.&amp;nbsp; However, there are instructions for &lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fsupport.microsoft.com%2fkb%2f909967"" target="_blank"&gt;how
to uninstall an instance of SQL Server 2005 manually&lt;/a&gt; and there is a lot of similarity
with SQL Server 2008, so review and follow those instructions were it makes sense.&amp;nbsp;
Below is a list of the steps I followed:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Uninstall the the installation from &lt;strong&gt;Programs and Features&lt;/strong&gt;/&lt;strong&gt;Add
Remove Programs&lt;/strong&gt;, selecting &lt;strong&gt;Microsoft SQL Server 2008&lt;/strong&gt; and
double clicking to run the uninstaller. (You always need to begin with this step or
the command line equivalent.)&amp;nbsp; Do not use the Windows Installer Cleanup Tool
to remove SQL Server 2008 without first trying to do so from &lt;strong&gt;Programs and
Features&lt;/strong&gt;/&lt;strong&gt;Add Remove Programs&lt;/strong&gt;. During the uninstall, you
can choose (via series of check boxes), which components of SQL Server 2008 to uninstall
- including any shared components for when you have multiple instances.&amp;nbsp; In the
case of multiple instances, each instance needs to be uninstalled independently. 
&lt;li&gt;
Run&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font face="Consolas"&gt;SC.EXE query | find /i "SERVICE_NAME:
MSSQL"&lt;/font&gt;&amp;nbsp;&lt;br&gt;
to verify that there are no services instances for SQL Server that should have been
deleted but weren't.&amp;nbsp; Any items that appear unexpectedly, should be removed with
the command 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font face="Consolas"&gt;&lt;font face="Consolas"&gt;SC.EXE&lt;/font&gt; delete
&amp;lt;service name&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
Where service name is the name of the service returned by &lt;font face="Consolas"&gt;sc.exe
query.&lt;/font&gt; 
&lt;br&gt;
If &lt;font face="consolas"&gt;SC.EXE&lt;/font&gt; fails to uninstall the services and there are
no other instances of SQL Server installed, delete registry keys &lt;font face="consolas"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer&lt;/font&gt;, &lt;font face="consolas"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER&lt;/font&gt; and &lt;font face="consolas"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLAgent&lt;/font&gt; 
&lt;li&gt;
Search for &lt;font face="consolas"&gt;&amp;lt;Instance Name&amp;gt;&lt;/font&gt; in &lt;font face="consolas"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall&lt;/font&gt;.&amp;nbsp;
If you find any, usually on a value called &lt;font face="consolas"&gt;InstanceId&lt;/font&gt;,
run 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font face="consolas"&gt;MSIEXEC /X &amp;lt;GUID&amp;gt;&lt;/font&gt; 
&lt;br&gt;
where the &lt;font face="consolas"&gt;&amp;lt;GUID&amp;gt;&lt;/font&gt; is the key name containing the &lt;font face="consolas"&gt;InstanceId&lt;/font&gt; value. 
&lt;li&gt;
Delete the following registry keys/values if they exist 
&lt;ul&gt;
&lt;li&gt;
&lt;font face="consolas"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\&amp;lt;Feature&amp;gt;.&amp;lt;Instance
Name&amp;gt; &lt;/font&gt; 
&lt;li&gt;
&lt;font face="consolas"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\&amp;lt;Instance
Name&amp;gt;&lt;/font&gt; 
&lt;li&gt;
&lt;font face="consolas"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance
Names\SQL\&amp;lt;Instance Name&amp;gt;&lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Delete &lt;font face="consolas"&gt;%ProgramFiles%\Microsoft SQL Server\&amp;lt;Feature&amp;gt;.&amp;lt;Instance
Name&amp;gt;&lt;/font&gt; if it exists. 
&lt;li&gt;
Finally, search for the &lt;font face="consolas"&gt;&amp;lt;Feature&amp;gt;.&amp;lt;Instance Name&amp;gt;&lt;/font&gt; in
the registry and consider deleting any remaining items. In some cases this involves
deleting the value because the other values within the same key are for a different
instance.&amp;nbsp; In other cases, the entire key will need to be deleted because there
is no other instance data within the key.&amp;nbsp; Hopefully, you won't encounter anything
significant, but this is a good final step.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;font face="consolas"&gt;&amp;lt;Feature&amp;gt;&lt;/font&gt; has a value like &lt;font face="consolas"&gt;MSSQL10&lt;/font&gt; or &lt;font face="consolas"&gt;MSAS10&lt;br&gt;
&amp;lt;Instance Name&amp;gt;&lt;/font&gt; is the name of the SQL Server instance you are trying
to uninstall.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Pheww, now that we have completely uninstalled, lets review potential errors you might
encounter:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Error&lt;/strong&gt;: A later version of Microsoft SQL Server Compact is already
installed.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Strange, since all I wanted was to install the SQL Server 2008 Tools.&amp;nbsp; Here are
the steps to correct:
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;ol&gt;
&lt;ol&gt;
&lt;li&gt;
Uninstall all parts of the SQL Server Compact Framework 3.5 SP1.&amp;nbsp; 
&lt;li&gt;
Rerun SQL Server 2008 install.&amp;nbsp; 
&lt;li&gt;
After installing SQL Server 2008 Tools, downloaded and reinstalled the SQL Server
Compact Framework SP1.&amp;nbsp; The tools are located here:&lt;/li&gt;
&lt;/ol&gt;
&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fwww.microsoft.com%2fdownloads%2fdetails.aspx%3fFamilyID%3ddc614aee-7e1c-4881-9c32-3a6ce53384d9"&gt;SQL
Server Compact 3.5 SP1 for desktop&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fwww.microsoft.com%2fdownloads%2fdetails.aspx%3fFamilyID%3dfce9abbf-f807-45d6-a457-ab5615001c8f%26DisplayLang%3den"&gt;SQL
Server Compact 3.5 SP1 for Devices&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fwww.microsoft.com%2fdownloads%2fdetails.aspx%3fFamilyID%3dfa751db3-7685-471b-ac31-f1b150422462%26DisplayLang%3den"&gt;SQL
Server Compact 3.5 SP1 Server Tools (Merge Replication Serve2r Side Config)&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fwww.microsoft.com%2fdownloads%2fdetails.aspx%3fFamilyId%3d07829770-73A7-41E4-880D-E74B1A353623%26displaylang%3den"&gt;SQL
Server Compact 3.5 SP1 Books Online and Samples&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;strong&gt;Error:&lt;/strong&gt; The following error has occurred: Could not open key: &lt;font face="Courier New"&gt;UNKNOWN\Components\CBFF54E0ED12B0946A1C52E5E82ABC38\E7BEEF5F746F8AB9076051A5574&lt;/font&gt;.&amp;nbsp;
Verify that you have sufficient access to that key, or contact your support personnel.
(Errors could be for other GUIDs as well)
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;strong&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="177" alt="The following error has occurred: Could not open key: UNKNOWN\Components\CBFF54E0ED12B0946A1C52E5E82ABC38\E7BEEF5F746F8AB9076051A5574.  Verify that you have sufficient access to that key, or contact your support personnel." src="http://mark.michaelis.net/Blog/content/binary/SQLServer2008InstallNightmare_F264/image23.png" width="616" border="0"&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Errors could be for other GUIDs as well including &lt;font face="Courier New"&gt;UNKNOWN\Components\493032C95B52CBD448DD2B5A52C50E9A\3EC761FD7E06AE4499CE52705CF173EA&lt;/font&gt;.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
This error is a permissions error in the registry.&amp;nbsp; If you search the registry
for the first GUID you will find the key is likely mapped to &lt;font face="Courier New"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\&amp;lt;user
SID&amp;gt;\Components\&amp;lt;GUID&amp;gt;&lt;/font&gt;.&amp;nbsp; Beneath this key is a sub key for the
second GUID.&amp;nbsp; However, selecting the subkey will result in an access denied message.
&lt;/p&gt;
&lt;p&gt;
To correct the problem:
&lt;/p&gt;
&lt;p&gt;
1. Verify that you are running RegEdit as administrator (to avoid UAC issues with
Windows Vista and Windows 3008+).
&lt;/p&gt;
&lt;p&gt;
2. Edit the permission of the parent key(&lt;font face="Courier New"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\&amp;lt;user
SID&amp;gt;\Components&lt;/font&gt;) and click the &lt;strong&gt;Advanced&lt;/strong&gt; button. (Optionally,
you could edit the permissions on the parent GUID (&lt;font face="Courier New"&gt;CBFF54E0ED12B0946A1C52E5E82ABC38&lt;/font&gt; in
my example) but the same problem is likely to exist with other keys so you may as
well deal with this in mass.)
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fmark.michaelis.net%2fBlog%2fcontent%2fbinary%2fSQLServer2008InstallNightmare_F264%2fimage.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="252" alt="image" src="http://mark.michaelis.net/Blog/content/binary/SQLServer2008InstallNightmare_F264/image_thumb.png" width="473" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p align="left"&gt;
3.&amp;nbsp; From the Advanced dialog, select the &lt;strong&gt;Owner&lt;/strong&gt; tab and check
the &lt;strong&gt;Replace owner on subcontainers and objects&lt;/strong&gt; check box.&amp;nbsp; Also,
verify that System is the owner (else add System and be sure to select it so it will
become the owner).&amp;nbsp; 
&lt;/p&gt;
&lt;p align="left"&gt;
4. Next click &lt;strong&gt;Apply&lt;/strong&gt;.
&lt;/p&gt;
&lt;p align="left"&gt;
4.&amp;nbsp; You may be presented with an error dialog, "Registry Editor could not set
owner on the key currently selected, or some of its subkeys."&amp;nbsp; You can safely
ignore this warning as long as you are then able to view the subkey.&amp;nbsp; If not
:(, you may have to follow the same process but in safe mode or download &lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2ftechnet.microsoft.com%2fen-us%2fsysinternals%2fbb896653.aspx"" target="_blank"&gt;Process
Explorer&lt;/a&gt; and search for any process that is holding onto the key so that you can
shut it down.&amp;nbsp; (The idea that a process is preventing you from viewing the key
is a stretch in my mind but I have had heard the Platform team of Microsoft's product
support group suggest this.)
&lt;/p&gt;
&lt;p align="left"&gt;
5.&amp;nbsp; Lastly, select the "Effective Permissions" tab and verify that both your
own User Id and the System user have &lt;strong&gt;Full Control&lt;/strong&gt;.&amp;nbsp; If not,
add both users via the &lt;strong&gt;Permissions&lt;/strong&gt; tab.
&lt;/p&gt;
&lt;p align="left"&gt;
If this still fails, consider resetting registry permissions back to the default settings
using the following command:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;    Registry security: secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose /areas REGKEYS&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error:&lt;/strong&gt; SQL Server setup has encountered the following error. sku &lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="#uninstall"&gt;Manually uninstall&lt;/a&gt; SQL Server 2008 installation and try installing
again.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error:&lt;/strong&gt; Error 1316.A network error occurred while attempting to read
file &lt;font face="Courier New"&gt;ssceruntime-enu.msi&lt;/font&gt;.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fconnect.microsoft.com%2fSQLServer%2ffeedback%2fViewFeedback.aspx%3fFeedbackID%3d363055"" target="_blank"&gt;Connect
mentions this error&lt;/a&gt;.&amp;nbsp; I followed a similar procedure.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Extract the &lt;font face="Courier New"&gt;ISO&lt;/font&gt; file or copy the SQL Server CD onto
the local drive.&amp;nbsp; 
&lt;li&gt;
Copy the .\&lt;font face="Courier New"&gt;&amp;lt;platform&amp;gt;\Setup\SSCERuntime.msi&lt;/font&gt; file
to &lt;font face="Courier New"&gt;SSCERuntime-enu.msi&lt;/font&gt; within the same directory.&amp;nbsp;
This seemed appears to work around the error.&amp;nbsp; I haven't tested this exhaustively,
but I suspect this is a 64-bit problem only so the &amp;lt;platform&amp;gt; directory is most
likely &lt;font face="Courier New"&gt;x64&lt;/font&gt;. (Please comment and let me know if you
see this on other platforms.)&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error&lt;/strong&gt;: Error result: -2068578301
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="#uninstall"&gt;Manually uninstall&lt;/a&gt; SQL Server 2008 installation and try installing
again
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt;&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error&lt;/strong&gt;: SQL Server installation failed. To continue, investigate the
reason for the failure, correct the problem, uninstall SQL Server, and then rerun
SQL Server Setup.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Sometimes, the error log points to a &lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fwww.microsoft.com%2fproducts%2fee%2ftransform.aspx%3fProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.0.1600.2"" target="_blank"&gt;message
indicating there was a network error&lt;/a&gt;.&amp;nbsp; During the occasions that I encountered
this error message within the log, my installation failed with two red X icons in
the concluding dialog, only one of which had a corresponding message (I wish I had
taken a screen shot.)&amp;nbsp; The solution for me was to &lt;a href="#uninstall"&gt;manually
uninstall&lt;/a&gt;. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error&lt;/strong&gt;: Could not find the Database Engine startup handle.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
This error appears after an installation completes unsuccessfully and a different
error dialog appeared earlier in the installation.&amp;nbsp; &lt;a href="#uninstall"&gt;Manually
uninstall&lt;/a&gt; all the instance related installations items, address the previous dialog,
and re-attempt the install.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error (during repair):&lt;/strong&gt; The SQL Server feature 'SQL_Engine_Core_Inst'
is not in a supported state for repair, as it was never successfully configured. Only
features from successful installations can be repaired. To continue, remove the specified
SQL Server feature.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
This error appears if you attempt a repair of a failed installation.&amp;nbsp; The work
around it to &lt;a href="#uninstall"&gt;manually uninstall&lt;/a&gt; the all items related to
the instance, and re-attempt the install by addressing the original error.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error:&lt;/strong&gt; A MOF syntax error occurred. 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="#uninstall"&gt;Manually uninstall&lt;/a&gt; and then re-attempt the install.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Error&lt;/strong&gt;: SQL Express 2008 ERROR: Failed to generate a user instance
of SQL Server and&lt;br&gt;
&lt;strong&gt;Error:&lt;/strong&gt; Failed to generate a user instance of SQL Server due to a
failure in starting the process for the user instance. The connection will be closed."
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Okay, admittedly this error doesn't appear during install, but it is an install related
error none the less.
&lt;/p&gt;
&lt;p&gt;
Recently I upgraded my SQL Express 2005 instance (installed by Visual Studio 2008)
to SQL Server Express 2008.&amp;nbsp; (Visual Studio 2008 Express editions will automatically
be upgraded when installing Service Pack 1, but not so with all other instances.)&amp;nbsp;
After upgrading, none of my data driven unit tests were successfully passing.&amp;nbsp;
Instead, they were failing with the message:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
The unit test adapter failed to connect to the data source or to read the data. For
more information on troubleshooting this error, see "&lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fgo.microsoft.com%2ffwlink%2f%3fLinkId%3d62412"" target="_blank"&gt;Troubleshooting
Data-Driven Unit Tests&lt;/a&gt;" in the MSDN Library.&lt;br&gt;
Error details: Failed to generate a user instance of SQL Server due to a failure in
starting the process for the user instance. The connection will be closed."
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
It took some sleuthing to determine the solution.&amp;nbsp; Firstly, I checked the error
files located in my &lt;font face="Courier New"&gt;%USERPROFILE%\Local Settings\Application
Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS&lt;/font&gt; (the connecting user's
SQL Express data directory) directory.&amp;nbsp; That indicated errors were in loading
the &lt;font face="consolas"&gt;modal.mdf&lt;/font&gt; and corresponding log file within afore
mentioned directory.&amp;nbsp; However, when connecting to the SQL Express instance from
SQL Server Management Studio, there were no such issues.&amp;nbsp; This was because the
instances connected to by SQL Server Management Studio were in the &lt;font face="Courier New"&gt;%PROGRAMFILES%\Microsoft
SQL Server&lt;/font&gt; directory.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Generally, when a new MDF file is connected to by SQL Express, it copies the master,
model, MSDB, and tempdb databases (mdf and log files) into the connecting user's SQL
Express data directory.&amp;nbsp; (This is frequently why the first time connecting for
each user takes longer.)&amp;nbsp; Such a copy was unnecessary in my case because the
databases already existed.&amp;nbsp; Unfortunately, the databases were from the SQL Server
Express 2005 instance, and not the upgraded database from SQL Server 2008 Express.
&lt;/p&gt;
&lt;p&gt;
To correct the problem, I
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Shut down SQL Server Express 
&lt;li&gt;
Deleted the users SQL Express directory "%USERPROFILE%\Local Settings\Application
Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS" 
&lt;li&gt;
Restarted SQL Server Express:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Here's a cmd script for what is needed:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
SC.EXE stop "MSSQL$SQLEXPRESS"&lt;br&gt;
CHOICE /C:N /D:N /N /T:5&lt;br&gt;
&lt;font face="Courier New"&gt;RD /S /Q "%USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft
SQL Server Data\SQLEXPRESS"&lt;br&gt;
&lt;/font&gt;SC.EXE start "MSSQL$SQLEXPRESS"
&lt;/p&gt;
&lt;/blockquote&gt;&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;More Errors&lt;/strong&gt;:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Unfortunately, this is not anything even close to an exhaustive list of errors.&amp;nbsp;
If you have other messages I have not covered, the key place to check is &lt;font face="Consolas"&gt;%Programfiles%\Microsoft
sql server\100\Setup bootstrap\Log\&amp;lt;&lt;/font&gt;&lt;var&gt;&lt;font face="Consolas"&gt;DateTime&amp;gt;&lt;/font&gt;.&lt;/var&gt;&amp;nbsp;
To begin, open the &lt;font face="Consolas"&gt;Summary_&amp;lt;computername&amp;gt;_&amp;lt;DateTime&amp;gt;.txt&lt;/font&gt; file
to see an overview of the results.&amp;nbsp; If that doesn't help, consider reviewing
one of the &lt;font face="consolas"&gt;Detail*.txt&lt;/font&gt; files.&amp;nbsp; These errors are
all addressed in &lt;a href="http://mark.michaelis.net/Blog/ct.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2&amp;amp;url=http%3a%2f%2fsupport.microsoft.com%2fkb%2f909967"" target="_blank"&gt;KB909967
- How to troubleshoot SQL Server 2008 Setup issues&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Another item that seemed to cause instability in my SQL Server 2008 installation was
mounting the SQL Server 2008 iso file (especially mounting it over the network).&amp;nbsp;
I recommend that you extract the ISO into a local directory and then installing from
the local directory.
&lt;/p&gt;
&lt;p&gt;
Overwhelmingly, the correction is to &lt;a href="#uninstall"&gt;manually uninstall&lt;/a&gt; the
attempted install instance.
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://mark.michaelis.net/Blog/aggbug.ashx?id=e0b70f97-72df-4bc6-8775-8523483c38a2" /&gt;
&lt;br /&gt;
&lt;hr /&gt;© Copyright 2005-2008 Mark Michaelis</description>
      <comments>http://mark.michaelis.net/Blog/CommentView.aspx?guid=e0b70f97-72df-4bc6-8775-8523483c38a2</comments>
      <category>Computer Related</category>
      <category>.Net</category>
    </item>
  </channel>
</rss>