none
How to enable remote server access on SQL Server 2012

    Question

  • I need to know 

    how to enable remote access for a database in my pc , so that I can connect to it with my laptop anywhere 

    I have enabled the TCP/IP Protocol , I have enabled remote access for the server from the SSMS by right click on the server and choose allow remote control

    I have disabled the firewall on my PC 

    but what after ? 

    on my laptop , I tried new server registration in the SSMS and in the server name I type myip,portnumber (myip,1433)

    and after all of that I got an error message with non success

    Thanks In advance for any help.

    Monday, August 13, 2012 7:01 PM

Answers

  • Hello,

    You may have disabled your firewall, but if you are using any sort of home router connected to your modem (or integrated into your modem) you'll need to log into it and setup port forwarding so it knows where to go. For example, if SQL Server is running on the default port of 1433 and your machine name is MACH123, a port forwarding entry will need to be made to forward port 1433 over TCP/IP to MACH123 in your router.

    -Sean


    Sean Gallardy, MCC | Blog | Twitter

    • Marked as answer by EL Sa7eR Monday, August 13, 2012 8:49 PM
    Monday, August 13, 2012 7:58 PM
    Answerer

All replies

  • Have you tried using the instance name? Is the IP address dynamic in the machine hosting your installation of SQL Server? To rule out this scenario, enable SQL Server Browser and try to connect using the instance name. If this is a default instance, all you need is the machine name.

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    Monday, August 13, 2012 7:32 PM
  • Hello,

    If you are attempting to connect over the internet to your computer, you'll need to setup the correct firewall and possibly port forwarding rules along with having something to know and transmit (such as dyndns) your IP when it changes.

    If you are attempting to connect within your local LAN/WAN then I would first start by enabling the TCP/IP protocol (as you stated you have) and setting a default port for it (remove dyanmic port information and choose a port). Restart sql server. Attempt to connect to the port using telnet, if it connects then try SSMS if it doesn't then you have a firewall/networking issue.

    -Sean


    Sean Gallardy, MCC | Blog | Twitter

    Monday, August 13, 2012 7:33 PM
    Answerer
  • Have you tried using the instance name? Is the IP address dynamic in the machine hosting your installation of SQL Server? To rule out this scenario, enable SQL Server Browser and try to connect using the instance name. If this is a default instance, all you need is the machine name.

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    The SQL Server Browser Service is runnning , 

    And yes my IP is Dynamic , but I am sure of it , I tried with the instance name like this 

    myip\THEPRESIDENT,1433

    THEPRESIDENT is the machine name but with the same error :(

    Monday, August 13, 2012 7:50 PM
  • Hello,

    If you are attempting to connect over the internet to your computer, you'll need to setup the correct firewall and possibly port forwarding rules along with having something to know and transmit (such as dyndns) your IP when it changes.

    If you are attempting to connect within your local LAN/WAN then I would first start by enabling the TCP/IP protocol (as you stated you have) and setting a default port for it (remove dyanmic port information and choose a port). Restart sql server. Attempt to connect to the port using telnet, if it connects then try SSMS if it doesn't then you have a firewall/networking issue.

    -Sean


    Sean Gallardy, MCC | Blog | Twitter

    Thanks Sean , I am trying to connect over the internet , and I have disabled my Firewall at all !
    Monday, August 13, 2012 7:56 PM
  • Hello,

    You may have disabled your firewall, but if you are using any sort of home router connected to your modem (or integrated into your modem) you'll need to log into it and setup port forwarding so it knows where to go. For example, if SQL Server is running on the default port of 1433 and your machine name is MACH123, a port forwarding entry will need to be made to forward port 1433 over TCP/IP to MACH123 in your router.

    -Sean


    Sean Gallardy, MCC | Blog | Twitter

    • Marked as answer by EL Sa7eR Monday, August 13, 2012 8:49 PM
    Monday, August 13, 2012 7:58 PM
    Answerer
  • Hello,

    You may have disabled your firewall, but if you are using any sort of home router connected to your modem (or integrated into your modem) you'll need to log into it and setup port forwarding so it knows where to go. For example, if SQL Server is running on the default port of 1433 and your machine name is MACH123, a port forwarding entry will need to be made to forward port 1433 over TCP/IP to MACH123 in your router.

    -Sean


    Sean Gallardy, MCC | Blog | Twitter

    Thanks a lot , that's works great but with the 'sa' account ,
    I need to create a custom account and give it the privilege for connecting to the server and the databases , 
    and thanks in advance.
    Monday, August 13, 2012 8:38 PM
  • As long as you can now connect to SQL Server, logins work just as they always have. The networking is transparent to the client/login. Create a new login and then create a user for the database(s) you would like. This can be done through TSQL (CREATE LOGIN, CREATE USER) or through the SSMS GUI by expanding security and right-clicking on logins.

    -Sean


    Sean Gallardy, MCC | Blog | Twitter

    Monday, August 13, 2012 8:41 PM
    Answerer