establecer una conexión remota a una instancia de servidor SQL

I am not able to establish remote connections to SQL Server 2008 enterprise edition. I have followed and implemented a lot of tutorials available. These are the things i have done:

  1. enabled TCP/IP connections in SQL configuration manager.
  2. added a rule to allow inbound connections at port 1433.
  3. allowed remote connections in the properties window of the concerned instance.

But it still gives the error I am trying to install samples for replication using AdventuresWorks database and i am not able to install the sample.

here is the error i got

Attempting to create the 'ReplData' share that replication uses as the working directory.

A subdirectory or file C:\Program Files\Microsoft SQL Server\100\Samples\Replica tion\ReplData already exists. The name has already been shared.

More help is available by typing NET HELPMSG 2118.

HResult 0x274D, Level 16, State 1 TCP Provider: No connection could be made because the target machine actively re fused it.

Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in stance-specific error has occurred while establishing a connection to SQL Server . Server is not found or not accessible. Check if instance name is correct and i f SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

The publication was created successfully. You must create a virtual directory to use Web synchronization. If you plan to use a separate Web server, you must run the Web Synchronization Wizard on that Web server. (A certificate that supports SSL must already be installed.)

Do you want to create a virtual directory named SalesOrders for Web synchronization on S2NWORKSTATION? [y,n]

preguntado el 08 de enero de 11 a las 16:01

3 Respuestas

Start the SQL Management Studio Connect to the server. Then choose the server in the Object-Explorer and right-click on properties. Then check the "connections" settings, there you can/have to allow remote connections for this database server.

Respondido el 08 de enero de 11 a las 19:01

no. That did not solve it. See the comments in the other answer for the solution. - s2n

Are you connecting to a default instance or named instance? If a named instance, then you you should have the sql browser windows service running. Also ensure that remote connections are allowed (I believe this is a different setting than simply turning on TCP/IP).

One tool that could be helpful is PorQryUI (Port Query), it will test to see if the proper ports are open.

Respondido el 08 de enero de 11 a las 19:01

It is a named instance and sql browser is running. will try porQryUI. thanks - s2n

I used PorQryUI and it showed the port 1433 is not listening. But i added a rule to allow connections through port 1433, doesn't that open the port? Is there any other way to do it (I am using windows 7 professional). - s2n

Named instances run on a different port than 1433. Make sure the SQL Browser windows service is running. Also, I believe SQL Server uses both TCP and UDP on 1433, depending on what firewall software you are using, you may need to tell it to allow both types of traffic through. Part of what PorQryUI should show you once you get 1433 working is the results from the SQL Browser Service, which will tell you all the named instances on that machine and what ports they are listing on, you will then need to add additional rules for those ports as well. - Brian Ball

yes SQL browser service is running. Even added a new rule for the UDP port 1433. But the PorQryUI shows both the TCP and UDP are not listening. !!! (i am windows security essentials.) - s2n

i checked the error log of the SQL Server instance and it uses port number 2696 and it is open. What might be the prob then? - s2n

I too, had this problem. I solved by doing a couple of things: 1. Make sure the SQL Browser service is started on my local machine 2. Make sure UDP Port 1434 in the firewall is open for outgoing on the local machine 3. Make sure UDP Port 1434 is open in the firewall for incoming on the remote machine.

The UDP Ports are for the SQL Server Browser. Apparently, Visual Studio uses that to detect that the remote server exists.

Esta historia de Stack Exchange thread was very helpful to me.

contestado el 23 de mayo de 17 a las 15:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.