Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sql server error

Author  Topic 

sawsan
Starting Member

2 Posts

Posted - 2008-11-06 : 16:15:41
hello

I am new to .net

I installed visual studio 2008 and sql server2005

first I create a new project then from server explorer I tried to create new database..enterd server name =local
and databse name=name
but this messager error appeared:
Microsoft Visual Studio
---------------------------
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


what should I do?
Thanks in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-11-06 : 16:27:53
If you installed the default instance, use hostname. If you installed a named instance, use hostname\instancename.

You'll need to modify "hostname" and "instancename" to your actual names though. You can get your host's name by typing in hostname from a cmd window (Start..Run..cmd).

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sawsan
Starting Member

2 Posts

Posted - 2008-11-11 : 11:34:45
Thank you

the problem was fixed by the following steps:
from my computer(right click)-manage-services-ms sql services-(right click)-properties-login tab-make this on local computer..

thanks
Go to Top of Page

malaytech2008
Yak Posting Veteran

95 Posts

Posted - 2008-11-12 : 01:19:25
Also check your remote connection is enabled or not.

malay
Go to Top of Page
   

- Advertisement -