troubleshooting Question

SSIS Package, need to access Active Directory

Avatar of Bruce
BruceFlag for United States of America asked on
DatabasesMicrosoft SQL ServerMicrosoft SQL Server 2005
9 Comments1 Solution4437 ViewsLast Modified:
I am trying to build an SSIS package that accesses Active Directory to check for AMAAccountNames.

In SSMS I can run this statement (using a linked server)...
SELECT * from openquery (ADSI, 'select sAMAccountName from ''LDAP://...'' ')
It works.

In my SSIS package I am able to create a connection to active directory (using the OLE DB Provider for Microsoft Directory Services) and the "Test Connection" button returns "...succeeded" but when I go to create a OLE DB Data Source it errors out.

The details...

In my OLE DB Source I select my "test succeeded" connection named "ADSI" for the "OLE DB connection manager" dropdown, then "SQL command" from "Data access mode".   In the "SQL command text" I put this...

select sAMAccountName from 'LDAP://...connection info..."

When I click Preview I get this error...
Error at Data Flow Task [OLE DB Source [359]]: An OLE DB error has occurred. Error code: 0x80040E21.
Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap)

Note: I am developing this directly on the database server.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros