Installation Error resulting in SQL Server 2005 issues
I installed the ORCAS Jan CTP yesterday on my Windows XP system. I already had installations of VS2005 and SQL Server 2005 present. Part of the ORCAS CTP installation is the automatic installation of Sql Server 2005 Everywhere which resulted in a 100% repeatable error when using my regularly installed SQL Server 2005 instance when attempting to Modify a table in Sql Server Management Studio. This error stated that
Exception has been thrown by the target of an invocation. (SQL Editors)
Additional information:
An error occurred creating the configuration handler for system.data: Column 'InvariantName' is constrained to be unique. Value 'Microsoft.SqlServerCe.Client' is already present (C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 127) ...
I have pasted the System.data tag information from this file, and, yes, there is a duplication of the value:
<
system.data><
DbProviderFactories><
addname="Odbc Data Provider"invariant="System.Data.Odbc"description=".Net Framework Data Provider for Odbc"type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><
addname="OleDb Data Provider"invariant="System.Data.OleDb"description=".Net Framework Data Provider for OleDb"type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><
addname="OracleClient Data Provider"invariant="System.Data.OracleClient"description=".Net Framework Data Provider for Oracle"type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><
addname="SqlClient Data Provider"invariant="System.Data.SqlClient"description=".Net Framework Data Provider for SqlServer"type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><
addname="SQL Server CE Data Provider"invariant="Microsoft.SqlServerCe.Client"description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition"type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /><
addname="SQL Server Everywhere Client Data Provider"invariant="Microsoft.SqlServerCe.Client"description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition Client"type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></
DbProviderFactories></
system.data>I Uninstalled the SQL Server Everywhere and SQL Express instances using the Server Maintenance options in Control Panel \ Add/Remove Programs, but this does not result in the error being corrected. What has worked for me is to comment out the last two <add name... tags
<!--
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /><add name="SQL Server Everywhere Client Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition Client" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
-->I then had to restart SQL Server and it now seems to operate correctly, albeit, without the SQL Everywhere Edition (which I don't plan to use just yet, anyway).
Installers should be aware of this 'Gotcha' and either opt to not install the SQL Everywhere Edition, or to install on a machine that does not have an existing installation of SQL Server 2005.

