Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Allowing Remote Connections
Message
De
24/06/2013 08:11:20
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Installation
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Desktop
Divers
Thread ID:
01576737
Message ID:
01576974
Vues:
48
Well, it almost all works :)

One remote PC connects fine, the other one, using the exact same connection string doesn't. :(

The setup is two offices. Two PCs at the remote office. Each PC at the remote office connects to a SQL Server database within the LAN at that office. The main office has a SQL Server database which the remote office synchronises with using Microsoft Synchronization framework 2.1. I have created LogMeIn Hamachi network so that I can connect to the database at the main office. Both remote PCs can connect using the ODBC administrator. In my application, every few minutes the remote PCs call a C# exe that I wrote that tries to synchronise with the database at the main office. One works, the other gives me this error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I have copied the same config file with the connection string from the working PC to the other one and it still gives me this error.

Any ideas?


>I think you need a static IP which is also public. The static IP is necessary so the client application can lookup the IP address, and it must be reachable by the remote terminal. At least here in Aruba my router does have a "public" IP address, but the provider (or whatever is responsible) does not forward IP lookups to this IP address, so it's not reachable. It is also not static so it changes once in a while (usually when the router gets restarted). In the Netherlands for instance every internet client has a static IP address automatically, we can only dream of this, although it should be something simple for the provider to setup.
>
>The problem with no-ip (and probably other dns lookup services) is that they usually aim at making port 80 available, I haven't tried a lot, but I was not able to use no-ip to forward the port of the SQL server.
>
>With Hamachi on the other side it was very easy to setup (I did that once with a MySQL database, a few years ago), and it seems to be a free service for 10 terminals.
>
>>Thanks. Is it a static IP that is needed and that you are referring to as Public? Or are they two completely separate things?
>>
>>I have heard of using dyndns to create a free static ip.
>>
>>>It looks like Hamachi is free for up to 10 computers, but I did not read the entire FAQ carefully.
>>>
>>>
>>>>I think that's pretty much the same here in the Caribbean, to get a public IP address is a pain and they charge a lot of money for that.
>>>>
>>>>Unfortunately, Hamachi does not seem to be free anymore.
>>>>
>>>>>OK, tried that and all 4 pings timed out, so I guess it's not public so I'll have to go with hamachi or something similar.
>>>>>
>>>>>Thanks
>>>>>
>>>>>>Check http://whatismyipaddress.com/ and see if you can ping this IP from the remote computer.
>>>>>>
>>>>>>>Thanks, how do I determine if I have a public IP?
>>>>>>>
>>>>>>>I'll look into Hamachi as well.
>>>>>>>
>>>>>>>>That would only work if you have a public IP, and then you have to set port forwarding at the router.
>>>>>>>>
>>>>>>>>If you don't have a public IP address, a workaround would be to create a network using Hamachi from LogMeIn, I did that once and it was pretty easy to setup, and it's free if I remember correctly.
>>>>>>>>
>>>>>>>>>I believe that I have that configured as I am able to connect to the database from a different PC on the local network.
>>>>>>>>>
>>>>>>>>>I understand that I need to know the IP address of the database server, how would I determine that? This is what I would need to use in my connection string from the PC outside the LAN.
>>>>>>>>>
>>>>>>>>>>In SQL Server Management Studio, did you check "Allow remote connections" in the server properties?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>This is actually SQL Server Express 2012 .
>>>>>>>>>>>
>>>>>>>>>>>I have two PCs in a workgroup at a client. Both running Win 7 Home Premium. I have installed SQL Server Express 2012 on one and my system running on that PC is able to access it.
>>>>>>>>>>>
>>>>>>>>>>>I have:
>>>>>>>>>>>
>>>>>>>>>>>1. enabled TCP/IP and named pipes
>>>>>>>>>>>2. set dynamic ports to blank and set a TCP port number
>>>>>>>>>>>3. Added an exception for this port number in Windows firewall
>>>>>>>>>>>
>>>>>>>>>>>Is there anything I am missing? I can't access the data from the other PC.
>>>>>>>>>>>
>>>>>>>>>>>Update
>>>>>>>>>>>
>>>>>>>>>>>I found that I had changed the dynamic ports on IP2 (or was it IP4?) instead of IPALL. Once I did that I was able to connect.
>>>>>>>>>>>
>>>>>>>>>>>Now my next challenge is to allow a remote computer access to the database over the internet. Any suggestions of where to find instructions on how to do this?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform