This post originated from an RSS feed registered with .NET Buzz
by Sam Gentile.
Original Post: Connecting to SQL Server Express in August VSTS CTP
Feed Title: Sam Gentile's Blog
Feed URL: http://samgentile.com/blog/Rss.aspx
Feed Description: .NET and Software Development from an experienced perspective - .NET/CLR, Rotor, Interop, MC+/C++, COM+, ES, Mac OS X, Extreme Programming and More!
It's been a long time since I rock and rolled, been a long time since I did the stroll...whoops, this is a blog, not a song. Well, it has been a long time; over 3 weeks since the last post. In doing some work for a client today, I set up an Windows XP SP2 VPC image and flawlessly installed the August CTP for Visual Studio 2005 Team Suite. As part of the full install, I installed the included SQL Express as well and needed for the work I was doing. I had problems connecting to the SQL Express instance and I wanted to document the solution as at least 2 other people today I talked with had the same problems.
One thing you should be aware of is the new SQL Server 2005 Surface Configuration Tool (see Mike's excellent article). You now have to explicitly enable (as it should be!) protocols like TCP/IP, and Named Pipes as well as certain feature sets especially remote access. I had done all this with TCP/IP and the port and I was still unable to connect from inside of VS August to the instance either using local, localhost or xpaugust (the name of the machine). The name of the machine should work but it doesn't seem to for me. I kept getting that remote access was not configured in the surface area tool which was completely wrong as the machine was local, not remote (so machine name should work) and two, because remote access was enabled. I IM'd my good pal Robert and we ran down a list of the usual things: checking the surface area, the port, etc. He pointed me to these two excellent blog entries of which we seemed to be doing things correct. It wasn't until Robert said have you tried typing at the command line:
SQLCMD -S .\SQLEXPRESS
that we hit it. That worked as well as SQLCMD -S xpaugust\SQLEXPRESS but no dice in VS. So the command reminded us that you have to plug in “.\SQLEXPRESS” into the Add Connection in VS August. This is as it was in much earlier betas. It now works so maybe this will save some other people some time (it already saved another person I shared it with) time.