Launching SQL Server 2008 Express from VS2010 in SQL Server Management Studio


My laptop has Windows 7, x64 bit, and was built this past December (2 months ago). It has <strong>Microsoft Visual Studio 2010</strong> installed with <strong>SQL Server 2008 Express</strong>, but I had not used "Sql2008" before on this PC.

<strong>SQL Server Management Studio</strong> <em>has</em> been installed all that time, and I use it to connect to our company's instance of SQL Server.

Now, I need to do some development and debugging on a large stored procedure that is not returning the data we expect. I got a backup of the database <strong>companyDB.bak</strong> and moved that to my Win7x64 laptop in this folder: C:\Temp\companyDB.bak.

<img alt="companyDB.bak" class="b-lazy" data-src="https://i.stack.imgur.com/h2j5s.jpg" data-original="https://i.stack.imgur.com/h2j5s.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

I open <strong>SQL Server Management Studio</strong> and select <strong>(local)</strong> and click "Connect":

<img alt="(local)" class="b-lazy" data-src="https://i.stack.imgur.com/zxctt.jpg" data-original="https://i.stack.imgur.com/zxctt.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

After some time, I get error message:


A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)


<img alt="Error 2" class="b-lazy" data-src="https://i.stack.imgur.com/7bqXg.jpg" data-original="https://i.stack.imgur.com/7bqXg.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

I do some research and found this helpful link: <a href="http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/" rel="nofollow">SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: )</a>

His first step is to make sure SQL Server is running, which it seems to be:

<img alt="SQL Server (SQLEXPRESS)" class="b-lazy" data-src="https://i.stack.imgur.com/yCcT2.jpg" data-original="https://i.stack.imgur.com/yCcT2.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

Next, it says to make sure I am using TCP/IP Port 1433. When I looked, it seemed all of mine were BLANK, so I changed them so that all use Port 1433, then Stopped and Restarted the service:

<img alt="TCP Port 1433" class="b-lazy" data-src="https://i.stack.imgur.com/otSXG.jpg" data-original="https://i.stack.imgur.com/otSXG.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

OK, now I can get my local instance to start up.

When I attempted to restore the database using my "companyDB.bak" file, I get an error saying the database I am restoring from is newer than I am saving it to:


System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running version 10.00.2531. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)


<img alt="SmoExtended" class="b-lazy" data-src="https://i.stack.imgur.com/rFTC3.jpg" data-original="https://i.stack.imgur.com/rFTC3.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

So, I downloaded <strong>SQLEXPRWT_x64_ENU.exe</strong> from here: from here: <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30438" rel="nofollow">http://www.microsoft.com/en-us/download/details.aspx?id=30438</a>

During installation, I get this error saying that it can't install until **SQL Server 2005 Express Tools" are removed:

<img alt="SQL Server 2005 Express Tools" class="b-lazy" data-src="https://i.stack.imgur.com/MYod8.jpg" data-original="https://i.stack.imgur.com/MYod8.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

Now below, if you will notice, I did a search of the items installed under my computer, and the only thing there is with "2005" in the title is <strong>VC++ 2005 Redistributable</strong>:

<img alt="VC++ 2005 Redistributable" class="b-lazy" data-src="https://i.stack.imgur.com/J9nJ2.jpg" data-original="https://i.stack.imgur.com/J9nJ2.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

So, I cancelled the installation and started it again, this time selecting the "Upgrade from SQL Server 2000, SQL Server 2005 or SQL Server 2008" option, but I got the same error message.

I do not seem to be able to continue.

Obviously, some of my installed applications need <strong>VC++ 2005 Redistributable</strong>, or I would not have installed it a few months ago.

<h2>How do I proceed?</h2>


Following Davide Mauri's <a href="http://sqlblog.com/blogs/davide_mauri/archive/2010/05/04/sql-server-2008-r2-installation-and-the-phantom-of-sql-server-2005-express.aspx" rel="nofollow">SQL Server 2008 R2 Installation and the Phantom of SQL Server 2005 Express</a> blog, I searched for the term Sql2005SsmsExpressFacet in the log file "C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\yyyymmdd_hhmmss\Detail.txt".

It only pointed to a single registry entry (where his pointed at two): ""

Init rule target object: Microsoft.SqlServer.Configuration.SetupExtension.Sql2005SsmsExpressFacet Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine Sco: Attempting to open registry subkey Sco: Attempting to open registry subkey SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ShellSEM Rule 'Sql2005SsmsExpressFacet' detection result: SQL 2005 Ssms EE installed=True Evaluating rule : Sql2005SsmsExpressFacet Rule running on machine: 5000-C6E8-1 Rule evaluation done : Failed Rule evaluation message: The SQL Server 2005 Express Tools are installed. To continue, remove the SQL Server 2005 Express Tools.

But, my registry does not even HAVE that directory:

<img alt="registry" class="b-lazy" data-src="https://i.stack.imgur.com/ZojtD.jpg" data-original="https://i.stack.imgur.com/ZojtD.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

<strong>[UPDATE 2]:</strong>

OK, so our IT guy has given me the full blown <strong>SQL Server 2008 R2</strong> CD to install, but I am still hitting this same roadblock with it thinking that <strong>SQL Server 2005 Express tools</strong> are still installed - so I can not move forward.

<img alt="SQL Server 2008 R2 Setup" class="b-lazy" data-src="https://i.stack.imgur.com/vvYxH.jpg" data-original="https://i.stack.imgur.com/vvYxH.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />


To fix this, I did the following:

<ul><li>Uninstall all of the SQL Management Studio instances I had</li> <li>reboot</li> <li>Install SQL Server 2008 (not the Express version)</li> <li>reboot</li> </ul>


I guess Microsoft likes selling their product, and it worked.


  • Interprocess communication from SQL Server Project
  • How to implement TCP KeepAlive in VB.NET on a TCP Client(socket)
  • Boost asio socket: how to get your own IP, port adress?
  • Is it possible to find which user is at the other end of a localhost TCP connection?
  • Derby on Intellij
  • How do I check if a SSLSocket connection is sane on Java?
  • How to setup a reverse proxy on several ports (tcp & udp)
  • How iperf calculates network statistics
  • PDO connection to MySQL database refused
  • Cannot log in using SQL authentication ONLY from a remote server
  • How can I set the buffer size for the underneath Socket UDP?
  • Installing SSL on AWS EC2 Bitnami Mean Stack
  • Why must we declare a variable name when adding a method to a struct in Golang?
  • Debugging VB6 Code From Visual Studio 2010
  • Diff between two dataframes in pandas
  • Webgrid not refreshing after delete MVC
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • Rails Find when some params will be blank
  • MailKit: The IMAP server replied to the 'EXAMINE' command with a 'BAD' response
  • Jquery UI tool tip close icon
  • Bug in WPF DataGrid
  • Resize panoramic image to fixed size
  • TFS: Get latest causes slow project reloading
  • Volusion's generic SQL folder, functionality
  • How to add a column to a Pandas dataframe made of arrays of the n-preceding values of another column
  • Javascript Callbacks with Object constructor
  • ActionScript 2 vs ActionScript 3 performance
  • How to make Safari send if-modified-since header?
  • How can I estimate amount of memory left with calling System.gc()?
  • Apache 2.4 - remove | delete | uninstall
  • Traverse Array and Display in markup
  • Hits per day in Google Big Query
  • How do you join a server to an Active Directory (domain)?
  • coudnt use logback because of log4j
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Qt: Run a script BEFORE make
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Android Heatmap on canvas or ImageView
  • Conditional In-Line CSS for IE and Others?