Archive for January 1, 2013

Linked server works locally but not remotely

January 1, 2013 Leave a comment

i was not able to use linked server remotely (from my desktop) or from SQL agent jobs on an instance INST1

English: M in blue square (similar to seen on )

English: M in blue square (similar to seen on ) (Photo credit: Wikipedia)

linked server point to INST2 .. i was able to view objects in linked server tab (in SSMS) and runs select from the server locally (INST1)


even below query worked fine


begin distributed tran
select * from [remoteservername].master.sys.sysprocesses
commit tran


but i was not able to view or make jobs (INST1) run fine … getting below error
Named Pipes Provider: Could not open a connection to SQL Server [5].
OLE DB provider “SQLNCLI10” for linked server “[remoteservername” returned message “Login timeout expired”.
OLE DB provider “SQLNCLI10” for linked server “[remoteservername” 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.”. (Microsoft SQL Server, Error: 5)


For help, click:




after checking everything .. from firewall to bouncing SQL browser service on destination server .. we figured out below ..


an alias using named pipes was created to the INST2 ..on INST1 as soon as that alias was dropped .. all jobs ran fine and linked server TAB


worked fine remotely fro



m SSMS .. it seems the alias was the default configuration used by linked server .. for remote requests VIA SSMS and


SQL agent jobs …


**** so just save the alias configurations and deleting it .. and rerun the jobs and remote queries *****


try the above solution .. if nothing works for you