Error Ole Exception From Active Directory
RecentThreads NewestNodes Donate What'sNew on Mar 27, 2006 at 21:39UTC ( #539558=perlquestion: print w/replies, xml ) Need Help?? rlb3 has asked for the wisdom of the Perl Monks concerning the following question: I'm try to pull
Cannot Generate Sspi Context Microsoft Sql Server Error 0
some information from Active Directory using Win32::OLE. I'm using example code from the target principal name is incorrect. cannot generate sspi context sql 2012 the Active Directory cookbook but i'm still getting this error: OLE exception from "Provider":
One or more errors cannot generate sspi context fix occurred during processing of command.
Win32::OLE(0.1702) error 0x80040e14 in METHOD/PROPERTYGET "Execute" at sdomain.pl line 11 [download] Here is the code I'm using. my $strBase = "LDAP://dc=corp,dc=example,dc=edu;"; + # BaseDN shouldThe Target Principal Name Is Incorrect. Cannot Generate Sspi Context. (.net Sqlclient Data Provider)
be the search base my $strFilter = "(&(objectclass=user)(objectcategory=Person));"; + # Valid LDAP search filter my $strAttrs = "name,mailNickname,extensionAttribute1;"; + # Comma-seperated list my $strScope = "Subtree"; + # Should be on of Subtree, Onelevel or Base use Win32::OLE; $Win32::OLE::Warn = 3; my $objConn = Win32::OLE->CreateObject("ADODB.Connection"); $objConn->{Provider} = "ADsDSOObject"; $objConn->Open("Active Directory Provider"); my $objRS = $objConn->Execute($strBase . $strFilter . $strAttrs . $str
Odbc Sql Server Driver Cannot Generate Sspi Context
+Scope); $objRS->MoveFirst; while (not $objRS->EOF) { print $objRS->Fields(0)->Value,"\n"; $objRS->MoveNext; } [download] Any help would be great. rlb3 Comment on Help using Win32::OLESelect or Download Code Replies are listed 'Best First'. Re: Help using Win32::OLE by Anonymous Monk on Mar 27, 2006 at 22:39UTC The error message breaks down like this: OLE exception from "Provider": [download] Means that the error came from your provider (Active Directory in this case). One or more errors occurred during processing of command [download] Is the error that was returned by Active Directory. Win32::OLE(0.1702) error 0x80040e14 in METHOD/PROPERTYGET "Execute" at sdomain.pl line 11 [download] Means that Active directory generated the error when Perl called "Execute" on line 11. The command you're trying to execute on line 11 is LDAP://dc=corp,dc=example,dc=edu;(&(objectclass=user)(objectcategory=P +erson));name,mailNickname,extensionAttribute1;Subtree [download] The error message from Active Directory isn't very helpful in this case. You need to change my $strBase = "LDAP://dc=corp,dc=example,dc=edu;"; [download] to my $strBase = "
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related the target principal name is incorrect sql management studio threads Remove From My Forums Answered by: Trying
Sqlexception (0x80131904): The Target Principal Name Is Incorrect. Cannot Generate Sspi Context.
to Query 'Active Directory' in an SSIS package. SQL Server > SQL Server the target principal name is incorrect cannot generate sspi context c# Integration Services Question 0 Sign in to vote Hi AllI am trying to run a query against our 'Active Directory' and http://www.perlmonks.org/?node_id=539558 I keep getting errors. I have done the following:1. Set up Linked Server (using the OLE DB For Directory Services) and also set the login information:
EXEC sp_addlinkedsrvlogin 'ADSI', False, 'SQL_Usr','DDEMO\JillSmith', 'PassWord' 2. Created a connection in SSIS3. In My SSIS Package I https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d0dcf34a-3e8e-4393-917d-a6c5454b542d/trying-to-query-active-directory-in-an-ssis-package?forum=sqlintegrationservices have created a dataflow select the AD connection 'ADSI'. 4. Tried to run the following query:SELECT samaccountname, adspath, sapUsername, mail, info, costCenter, pager, mobile, facsimileTelephoneNumber, telephoneNumber, company,department, title, sn, givenName, name, employeeNumber FROM''LDAP://OU=Main_Users, DC=DemoAD,DC=com'' WHERE objectCategory = ''Person'' AND objectClass= ''user''And it fails - I can get this working in SQL 2000 DTS by using an Open Query statement!The Error message I get when trying to test the query is:Error at Export From AD [OLE DB Source [1]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x00000000.Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap) I have event tried the working OPEN QUERY in SSMS and I get the following: Msg 7321, Level 16, State 2, Line 1 An error occurred while preparing the query "SELECT samaccountname, adspath, sapUsystem returned: (113) No route to cannot generate sspi host The remote host or network may be down. Please try the request again. Your cache administrator is webmaster. Generated Wed, 12 Oct 2016 20:39:25 GMT by s_ac5 (squid/3.5.20)