Select the product you need help with
SQL Agent job that executes a distributed query may fail with 65535, 782 or 7437 error messagesArticle ID: 2492477 - View products that this article applies to. SymptomsA SQL Agent job that executes a distributed (linked server) query may fail with one of the error messages similar to the following, when the owner of the job is not a member of the sysadmin server role: OLE DB provider "<provider name>" for linked server "<Linkedserver Name>" returned message "Login timeout expired". OLE DB provider "<provider name>" for linked server ""<Linkedserver Name>" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". Msg 65535, Level 16, State 1, Line 0 SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. Or Msg 782, Level 16, State 1, Line 0 SSL Provider: No credentials are available in the security package OLE DB provider "<provider name>" for linked server "<Linkedserver Name>" returned message "Client unable to establish connection". For example in SQL Server 2008 environment the error messages may be similar to the following: OLE DB provider "SQLNCLI" for linked server "<Linkedserver Name>" returned message "Login timeout expired". OLE DB provider "SQLNCLI" for linked server ""<Linkedserver Name>" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". Msg 65535, Level 16, State 1, Line 0 SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. Or Msg 782, Level 16, State 1, Line 0 SSL Provider: No credentials are available in the security package OLE DB provider "SQLNCLI10" for linked server "<Linkedserver Name>" returned message "Client unable to establish connection". Or Msg 7437, Level 16, State 1, Line 3 Linked servers cannot be used under impersonation without a mapping for the impersonated login. You may also see the same behavior when using Openquery or when executing a distributed query using impersonation through "Execute as Login" T-SQL statement. CauseTransact-SQL job step runs as the owner of the job step if the owner of the job step is not a member of the sysadmin fixed server role. SQL Agent uses "Execute as Login" to execute the job step under the context of the owner of the job step. You cannot use EXECUTE AS statement across server boundaries. This behavior is by design. For additional information refer to the following topics in SQL Server Books Online:
WorkaroundImportant: The following workaround requires you to define an explicit local server login to remote server login mappings using the Security page under Properties of the linked server object. Since the Remote User column must be a SQL Server Authentication login on the remote server, the remote server’s authentication mode should either already be set to Mixed mode or should be changed to Mixed mode before using the workaround discussed below. If a T-SQL job step is owned by a user that is not part of sysadmin server role and if the step contains a distributed query take the following steps to ensure the jobs or queries do not fail:
More informationSometimes you may notice that queries discussed in either of the scenarios in Symptoms section may run successfully. This usually occurs when the impersonated user had previously logged on to the remote system and the system still has kept open a connection established by the remote use. You should not expect that the query will work all the time. Steps to reproduce the behavior
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use
(http://go.microsoft.com/fwlink/?LinkId=151500)
for other considerations.PropertiesArticle ID: 2492477 - Last Review: March 1, 2013 - Revision: 5.0 Applies to
|


Back to the top








