0

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]

John Saunders
  • 160,644
  • 26
  • 247
  • 397
s2n
  • 327
  • 3
  • 9

3 Answers3

0

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.

This Stack Exchange thread was very helpful to me.

Community
  • 1
  • 1
bgmCoder
  • 6,205
  • 8
  • 58
  • 105
0

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.

YvesR
  • 5,922
  • 6
  • 43
  • 70
  • no. That did not solve it. See the comments in the other answer for the solution. – s2n Jan 12 '11 at 18:03
0

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.

Brian Ball
  • 12,268
  • 3
  • 40
  • 51
  • It is a named instance and sql browser is running. will try porQryUI. thanks – s2n Jan 08 '11 at 16:15
  • 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 Jan 08 '11 at 16:31
  • 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 Jan 08 '11 at 16:53
  • 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 Jan 08 '11 at 17:45
  • 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 Jan 08 '11 at 18:17
  • Have you tried disabling your firewall (temporarily) to verify that it is what is causing your problem? – Brian Ball Jan 08 '11 at 20:09
  • k its resolved. I made a default instance and that opened the port 1433. The installation is not giving remote connection error anymore. I think the installation required the port 1433 to be open. Since the named instances were using ports other than 1433, it caused the error. Thanks brian for your help... – s2n Jan 09 '11 at 12:30
  • I don't think I've ever installed a named instance without having a default instance already installed before, that's pretty interesting. You probably could have also had the named instance run on 1433, which can be done through SQL Server Configuration Manager. Glad you got it all sorted out! – Brian Ball Jan 09 '11 at 17:21