Link to home
Start Free TrialLog in
Avatar of epicazo
epicazoFlag for United States of America

asked on

Error importing into MSSQL when importing from AD Server

I am trying to pull data from AD into MSSQL, but I get the following error
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "ADsDSOObject" for linked server "ADSI".


SELECT * into xADObjects FROM OPENQUERY(ADSI, 'SELECT employeeType, employeeID, department, dNSHostName, accountExpires, whenCreated, whenChanged, userPrincipalName, scriptPath, pwdLastSet, physicalDeliveryOfficeName, objectCategory, lastLogonTimestamp, Name, displayName,givenname,distinguishedName, title, SAMAccountName, telephoneNumber, cn, sn, ou FROM ''LDAP://dc=avantihospitals,dc=local'' WHERE objectClass=''Person'' AND objectClass=''User''')

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of FLProfessional
FLProfessional
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EugeneZ
check if you are using  Kerberos not hops..
Avatar of epicazo

ASKER

thanks.  Sorry for delay