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!