Error 7399 Authentication Failed
Contents |
SERVER - FIX – Linked Server Error 7399 Invalid authorization specification June 11, 2016Pinal DaveSQL1 commentI have personally seen when people use Linked Server there are a number of issues from authentication to performance. These issues are part of working with something that has sql server error 7399 access denied so many variations and permutations of actually going wrong. Many a times I suggest
Microsoft Sql Server Error 7399 Invalid Authorization Specification
people to keep away from it as much as possible. But it cannot happen all the times and there are code blocks
Microsoft Sql Server Error 7399 Linked Server
in their application that relies on this as a requirement.This is one of the common error I see in various forums. When someone is new to SQL Server and tried to create a linked
The Linked Server Has Been Created But Failed A Connection Test
server, he/she would just give server name and choose SQL Server as server type and hit OK. But SSMS would provide below errorTITLE: Microsoft SQL Server Management Studio -------------------- The linked server has been created but failed a connection test. Do you want to keep the linked server? -------------------- ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) -------------------- The OLE DB provider "SQLNCLI11" for linked the ole db provider "sqlncli11" for linked server reported an error. authentication failed. server "BIGPINAL" reported an error. Authentication failed. Cannot initialize the data source object of OLE DB provider "SQLNCLI11" for linked server "BIGPINAL". OLE DB provider "SQLNCLI11" for linked server "BIGPINAL" returned message "Invalid authorization specification". (Microsoft SQL Server, Error: 7399) -------------------- BUTTONS: &Yes &No -------------------- Above message has two messagesA Question: The linked server has been created but failed a connection test. Do you want to keep the it?An Error: Microsoft SQL Server, Error: 7399 - The OLE DB provider "%ls" for linked server "%ls" reported an error. %lsWe can click Yes and linked server would be created but it won’t work. Once we click on Test Connection as shown below – we would get same error what we got during creation.To fix this problem, we need to understand little about connectivity and authentication. Whenever we connect to SQL, there are two waysSQL Authentication: To use this, we need to provide login name and password while connecting to SQL Server. These account are stored within SQL Server.Windows Authentication: While using Windows operating system, we can use logged in account to SQL and it would allow us to connect to SQL Server without providing password because we have already logged into operating system and have been authentica
19, 201022 0 0 0 When setting up linked server to third-party Databases, it is recommended to run the third-party provider in out-of-process mode, because when the provider is run in-process (within the test connection to the linked server failed error 18456 the same process as SQL Server), then any issues with the provider can cannot initialize the datasource object of ole db provider sqlncli11 for linked server affect SQL Server process which could also result in crashing SQL server.
To how to set a provider to msg 7399 level 16 state 1 line 1 access denied run out-of-process, uncheck "Allow In Process" property of the provider: There are certain permissions that have to be set on MSDAINITIALIZE to be able to initialize the provider http://blog.sqlauthority.com/2016/06/11/sql-server-fix-linked-server-error-7399-invalid-authorization-specification/ out-of-process and run linked server queries successfully locally and remotely. MSDAINITIALIZE is a COM class that is provided by OLE DB. This class can parse OLE DB connection strings and load/initialize the provider based on property values in the connection string. MSDAINITILIAZE is initiated by users connected to SQL Server. If windows authentication is used to connect to SQL Server, then the https://blogs.msdn.microsoft.com/dataaccesstechnologies/2010/08/19/permissions-needed-to-set-up-linked-server-with-out-of-process-provider/ provider is initialized under the logged in user account. If the logged in user is a SQL login, then provider is initialized under SQL Server service account. Based on the type of login used, permissions on MSDAINITIALIZE have to be provided accordingly. When these permissions are not set for the logged in users, we get Access Denied errors as below: Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. Access denied. Msg 7301, Level 16, State 2, Line 1 Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)". Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum) An exception has occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) The OLEDB Provider "MSDAORA" for linked serverhere for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/5198381/linking-server-in-sql-server-2008-r2 Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Linking Server in SQL Server 2008 R2 up vote 9 down vote favorite Can anyone guide me around to linking a server linked server to another in SQL Server 2008 R2? I am getting the following error when trying to do so in Management Studio. The linked server has been created but failed a connection test. Do you want to keep the linked server? ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) The OLE DB provider "SQLNCLI" for linked server "CDSPM1" reported an error. Authentication failed. Cannot initialize the data source object of OLE sql server error DB provider "SQLNCLI" for linked server "CDSPM1". OLE DB provider "SQLNCLI" for linked server "CDSPM1" returned message "Invalid authorization specification". (Microsoft SQL Server, Error: 7399) sql-server sql-server-2008 linked-server share|improve this question edited Feb 7 '13 at 0:55 abatishchev 57k56214353 asked Mar 4 '11 at 19:33 Jeff 2235923 3 What's wrong with a screen shot? –Oded♦ Mar 4 '11 at 19:35 Is the login and password valid for the linked server? –jim31415 Mar 4 '11 at 20:23 add a comment| 6 Answers 6 active oldest votes up vote 7 down vote accepted Seems like Authentication problem. Test by creating the linked Server using "Server Type" as "Sql Server". Then go into "Security" and set your user mapping. As a test, create a SQL login on the remote system and specify that on the "Be made using this security context" Be sure that you can PING the "Linked Server" name first. HTH share|improve this answer answered Mar 5 '11 at 13:09 VDMT 1088 Thanks! It saved my day. Mainly the "Be made using this security context" part. –Ramon Araujo Jul 19 at 5:14 add a comment| up vote 1 down vote Use drop down and choose SQL Server Native Client instead of SQL Server share|improve this answer answered Feb 7 '13 at 0:55 abatishchev 57k56214353 Jus