Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Error in accessing Active Directory through SQL.

Author  Topic 

sureshkk
Starting Member

21 Posts

Posted - 2011-12-06 : 01:32:33
Hi all,

I am gettting following error while accessing Active directory from SQL Server

SELECT * FROM OPENROWSET('AdsDsoObject','User ID=user1; Password=password123;ADSI Flag=0x11;Page Size=10000','SELECT * FROM ''LDAP://scsdomhyd01.in,DC=scsdomhyd01,DC=in''')


Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "SELECT * FROM 'LDAP://scsdomhyd01.in,DC=scsdomhyd01,DC=in'" for execution against OLE DB provider "AdsDsoObject" for linked server "(null)".

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-06 : 03:54:41
see

http://www.kodyaz.com/articles/active-directory-services-queries-using-openquery.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sureshkk
Starting Member

21 Posts

Posted - 2011-12-06 : 06:05:00
Thank you visakh, it is working fine.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-06 : 06:16:56
wc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -