SQL Server doesn't accept remote connections.

  • Hello,

    I am trying to use my SQL Server in my Perl application. I am hosting my Perl code on an external hosting server.

    When I was developing my code I was running it on a computer on the same network as the server and everything worked fine. But, when I uploaded the code to the hosting service (replacing the local IP with the public IP of the server), it started failing in the part where it connects to the database saying that the server wasn't found.

    Maxwell.

    P.S. I did forward port 1433 and I even put the server as DMZ Host (which puts that computer in front of the firewall).

  • I would check 2 things:

    1) On your SQL Server, have you allowed remote connections to the server?

    2) In your linked server set up, did you set the Data Access to true?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • 1) Right click on Sql Server in Sql Management Studio (SMS) -> Connections -> Allow remote connections

    2) Right click on Sql Server in Sql Management Studio (SMS) -> Security -> Allow remote connections

    3) Sql Server Configuration Manager -> Network Configuration -> Protocols -> Enable Shared memory, Named pipes, TCP/IP

    Plz check above steps with option Firewall, to allow N/W traffic od SQL Server.

  • @MDTech.us_MAN

    I am guessing this is a shared hosting solution. In that you would not have any access to the server configuration.

    I would suggest that you get in touch with you service provider and confirm the name of the SQLserver instance. once you have that, the ensure you database connnection config points to the correct server.

    Makarand

  • 1 This SQL server is fully hosted by ME. Only the Perl is hosted my some other company.

    1.1 I can't use a third-party SQL hosting service because, I need the SQL Job Agent, which lets me schedule jobs. (I am planing to make a notification job that sends out emails).

    2 I don't see the Data Access option in Perl. So I can't set it to true.

    3 I already set the remote access option a long time ago.

    Maxwell.

  • 2 I don't see the Data Access option in Perl. So I can't set it to true.

    This is an option on the linked server to the Perl Server?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Currently, I don't have a linked server. I connect directly to the SQL Server.

    Do I need a linked server?

    Maxwell.

  • My apologies I believe I misunderstood you from the start

    When I was developing my code I was running it on a computer on the same network as the server and everything worked fine. But, when I uploaded the code to the hosting service (replacing the local IP with the public IP of the server), it started failing in the part where it connects to the database saying that the server wasn't found.

    You can't get from your hosting service (which is where the Perl application resides) back into your SQL server.

    I don't believe the issue is port-forwarding; you're going to need to allow port 1433 (or whatever port you forwarded that to) through the firewall back to your SQL Server. Not sure what firewall you're using or if you even have access to it, but it would be some TCP rule that allows in "*", and is routed to your internal SQL Server IP address and the appropriate port.

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • As a test, on the external hosted Perl server, can you open a telnet session and connect to the internal IP address of the SQL Server?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply