Thursday, March 8, 2012

ADSI Via Linked Server

Ok I have been through all the help and newsgroups that I can find and I can
not find the answer to my problem.
I have two SQL 2000 SP3 servers and 3 doamin controllers. On both SQL
servers I did the AD_addlinkedserver and the sp_addlinkedsrvlogin for all
local accounts to a doamin account.
One one SQL server it worked fine and I am able to run my query with no
problem but when I try to run the same query on the second SQL server I get:
Server: Msg 7320, Level 16, State 2, Line 1
Could not execute query against OLE DB provider 'ADsDSOObject'.
OLE DB error trace [OLE/DB Provider 'ADsDSOObject' ICommandText::Execute
returned 0x80040e22].
Here is the select command that I am using:
SELECT * FROM OPENQUERY( ADSI,'SELECT Name, CN FROM
''LDAP://ou=Users,DC=Domain,DC=com'' Where memberof = ''CN=Microsoft Office
2003 Standard001,OU=USA,DC=Domain,DC=com''')
Like I said this works on one SQL server but not the other. Both SQL servers
are part of the same doamin and I am trying to qury information form that
domain.
Any ideas would be great.
Did you check the MSDN article ?
http://msdn.microsoft.com/library/de...uted_query.asp
You might have a look on the error output and send it here:
http://groups.google.de/groups?hl=de...a09%26rnum%3D1
HTH, Jens Suessmeyer.
"Jesse" <Jesse@.discussions.microsoft.com> schrieb im Newsbeitrag
news:75491BB5-A8F9-4C00-A385-8836F517F641@.microsoft.com...
> Ok I have been through all the help and newsgroups that I can find and I
> can
> not find the answer to my problem.
> I have two SQL 2000 SP3 servers and 3 doamin controllers. On both SQL
> servers I did the AD_addlinkedserver and the sp_addlinkedsrvlogin for all
> local accounts to a doamin account.
> One one SQL server it worked fine and I am able to run my query with no
> problem but when I try to run the same query on the second SQL server I
> get:
> Server: Msg 7320, Level 16, State 2, Line 1
> Could not execute query against OLE DB provider 'ADsDSOObject'.
> OLE DB error trace [OLE/DB Provider 'ADsDSOObject' ICommandText::Execute
> returned 0x80040e22].
> Here is the select command that I am using:
> SELECT * FROM OPENQUERY( ADSI,'SELECT Name, CN FROM
> ''LDAP://ou=Users,DC=Domain,DC=com'' Where memberof = ''CN=Microsoft
> Office
> 2003 Standard001,OU=USA,DC=Domain,DC=com''')
> Like I said this works on one SQL server but not the other. Both SQL
> servers
> are part of the same doamin and I am trying to qury information form that
> domain.
> Any ideas would be great.
|||Jens,
Yes I saw that article and that is what I used to create my link and server
logon information.
"Jens Sü?meyer" wrote:

> Did you check the MSDN article ?
> http://msdn.microsoft.com/library/de...uted_query.asp
> You might have a look on the error output and send it here:
> http://groups.google.de/groups?hl=de...a09%26rnum%3D1
> HTH, Jens Suessmeyer.
>
> "Jesse" <Jesse@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:75491BB5-A8F9-4C00-A385-8836F517F641@.microsoft.com...
>
>

No comments:

Post a Comment