You are here: Re: Querying Windows Active Directory from Sql Server 2000 « MsSQL Server « IT news, forums, messages
Re: Querying Windows Active Directory from Sql Server 2000

Posted by Stu on 07/04/06 14:53

Hey Lucky,

I've never used ODBC to connect to ActiveDirectory before, but the
error indicates that it's a permissions problem. My guess is that the
SQL Server account (the account under shich SQL Server runs) does not
have permission to read the ActiveDirectory tree. Again, just
guessing, but you are probably running SQL Server as a local system
account, which wouldn't have any rights on the network.

Stu

Lucky wrote:
> Hi guys,
> after long long time. i'm back again with another problem. this time i
> think the problem is very very interesting and i really need you help
> on this.
>
> i'm trying to connect to the Active Directory. for that i've added one
> linked server to connect to the active directory. and then query like
> this:
>
> adding linked server:
>
> sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces',
> 'ADSDSOObject', 'adsdatasource'
>
>
> Query:
>
>
> SELECT [Name],SN[Last Name]
> FROM OPENQUERY( ADSI,
> 'SELECT Name,SN FROM ''LDAP://imsdom.dk/CN=Users,
> DC=domainname,DC=com''
> WHERE objectCategory = ''Person'' AND objectClass = ''user'' order by
> name')
>
> Error:
> OLE DB provider 'ADSDSOObject' reported an error. The provider
> indicates that the user did not have the permission to perform the
> operation.
> OLE DB error trace [OLE/DB Provider 'ADSDSOObject'
> ICommandPrepare::Prepare returned 0x80040e09: The provider indicates
> that the user did not have the permission to perform the operation.].
>
>
> i can't say anything more on this. as even i dont know about this. it
> is just a R&D on for very important functionality. if someone has done
> anything before like this, please do share with me.
>
> Tools:
>
> windows Active Directory
> sql server 2000 sp4
> VS.net 2005
>
>
> thanks,
> Lucky

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация