Sql-server – SQL Server Linked Server – Timeout Error

sql servert-sql

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.

Thanks

Best Answer

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.