Philip Morris Philip Morris - 4 months ago 13x
SQL Question

Can't connect to linked server

Why can't I access the table when I have linked it to the server? What is wrong here? Thanks!

EXEC sp_addlinkedserver


I keep getting:

OLE DB provider "SQLNCLI10" for linked server "\ABC" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "\ABC" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
Msg 53, Level 16, State 1, Line 0
Named Pipes Provider: Could not open a connection to SQL Server [53].


You need to pass credential to linked server. Quickest way is to use Wizzard. SSMS -> Linked Servers -> Right Click -> Security Tab.

Wizzard window

After you do this you can script button near title bar to get script.