locked
Remote Connection Error RRS feed

  • Question

  • Hi,

    I have installed SQL Server 2016 Express on my Home PC and have set up a database, but I want to be able to use my laptop to connect to the server on my Home PC on my way to/from work to continue working.

    I have enable TCP/IP protocol. I have set a fixed port and configured Windows Firewall. Remote Connections enabled. I've done all that, but I still cannot get the laptop to connect. I suspect I need to create a Login on the server for my laptop? The problem is, my laptop doesn't appear in the Locations. How can I get it to show up in Locations? I've added both my Home PC and Laptop to a Windows Homegroup but it still won't find it. I know I'm making a big mistake here somewhere!

    NEW-MAIN-PC\SQLEXPRESS is the server\instance. PC SSMS Login is NEW-MAIN-PC\Jason. The laptop SSMS login is JSKORPIO-LAPTOP\Jason. I want to be able to connect remotely with my laptop. What am I doing wrong here?

    Wednesday, November 2, 2016 11:47 PM

Answers

  • So your laptop is connected to your Home server, and you can reach your Home server from work?

    Count yourself lucky if you cannot reach SQL Server from work, because if you could anyone else could - and you don't want that, believe me.

    Thursday, November 3, 2016 5:32 AM
  • Hi JSkorpio,

    According to your description, did you connect to SQL Server on your Home PC from laptop through Internet? Based on the error message, this issue can be caused by that there is no network connection between the Client and SQL Server database. Could you please try to use the command Ping to check it? Please open CMD, run ‘ping ***.***.***.***’.

    As your mentioned, you have added both my Home PC and Laptop to a Windows Homegroup and want to use Windows authentication to connect to the SQL server, did you add PC and Laptop into a domain? If we want to connect from Client to SQL Server with Windows Authentication easily, we need to add them to a domain or two trusted domains. Of course, we can also use Windows Authentication in other conditions, but we need to configure the Credential, for more information, please review this article. You can use the existing account to access the SQL Server and need not to create a Login for your laptop.

    We can also use Mixed authentication mode to connect to SQL Server if no domain exists, please use the following steps:

    1.    In the Object Explorer, find the instance you want to connect to, right click on it and select Properties, in Security tab, select SQL Server and Windows Authentication mode, then in the connection tab, select ‘allow remote connections to this server’, click OK.
    2.    Create a login account in the Security tab, you can expand this tab and then right click on the login, select new login.
    3.    In the SQL Server Configuration Manager, we need to enable the TCP/IP, and restart SQL Server Service.

    Besides, when you catch your laptop outside, it will leave the domain, to let the Client and SQL Server database connected with Internet, we need to use the TCP/IP Net-Libraries, what’s more, we need to make sure the server is registered with Domain Name System (DNS), you can connect using its registered name. For more information, please refer to this article.

    Best Regards,
    Teige

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 9, 2016 8:46 AM

All replies

  • Hi My,

    Do step by step,Let me know any query.Check and share any error.

    https://blogs.msdn.microsoft.com/sqlexpress/2005/05/05/how-to-configure-express-to-accept-remote-connections/


    Please click Mark As Answer if my post helped.

    Thursday, November 3, 2016 12:55 AM
  • So your laptop is connected to your Home server, and you can reach your Home server from work?

    Count yourself lucky if you cannot reach SQL Server from work, because if you could anyone else could - and you don't want that, believe me.

    Thursday, November 3, 2016 5:32 AM
  • Hi Vishe,

    Cannot connect to NEW-MAIN-PC\SQLEXPRESS. Additional Information: 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) (Microsoft SQL Server)

    The wait operation timed out


    As I said, I've enabled TCP/IP protocol, set a port, added the firewall rules (for port and program separately). But when I try to connect from my laptop, I get the above error message. The server name and instance are correct, and I'm connecting from my laptop with the tcp protocol and specifying the port number I set.

    Thursday, November 3, 2016 6:52 AM
  • Hi JSkorpio,

    According to your description, did you connect to SQL Server on your Home PC from laptop through Internet? Based on the error message, this issue can be caused by that there is no network connection between the Client and SQL Server database. Could you please try to use the command Ping to check it? Please open CMD, run ‘ping ***.***.***.***’.

    As your mentioned, you have added both my Home PC and Laptop to a Windows Homegroup and want to use Windows authentication to connect to the SQL server, did you add PC and Laptop into a domain? If we want to connect from Client to SQL Server with Windows Authentication easily, we need to add them to a domain or two trusted domains. Of course, we can also use Windows Authentication in other conditions, but we need to configure the Credential, for more information, please review this article. You can use the existing account to access the SQL Server and need not to create a Login for your laptop.

    We can also use Mixed authentication mode to connect to SQL Server if no domain exists, please use the following steps:

    1.    In the Object Explorer, find the instance you want to connect to, right click on it and select Properties, in Security tab, select SQL Server and Windows Authentication mode, then in the connection tab, select ‘allow remote connections to this server’, click OK.
    2.    Create a login account in the Security tab, you can expand this tab and then right click on the login, select new login.
    3.    In the SQL Server Configuration Manager, we need to enable the TCP/IP, and restart SQL Server Service.

    Besides, when you catch your laptop outside, it will leave the domain, to let the Client and SQL Server database connected with Internet, we need to use the TCP/IP Net-Libraries, what’s more, we need to make sure the server is registered with Domain Name System (DNS), you can connect using its registered name. For more information, please refer to this article.

    Best Regards,
    Teige

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 9, 2016 8:46 AM