Re: Cannot connect with one machine but can with others



I'm trying 3 different ways to connect.
1. I'm trying to connect using SQL Server Management Studio.
2. I'm trying to connect using Visual Studio
3. I'm trying to connect using the SqlConnection class in .NET

I don't have any ODBC drivers setup on any machines. This is a new database.
I use methods 2 & 3 to connect on the other machines.

I tried setting up an ODBC connection but that fails as well. I get an
exception SQL Server does not exist or access is denied.

I don't have the Windows firewall configured on the server.

What parameters do you want? I'm just passing the server name (I've also
tried the IP), user name and password. It's the exact same info as the other
machines.

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uJgr9JmTJHA.5568@xxxxxxxxxxxxxxxxxxxxxxx
Most likely a firewall problem on the Windows Server. It's also possible
that you have defined an alias or an ODBC DSN on the machines that do work
but that you forgot to do the same on this machine.

There is also the possibility that the driver that you are trying to use
is not installed on this particular Windows server. For example,
installing SQL-Server 2005 will install the Native ODBC driver for
SQL-Server and the Native OLEDB Provider for SQL-Server. However, I'm not
sure that you would receive this error message if this was the case here.

What parameters are you using for connecting?

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"Joe" <jbassking@xxxxxxxxxxxxxxx> wrote in message
news:u9D4G7lTJHA.5812@xxxxxxxxxxxxxxxxxxxxxxx
Here's some more info:
The database server is not local so all our connections have to go out of
our network. I cannot make any changes to the server since it's not ours.

I can ping by name the database server from all computers even the one
that doesn't work.

I can also telnet the server from the machines that do work but cannot
telnet from the machine that doesn't work. I tried both the name and the
IP.

The server I'm trying to connect to is 2000. I have 2005 installed on the
server that I'm trying to connect with. I don't know if this makes any
difference but I think it's the only difference between all the computers
that can connect and this one that cannot.

I'm able to connect with a XP machine and a 2003 server. The machine that
cannot connect is also a 2003 server.

I hope this extra info helps some.

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:%23NIxA2lTJHA.1332@xxxxxxxxxxxxxxxxxxxxxxx
Try using TCP/IP instead of Named Pipes. Enable them and use a TCP/IP
address. You can also add the prefix tcp: to denote that TCP/IP should
be used and also add the port address ( ,1433 is the default port if
you're not using dynamically allocated port and the sql-server is not
hidden to the browsing service).

There is also the situation where the remote instance is not the default
instance but a named instance. In this case, you should try adding its
name after the address; such as \\RemoteServer\SQLExpress2005.

It's possible that you might be blocked by a firewall. Can you ping the
remote machine from the windows server?

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"Joe" <jbassking@xxxxxxxxxxxxxxx> wrote in message
news:%23VMwRclTJHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

I'm having a strange problem here. I'm trying to connect to a remote
SQL
Server database but I keep getting this error:
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)

I can connect using other machine just not the one I want to. The
machine
I'm trying to connect with is a Windows 2003 Server running SQL Server
2005.

I sort of think it may be getting confused and thinks I'm trying to
connect
locally.

I even tried to connect using the SQL Server Management Studio but I
get the
same error.

I set Named Pipes to enabled in the SQL Server Config.

I posted this same message in microsoft.public.dotnet.framework.adonet
yesterday. Unfortunately I'm didn't get an answer to fix the problem.

Any ideas?

Thanks,
Joe









.



Relevant Pages

  • Re: accessing data mining model via web/PDA
    ... Is your OPENROWSET clause connecting to a SQL Server 2000 database? ... Is your SQL Server instance running on the same machine as your Analysis ... i need some> help for the connection string, let say to access the> mining model in the AS. ...
    (microsoft.public.sqlserver.datamining)
  • Re: VB Express SQL Express Remote Connection
    ... Yes I can connect using the SQL Server Management Studio Express Tool. ... I changed my connection to exactly what you specified and it connected. ... I can connect and create databases on the Remote Server ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to Direct connect with ActiveSync
    ... That won't work because you have a connection string that can't be correct. ... You're saying that the database is, but it's not; ... Server 2000, Visual Studio 2008. ... Again sorry if this should be in another form but you say that SQL Server ...
    (microsoft.public.sqlserver.ce)
  • .Net Scalability problem
    ... I finished a Great project using .Net and SQL Server and .Net Mobile ... Million concurrent users ... So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.sqlserver.connect)
  • Re: Communication Link Failure Error
    ... On disconnection from the network, in my code I changed the connection ... string to use SQLOLEDB and sent a SQL query to SQL server which failed as ... unplug the network cable from the client machine and put the cable ...
    (microsoft.public.data.ado)