Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Linked Server using WITH EXECUTE AS Expand / Collapse
Posted Saturday, November 3, 2012 5:24 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, November 5, 2012 9:12 AM
Points: 293, Visits: 459
I have a stored procedure on server A that uses EXECUTE AS and queries tables on server B. The user in the EXECUTE AS exists on both servers, is a Windows account and is a member of sysadmin on both servers.

When I run the procedure from server A I get the following:

OLE DB provider "SQLNCLI10" for linked server "Server B" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "Server B" 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 65535, Level 16, State 1, Line 0
SQL Server Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF].

If I remove the EXECUTE AS line the procedure works without error. I have looked at many posts on the web and have followed the tips regarding protocols but I still get the error. Any help will be really appreciated!

Post #1380750
Posted Monday, November 5, 2012 4:33 AM



Group: General Forum Members
Last Login: Today @ 6:42 AM
Points: 5,362, Visits: 7,071
Check your linked server settings.
> have impersonations been set up?
> what context is being used to connect to the remote server?

Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1380977
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse