Blog Stats
  • Posts - 42
  • Articles - 0
  • Comments - 61
  • Trackbacks - 36

 

SQL Server 2005 express - connection problem

At work I got installed the new SQL server 2005 express edition, with VS.Net 2005. Through the Visual Studio's server explorer I was unable to connect to my SQL express. After trying different things, I downloaded the SQL Server Management Studio Express CTP. But it had so many runtime bugs, that I couldn't help stop using it.

I even tried setting up the TCP/IP and NamedPipes protocol to 'enabled' in the Configuration management tool of SQL server 2005. This is done to enable remote connections.

After doing a lot of search on the internet, finally found the solution to this problem.

When you connect through the Visual Studio 2005 server explorer, you need to specify “.\SQLExpress” as the server name as opposed to “yourservername” or “(local)” or “SQLExpress”. Simple solution but bad problem.

I am on SQL server 2005 express now, right within the VStudio and the tool is damn good and fast.

Note: On a different note, SQL server 2005 has special “Xml” datatype which you can use to store XML documents, and dynamically “XQuery” them and setup relational database type of functionality. I am going to explore it now.


Feedback

# re: SQL Server 2005 express - connection problem

Gravatar thanks for that. im using teratrax Enterprise Manager, and it was failing the connection when set to local. now that its set as you suggested, no trouble at all...

Matt 2/27/2006 12:04 AM | matt

# re: SQL Server 2005 express - connection problem

Gravatar Brilliant! I've been trying to figure it out myself for the last hour 3/5/2006 8:08 AM | Doogal

# re: SQL Server 2005 express - connection problem

Gravatar I have created a web application in .net2005,and i am trying to connect to database to insert data, 5/18/2006 3:44 AM | skumar

# re: SQL Server 2005 express - connection problem

Gravatar Thank you very much. I thought I didn't configure something properly...

9/4/2006 10:51 AM | ronin

# re: SQL Server 2005 express - connection problem

Gravatar Thanks!! y lost an hour trying to figure it out... 9/5/2006 7:04 AM | nicolas

# re: SQL Server 2005 express - connection problem

Gravatar I did those things you said ,but still getting same error.
could you put your connection string.mine is below

SqlConnection cnn = new SqlConnection("Data Source=MYNOTEBOOK/SQLEXPRESS;Initial Catalog=Northwind;User ID=sa;Password=yt1234");
everything is on the same line if i try to put back slash rather than forward slash after MYNOTEBOOK i have been getting coding error.
any suggestion will be appreciated.

5/21/2007 8:17 PM | m.aker

# re: SQL Server 2005 express - connection problem

Gravatar Thanks a lot!!!! :) I was going nut with this sh#$@#$. 6/25/2007 11:15 PM | Pablo

# re: SQL Server 2005 express - connection problem

Gravatar When i connect remote to SQL server 2005 express SqlConnection cnn = new SqlConnection("Data Source=(servername)/SQLEXPRESS;Initial Catalog=Northwind;User ID=sa;Password=yt1234"); It 's not work. 9/25/2007 11:08 PM | TuAnh

# re: SQL Server 2005 express - connection problem

Gravatar Thank you! Now I get a different error, about the database. Progress! 2/16/2008 4:51 PM | Peter

# re: SQL Server 2005 express - connection problem

Gravatar Dude...thanks for this post. I fought with this problem & wasted my evenings study/learning time. Why is this info not prominently documented ...even MSDN didnt get me the answer. You came up on my first Google search.
cudos 5/5/2008 8:47 PM | jltbdy

# re: SQL Server 2005 express - connection problem

Gravatar Wow, what a gotcha. Thanks!!! 6/22/2008 9:33 PM | James

# re: SQL Server 2005 express - connection problem

Gravatar Thanks, i have been trying to figure it for some hours now 8/18/2008 6:52 AM | iyke

# re: SQL Server 2005 express - connection problem

Gravatar Thanks so much! Saved me lots of time. :) 10/29/2008 7:36 PM | erinnv

# re: SQL Server 2005 express - connection problem

Gravatar hello,
could anybody help me? i still could not access my database remotely. i have the error: application attempted to perform an operation not allowed by the security policy.
i already set my .net framework to fulltrust, but the error is still there.

thanks in advance! 1/26/2009 5:16 AM | che

# re: SQL Server 2005 express - connection problem

Gravatar Yep, tks a lot, helped me with NHibernate config 3/15/2009 4:18 PM | Laduncaag

Post a comment





 

 

 

Copyright © Vinayak