I am trying to create a linked server between two SQL Servers (ServerA and ServerB). ServerA is hosted by Windows Server and ServerB is hosted on a local Windows desktop. I want to create a linked server from ServerA to ServerB. I'm doing this using SSMS GUI. ServerB is a named instance (ie ServerB\MyInstance). Under "Security", I am using "Be made under this security context" and I enter the "sa" account. However, I'm getting this error "Login timeout expired". The weird thing is, I can establish the connection using c:>sqlcmd -SServerB\MyInstance -Umylogin -Pmypw from my desktop.

The credential is the same in both cases. Can you someone tell me what I'm doing wrong? Would it be a firewall issue? Not sure about this since I can connect via sqlcmd.


  • Just to be exact, the error says "Login timeout expired". Also I have no issue connecting in SSMS to ServerB\MyInstance with the same account that I tried to create the linked server.
    – sydney
    Dec 9, 2019 at 15:05
  • So it cannot find ServerB, that is what the error message means. Can you connect to ServerB\instance from the serverA machine? Dec 9, 2019 at 15:06

1 Answer 1


It could be a firewall issue. You have to be able to connect to Server B from Server A. You said that you can connect to Server B from your desktop, but this only proves there is no problem between your desktop and Server B. For a fair test, you have to log in to Server A and attempt to log in to Server B from Server A.

  • Yeah... I can't login from ServerA to ServerB in SSMS when I'm on ServerA. Getting the standard "A network-related or instance specific error occurred while establshing a connctions to SQL Server and ......". So what exactly needs to happen to resolve this?
    – sydney
    Dec 9, 2019 at 15:17
  • Now you're talking about troubleshooting network issues. Standard advice applies. Can the machines ping each other? Are the machines on the same subnet? Are there any physical or software firewalls in between?
    – Steve
    Dec 9, 2019 at 15:23
  • From ServerA, I'm able to run 'ping ServerB'. I get replies back.
    – sydney
    Dec 9, 2019 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.