Mssql Error 7301
Contents |
19, 201022 Share 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 cannot obtain the required interface ( iid_idbschemarowset ) same process as SQL Server), then any issues with the provider can affect SQL
Error 7399 Linked Server Sql Server
Server process which could also result in crashing SQL server.
To how to set a provider to run sql server error 7399 access denied 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 out-of-process and cannot obtain the required interface ( iid_idbschemarowset ) from ole 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 provider is initialized underCannot Create An Instance Of Ole Db Provider Oraoledb.oracle For Linked Server Error 7302
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 server(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: Get Active Directory Users First/Last/Full microsoft sql server error 7399 invalid authorization specification Name thru Linked Server SQL Server > Transact-SQL Question 0 Sign cannot obtain the required interface iid_idbschemarowset from ole db provider adsdsoobject in to vote Hi There, I am trying to retrieve first/last/fullname of a login. I have succeeded
Cannot Obtain The Required Interface Iid_idbcreatecommand
in retrieving the displayname by means of the loginname, but the other names (first/last/full) a have some troubles with: I have created a linked server: -- Create Linked https://blogs.msdn.microsoft.com/dataaccesstechnologies/2010/08/19/permissions-needed-to-set-up-linked-server-with-out-of-process-provider/ Server ADSI USE Master GO EXEC master.dbo.sp_dropserver @server = N'ADSI' GO EXEC master.dbo.sp_addlinkedserver @server = N'ADSI' , @srvproduct = N'Active Directory Services' , @provider = N'ADsDSOObject' , @datasrc = N'einstein.waterland.loc' --AKA the full computer name of the AD server Then I wrote this function: USE [ReportServer] GO ALTER Function [dbo].[AdUsers] ( ) RETURNS Table AS RETURN https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3cc890ec-62f1-4b81-8786-2db31a1615e3/get-active-directory-users-firstlastfull-name-thru-linked-server?forum=transactsql ( Select [Name] , [DisplayName] From OpenQuery ( ADSI,'SELECT name, displayname FROM ''LDAP://einstein.waterland.loc'' WHERE objectCategory = ''Person'' AND objectClass = ''user''') ) ============================================================================= This function is oké. But if I try to retrieve firstname, lastname or fullname in the function Like: From OpenQuery ( ADSI,'SELECT lastname, displayname FROM ''LDAP://einstein.waterland.loc'' WHERE objectCategory = ''Person'' AND objectClass = ''user''') ) I get the error: Msg 7399, Level 16, State 1, Procedure AdUsers, Line 8 The OLE DB provider "ADsDSOObject" for linked server "ADSI" reported an error. The provider did not give any information about the error. Msg 7350, Level 16, State 2, Procedure AdUsers, Line 8 Cannot get the column information from OLE DB provider "ADsDSOObject" for linked server "ADSI". ============================================================================= Then if I try to open the "Tables" or "Views" tab in the linked server ADSI, Catalogs, Default entry, I get the error: TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occur
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6674 Come on over! We've restricted the ability to create new threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get http://dba.stackexchange.com/questions/94389/adsi-linked-server-why-can-i-query-ad-in-vba-but-not-as-a-linked-server your question answered! Username: Password: Save Password Forgot your Password? All Forums SQL Server 2000 Forums SQL Server Administration (2000) Linked Server, Error 7301 Reply to Topic Printer Friendly Author cannot obtain Topic AskSQLTeam Ask SQLTeam Question USA 0 Posts Posted-06/04/2001: 00:56:45 sherry writes "Hi, I would like to know how to handle the following error : Error 7301. Could not obtain a required interface from OLE DB provider 'MSIDXS'" graz Chief SQLTeam Crack Dealer USA 4149 Posts Posted-06/04/2001: 00:56:45 Usually MS Knowledge support is you cannot obtain the best bet in questions like this. Especially in this case.http://support.microsoft.com/support/kb/articles/Q248/1/56.ASP Topic Reply to Topic Printer Friendly Jump To: Select Forum General SQL Server Forums New to SQL Server Programming New to SQL Server Administration Script Library Data Corruption Issues Database Design and Application Architecture SQL Server 2012 Forums Transact-SQL (2012) SQL Server Administration (2012) SSIS and Import/Export (2012) Analysis Server and Reporting Services (2012) Replication (2012) Availability Groups and DR (2012) Other SQL Server 2012 Topics SQL Server 2008 Forums Transact-SQL (2008) SQL Server Administration (2008) SSIS and Import/Export (2008) High Availability (2008) Replication (2008) Analysis Server and Reporting Services (2008) Other SQL Server 2008 Topics SQL Server 2005 Forums Transact-SQL (2005) SQL Server Administration (2005) .NET Inside SQL Server (2005) SSIS and Import/Export (2005) Service Broker (2005) Replication (2005) High Availability (2005) Analysis Server and Reporting Services (2005) Express Edition and Compact Edition (2005) Other SQL Server Topics (2005) SQL Server 2000 Forums SQL Server Development (2000) SQL Server Administration (2000) Import/Export (DTS) and Replication (2000) Transact-SQL (2000) Analysis Services (2000) MSDE (2000) Development Tools ASP.NET Reporting Se
log in tour help Tour Start here 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 Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ADSI Linked Server: Why can I query AD in VBA, but not as a Linked Server? up vote 4 down vote favorite 1 After all the reading and research I've done, this seems like the most logical place to post this question: Why can I query Active Directory using VBA, but not a Linked Server in SQL Management Studio 2012? First, I have been able to do this before, but many moons ago with SQL Server 2005. Here is the query I am attempting: SELECT * FROM OpenQuery( ADSI, 'SELECT displayName, title, department, employeeID, userAccountControl FROM ''LDAP://dc=testdomain'' WHERE objectCategory = ''Person'' AND objectClass = ''user'' AND userAccountControl=512') Here is the error I'm getting: Msg 7321, Level 16, State 2, Line 1 An error occured while preparing the query "SELECT displayName, title, department, employeeID, userAccountControl FROM 'LDAP://dc=testdomain' WHERE objectCategory = 'Person' AND objectClass = 'user' AND userAccountControl=512" for execution against OLE DB provider "ADsDSOObject" for linked server "ADSI". The problem with this error message is that it's very generic and seemingly doesn't yield anything useful. Everything I've read appears to be a permission issue or the syntax of the query, and I assume it's meant in the context to my SQL instance login and how the security is set up in the Linked Server