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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Cannot connect to server

Author  Topic 

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-06-30 : 05:52:50
I hope this is the right forum.

I have sql server 2005 developer edition installed on my laptop and all of a sudden I cannot connect to a named instance of the server.

Yesterday I was trying to create and ODBC connection to link and Access database to the server and for some reason it was not finding the server.

Then i said to myself let me see if I can log in the server manually using my windows credentials. And all of a sudden I cannot connect. There is the error message.

quote:
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)



I tried searching for the error message but I am only getting information on using a .net application to connection to the server type responses, which is not my case here.

Any help will be appreicated.

Dallr

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2008-06-30 : 06:06:34
You were able to connect to before?

If this is the first time you are trying to connect from a remote server to the names instance then, enable remote connection in surface area.

Start -- programmes -- SQL server 2005 -- Surface area configuration -- Surface area configuration for Services and connections - and check local and remote connections.


Hope this helps.

-
Sachin

Don't sit back because of failure. It will come back to check if you still available. -- Binu
Go to Top of Page

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-06-30 : 12:52:05
Yes I was able to connect before. All of a sudden this just happened. I also tried to restart the server but this did not work.

I am using developer edition which only allows local connections.

Any other input or suggestions.

Dallr
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-30 : 13:07:47
See this: http://weblogs.sqlteam.com/tarad/archive/2008/05/23/60609.aspx

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

Subscribe to my blog
Go to Top of Page

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-06-30 : 14:09:25
I am still getting the error message even though i enable tcp and named pipes. But why do i need to so this when it was not enabled before and was working.

Still getting problems....

Please be gentle i am new to sql server.

dallr
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-30 : 14:20:42
See my link.

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

Subscribe to my blog
Go to Top of Page

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-06-30 : 14:55:34
I saw the link tara. But they all talk about connecting to a remove server. I cannot see how that is the case in my scenario or am i missing something?

Dallr
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-30 : 15:07:32
I believe in one of the SQLTeam threads from my above link shows me figuring out if the user is even using the correct SQL instance.

Are you sure that the SQL Server service is started? What is its name? What does hostname show from a cmd window?

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

Subscribe to my blog
Go to Top of Page

mdubey
Posting Yak Master

133 Posts

Posted - 2008-06-30 : 15:40:04
Couple of days before I got the same issue and resolved with doing the below activities.

Troubleshooting for the SQL Connections.
While connecting to the SQL server from SQL Server Management Studio I can not able to connect to my Database Engine. I got the following error..

Sqlcmd: Error: Microsoft SQL Native Client: 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.

Solution for the issue:-

1) Make Sure your Database Engine services are running.

2) Now enable the SQL Browser services from the SQL server Configuration Manager.

3) Restart the SQL Engine and SQL Agent Services from the SQL Server Configuration Manager.

Now it’s time to Connect to the SQL Server Database engine with your credentials and you will be ready to start your work.



Manoj
MCP, MCTS
Go to Top of Page

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-06-30 : 16:39:53
Manoj Thanks for jumping in with suggestions.

The SQL Browser services was already started. However I tried to stop and restart it and it returned this error."The requestion failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details."

Then I tried to stop and restart the server which worked ok.

So in short the browser was not restarted and I am getting the same problem

dallr
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-30 : 23:04:06
First of all, developer edition allows remote connection. Can you connect to it in ssms? Tried connect with ip address and port number?
Go to Top of Page

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-07-01 : 17:59:15
Thanks to all who have volunteered to assist thus far.

Remember I said that I am new to sql server. How do you connect to SSMS using the IP and port number?

I tried to connect using sqlcmd -S ipaddress,PortNumber. example: sqlcmd -S 127.0.0.1,1423
and I was able to connect. But I still cannot connect using SSMS

Dallr
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-01 : 18:04:34
For SSMS, you can use things like this:
1. ServerName
2. ServerName\InstanceName
3. IPAddress
4. ServerName,PortNumber
5. IPAddress,PortNumber

But if you don't want to type in the port number each time, create an alias using SQL Server Configuration Manager.

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

Subscribe to my blog
Go to Top of Page

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-07-01 : 19:06:23
Thanks Tara, I was not sure where to place this but I took a chance and put the IP,Port number by the servername and was able to connect.

What do I do now to allow me to connect using the normal way. Do I reset something and log back in using the normal way?

dallr
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-02 : 11:05:33
You need to create an alias as mentioned in my previous reply.

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

Subscribe to my blog
Go to Top of Page

Dallr
Yak Posting Veteran

87 Posts

Posted - 2008-07-02 : 18:59:52
I will try that Tara. But can anyone explain to me why do I have to do all this how when everything was working before without a problem?

Go to Top of Page
   

- Advertisement -