Thursday, March 8, 2012
ADSI Via Linked Server
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...
>
>
ADSI Via Linked Server
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/default.asp?url=/library/en-us/adsi/adsi/distributed_query.asp
You might have a look on the error output and send it here:
http://groups.google.de/groups?hl=de&lr=&threadm=pa5ReRhvBHA.2164%40cpmsftngxa09&rnum=1&prev=/groups%3Fq%3Dsql%2Bserver%2Badsi%2Blinked%2Bserver%2B7320%26hl%3Dde%26lr%3D%26selm%3Dpa5ReRhvBHA.2164%2540cpmsftngxa09%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/default.asp?url=/library/en-us/adsi/adsi/distributed_query.asp
> You might have a look on the error output and send it here:
> http://groups.google.de/groups?hl=de&lr=&threadm=pa5ReRhvBHA.2164%40cpmsftngxa09&rnum=1&prev=/groups%3Fq%3Dsql%2Bserver%2Badsi%2Blinked%2Bserver%2B7320%26hl%3Dde%26lr%3D%26selm%3Dpa5ReRhvBHA.2164%2540cpmsftngxa09%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.
>
>
ADSI OPENQUERY and MultiValued Attributes
These are the messages you get when you try:
Could not get the data of the row from the OLE DB provider 'ADSDSOObject'.
Could not convert the data value due to reasons other than sign mismatch or
overflow.
Data status returned from the provider:
[COLUMN_NAME=member STATUS=DBSTATUS_E_CANTCONVERTVALUE],
JBHi,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you would like to know how to query
MultiValued attributes in Active Directory. If I have misunderstood your
concern, please feel free to point it out.
Based on my knowledge, there is a limitation on querying the Active
Directory which is that multivalued properties cannot be returned in the
result set to SQL Server. ADSI will read schema information from the LDAP
server that defines the structure and syntax of the classes and attributes
used by the server. If the attribute that is requested from the LDAP server
is defined in the schema as being multi-valued it cannot be returned in an
OPENQUERY statement.
It is typical for a directory server to enforce a server limitation on the
number of objects that will be returned for a given query. This is to
prevent denial-of-service attacks and network overloading.
Using ADSI as OLE DB Provider, it can participate in Distributed Query for
following possible scenarios:
- Joining Active Directory objects with SQL Server data.
- Updating SQL data from Active Directory objects.
- Creating three-way or four-way joins with other OLE DB Providers. For
example, Index Server, SQL Server, and Active Directory.
For more detailed information, please refer the article below
Distributed Query
http://msdn.microsoft.com/library/d...-us/adsi/adsi/d
istributed_query.asp
OLE DB Provider for Microsoft Directory Services
http://msdn.microsoft.com/library/d...-us/acdata/ac_8
_qd_12_94fn.asp
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Michael - Thank you for taking the time to reply to my question. I needed
such confirmation before start using DTS/VBScript to populate a set of
columns...
--
Juan B
"Michael Cheng [MSFT]" wrote:
> Hi,
> Welcome to use MSDN Managed Newsgroup!
> From your descriptions, I understood you would like to know how to query
> MultiValued attributes in Active Directory. If I have misunderstood your
> concern, please feel free to point it out.
> Based on my knowledge, there is a limitation on querying the Active
> Directory which is that multivalued properties cannot be returned in the
> result set to SQL Server. ADSI will read schema information from the LDAP
> server that defines the structure and syntax of the classes and attributes
> used by the server. If the attribute that is requested from the LDAP serve
r
> is defined in the schema as being multi-valued it cannot be returned in an
> OPENQUERY statement.
> It is typical for a directory server to enforce a server limitation on the
> number of objects that will be returned for a given query. This is to
> prevent denial-of-service attacks and network overloading.
> Using ADSI as OLE DB Provider, it can participate in Distributed Query for
> following possible scenarios:
> - Joining Active Directory objects with SQL Server data.
> - Updating SQL data from Active Directory objects.
> - Creating three-way or four-way joins with other OLE DB Providers. For
> example, Index Server, SQL Server, and Active Directory.
> For more detailed information, please refer the article below
> Distributed Query
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/d[/ur
l]
> istributed_query.asp
> OLE DB Provider for Microsoft Directory Services
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8[/ur
l]
> _qd_12_94fn.asp
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are always here to be of
> assistance!
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
=============
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>|||Hi Juan,
You are welcome!
If you have any questions or concerns on SQL Server next time, don't
hesitate to let me know. We are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Sorry to Jump on the thread but I am receiving the same issue while querying
the "Description" field from Active Directory. Is this too MULTIVALUE?
Many Thanks
Andy
ADSI LDAP Query 1000 Record limit for MSSQLServer linked server
I have successfully set and used a linked server to query ADSI.
Since this question also concerns MSSQLServer, I've cross posted it --
I hope this is not a breach of etiquette.
I have successly created a view based on the linked server.
Unfortunately, it only shows 1000 records, and there does not seem to
be any way to set the Page Size.
I found the following:
http://support.microsoft.com/defaul...kb;en-us;243281
Which seems to imply that the default can be set by changing registry
key: "HKEY_CURRENT_USER\Software\Policies\Microsoft\Wind ows\Directory
UI"
I have set this key, and also set it for the user account under which
MSSQLServer runs. The value persists after a reboot. The Domain Group
policy sets the default to 15000.
This behaviour is not restricted to the linked server. If I use the
script found here:http://hacks.oreilly.com/pub/h/1121 I can access more
than 1000 records, but only if I set the "Page Size" property. If I
comment it out to let the default hold, it is 1000.
It must be settable SOMEWHERE or the whole linked server thing is of
very limited use.
At present, the best solution I've been able to come up with is to use
the above script modified to run as a DTS package. Yuck.
TIA,
BM>This behaviour is not restricted to the linked server. If I use the
>script found here:http://hacks.oreilly.com/pub/h/1121 I can access more
>than 1000 records, but only if I set the "Page Size" property. If I
>comment it out to let the default hold, it is 1000.
Yes, that's the way it was designed - if you don't use paged searches,
AD will limit you to about 1000 objects.
So if you want more than 1000 objetcs back, just set the "Page Size"
options - where's the problem with that??
Marc
__________________________________________________ ______________
Marc Scheuner ** mscheuner -at- mvps.org ** http://adsi.mvps.org
Microsoft MVP for Directory Services Programming
http://www.dirteam.com/blogs/mscheuner/default.aspx
http://groups.yahoo.com/group/ADSIANDDirectoryServices/|||No problem at all.
Now, can you tell me where you set page size when you have ADSI set up
as a linked server? I've not been able to find it, as I mentioned in
my post.
The reference given about setting the "Directory UI" key does not seem
to work.
Thanks,
BM
ADSI hetrogenous queries
I think I'm going insane, as I'm having a problem with something I've never
had issues with before: I'm moving a database to a new server, but the
destination server also requires the ADSI distributed server to be configured.
So far as I remember it, this is what I thought I needed to do:
1. Create the linked server definition and password:
EXEC sp_addlinkedserver 'ADSI', 'Directory Services', 'ADSDSOOBJECT',
'dsadatasource'
go
EXEC sp_addlinkedsrvlogin ADSI, 'false', NULL, 'domain\account', 'password'
go
2. Execute a query such as:
SELECT *
FROM OPENQUERY(ADSI,
'<LDAP://DC=SOME,DC=DOMAIN,DC=COM>;(&(objectClass=user)(sAM AccountName=jbloggs));ADsPath;subTree')
When I run this on my original sever (I even ran the link creation steps
creating an ADSI2 connection for test purposes) the query returns the
expected row. When I run it on the new machine, I get the following error:
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].
The above two steps are how I successfully configured the original server.
I thought this may have been some form of COM issue, but when I compared the
configuration of both machine (assuming I haven't missed anything obvious)
they looked the same.
The domain account I'm using for the directory authentication is the same
one as the MSSSQLSERVICE service runs under, which in addition is a local
administrator.
I'm not really expecting an answer on this as it seems terribly cryptic, but
if you have any suggestions they'd be most welcome
Cheers
Lain
> Hi guys
> I think I'm going insane, as I'm having a problem with something I've
never
> had issues with before: I'm moving a database to a new server, but the
> destination server also requires the ADSI distributed server to be
configured.
> So far as I remember it, this is what I thought I needed to do:
> 1. Create the linked server definition and password:
> EXEC sp_addlinkedserver 'ADSI', 'Directory Services', 'ADSDSOOBJECT',
> 'dsadatasource'
> go
> EXEC sp_addlinkedsrvlogin ADSI, 'false', NULL, 'domain\account',
'password'
> go
> 2. Execute a query such as:
> SELECT *
> FROM OPENQUERY(ADSI,
>
'<LDAP://DC=SOME,DC=DOMAIN,DC=COM>;(&(objectClass=user)(sAM AccountName=jblog
gs));ADsPath;subTree')
> When I run this on my original sever (I even ran the link creation steps
> creating an ADSI2 connection for test purposes) the query returns the
> expected row. When I run it on the new machine, I get the following error:
> 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].
> The above two steps are how I successfully configured the original server.
> I thought this may have been some form of COM issue, but when I compared
the
> configuration of both machine (assuming I haven't missed anything
obvious)
> they looked the same.
> The domain account I'm using for the directory authentication is the same
> one as the MSSSQLSERVICE service runs under, which in addition is a local
> administrator.
> I'm not really expecting an answer on this as it seems terribly cryptic,
but
> if you have any suggestions they'd be most welcome
> Cheers
> Lain
Check your OLE DB provider options and make sure "AllowInProcess" is turned
on:
HKLM Software\Microsoft\MSSQLServer\Providers\ADSDSOObj ect -
AllowInProcess = 1
Hope this helps,
Eric Crdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Thank you Eric. Perfecto!
ADSI hetrogenous queries
I think I'm going insane, as I'm having a problem with something I've never
had issues with before: I'm moving a database to a new server, but the
destination server also requires the ADSI distributed server to be configure
d.
So far as I remember it, this is what I thought I needed to do:
1. Create the linked server definition and password:
EXEC sp_addlinkedserver 'ADSI', 'Directory Services', 'ADSDSOOBJECT',
'dsadatasource'
go
EXEC sp_addlinkedsrvlogin ADSI, 'false', NULL, 'domain\account', 'password'
go
2. Execute a query such as:
SELECT *
FROM OPENQUERY(ADSI,
'<LDAP://DC=SOME,DC=DOMAIN,DC=COM>;(&(objectClass=user)(sAMAccountName=jblog
gs));ADsPath;subTree')
When I run this on my original sever (I even ran the link creation steps
creating an ADSI2 connection for test purposes) the query returns the
expected row. When I run it on the new machine, I get the following error:
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].
The above two steps are how I successfully configured the original server.
I thought this may have been some form of COM issue, but when I compared the
configuration of both machine (assuming I haven't missed anything obvious)
they looked the same.
The domain account I'm using for the directory authentication is the same
one as the MSSSQLSERVICE service runs under, which in addition is a local
administrator.
I'm not really expecting an answer on this as it seems terribly cryptic, but
if you have any suggestions they'd be most welcome
Cheers
Lain> Hi guys
> I think I'm going insane, as I'm having a problem with something I've
never
> had issues with before: I'm moving a database to a new server, but the
> destination server also requires the ADSI distributed server to be
configured.
> So far as I remember it, this is what I thought I needed to do:
> 1. Create the linked server definition and password:
> EXEC sp_addlinkedserver 'ADSI', 'Directory Services', 'ADSDSOOBJECT',
> 'dsadatasource'
> go
> EXEC sp_addlinkedsrvlogin ADSI, 'false', NULL, 'domain\account',
'password'
> go
> 2. Execute a query such as:
> SELECT *
> FROM OPENQUERY(ADSI,
>
'<LDAP://DC=SOME,DC=DOMAIN,DC=COM>;(&(objectClass=user)(sAMAccountName=jblog
gs));ADsPath;subTree')
> When I run this on my original sever (I even ran the link creation steps
> creating an ADSI2 connection for test purposes) the query returns the
> expected row. When I run it on the new machine, I get the following error:
> 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::Execu
te
> returned 0x80040e22].
> The above two steps are how I successfully configured the original server.
> I thought this may have been some form of COM issue, but when I compared
the
> configuration of both machine (assuming I haven't missed anything
obvious)
> they looked the same.
> The domain account I'm using for the directory authentication is the same
> one as the MSSSQLSERVICE service runs under, which in addition is a local
> administrator.
> I'm not really expecting an answer on this as it seems terribly cryptic,
but
> if you have any suggestions they'd be most welcome
> Cheers
> Lain
--
Check your OLE DB provider options and make sure "AllowInProcess" is turned
on:
HKLM Software\Microsoft\MSSQLServer\Providers
\ADSDSOObject -
AllowInProcess = 1
Hope this helps,
Eric Crdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you Eric. Perfecto!
ADSI hetrogenous queries
I think I'm going insane, as I'm having a problem with something I've never
had issues with before: I'm moving a database to a new server, but the
destination server also requires the ADSI distributed server to be configured.
So far as I remember it, this is what I thought I needed to do:
1. Create the linked server definition and password:
EXEC sp_addlinkedserver 'ADSI', 'Directory Services', 'ADSDSOOBJECT',
'dsadatasource'
go
EXEC sp_addlinkedsrvlogin ADSI, 'false', NULL, 'domain\account', 'password'
go
2. Execute a query such as:
SELECT *
FROM OPENQUERY(ADSI,
'<LDAP://DC=SOME,DC=DOMAIN,DC=COM>;(&(objectClass=user)(sAMAccountName=jbloggs));ADsPath;subTree')
When I run this on my original sever (I even ran the link creation steps
creating an ADSI2 connection for test purposes) the query returns the
expected row. When I run it on the new machine, I get the following error:
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].
The above two steps are how I successfully configured the original server.
I thought this may have been some form of COM issue, but when I compared the
configuration of both machine (assuming I haven't missed anything obvious)
they looked the same.
The domain account I'm using for the directory authentication is the same
one as the MSSSQLSERVICE service runs under, which in addition is a local
administrator.
I'm not really expecting an answer on this as it seems terribly cryptic, but
if you have any suggestions they'd be most welcome :)
Cheers
Lain> Hi guys
> I think I'm going insane, as I'm having a problem with something I've
never
> had issues with before: I'm moving a database to a new server, but the
> destination server also requires the ADSI distributed server to be
configured.
> So far as I remember it, this is what I thought I needed to do:
> 1. Create the linked server definition and password:
> EXEC sp_addlinkedserver 'ADSI', 'Directory Services', 'ADSDSOOBJECT',
> 'dsadatasource'
> go
> EXEC sp_addlinkedsrvlogin ADSI, 'false', NULL, 'domain\account',
'password'
> go
> 2. Execute a query such as:
> SELECT *
> FROM OPENQUERY(ADSI,
>
'<LDAP://DC=SOME,DC=DOMAIN,DC=COM>;(&(objectClass=user)(sAMAccountName=jblog
gs));ADsPath;subTree')
> When I run this on my original sever (I even ran the link creation steps
> creating an ADSI2 connection for test purposes) the query returns the
> expected row. When I run it on the new machine, I get the following error:
> 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].
> The above two steps are how I successfully configured the original server.
> I thought this may have been some form of COM issue, but when I compared
the
> configuration of both machine (assuming I haven't missed anything
obvious)
> they looked the same.
> The domain account I'm using for the directory authentication is the same
> one as the MSSSQLSERVICE service runs under, which in addition is a local
> administrator.
> I'm not really expecting an answer on this as it seems terribly cryptic,
but
> if you have any suggestions they'd be most welcome :)
> Cheers
> Lain
--
Check your OLE DB provider options and make sure "AllowInProcess" is turned
on:
HKLM Software\Microsoft\MSSQLServer\Providers\ADSDSOObject -
AllowInProcess = 1
Hope this helps,
--
Eric Cárdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you Eric. Perfecto! :)
ADSI Group Members and SQL
Directory Group. The error seems to happen when the field I am querying has
multiple vales
This is what I have so far:
exec sp_addlinkedserver 'xxx', 'Active Directory Services 2.5',
'ADsDSOObject', 'adsdatasource'
select
convert(varchar(50), [Name]) as GroupName,
convert(varchar(500), member) as member
from openquery(xxx,
'select name, member
from ''LDAP://DC=domain,DC=com''
where objectClass = ''Group''')
This is the error message I am getting:
Server: Msg 7346, Level 16, State 2, Line 1
Could not get the data of the row from the OLE DB provider 'ADsDSOObject'.
Could not convert the data value due to reasons other than sign mismatch or
overflow.
OLE DB error trace [OLE/DB Provider 'ADsDSOObject' IRowset::GetData returned
0x40eda: Data status returned from the provider: [COLUMN_NAME=member
STATUS=DBSTATUS_E_CANTCONVERTVALUE], [COLUMN_NAME=name
STATUS=DBSTATUS_S_OK]].
Thanks,
Kevin E.Hi,
The "member" attribute is multi-valued. ADO returns this as an array. I
assume the OLE/DB driver does as well. It can have no values, one, or many.
You should test your code with all 3 possibilities. I would have to
experiment using linkedserver.
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--
"KevinE" <eckart_612@.hotmail.com> wrote in message
news:tvqdnWW6j--KbwjfRVn-jg@.centurytel.net...
> Does anyone have a good example of querying group members out of Active
> Directory Group. The error seems to happen when the field I am querying
has
> multiple vales
> This is what I have so far:
> exec sp_addlinkedserver 'xxx', 'Active Directory Services 2.5',
> 'ADsDSOObject', 'adsdatasource'
>
> select
> convert(varchar(50), [Name]) as GroupName,
> convert(varchar(500), member) as member
> from openquery(xxx,
> 'select name, member
> from ''LDAP://DC=domain,DC=com''
> where objectClass = ''Group''')
>
> This is the error message I am getting:
> Server: Msg 7346, Level 16, State 2, Line 1
> Could not get the data of the row from the OLE DB provider 'ADsDSOObject'.
> Could not convert the data value due to reasons other than sign mismatch
or
> overflow.
> OLE DB error trace [OLE/DB Provider 'ADsDSOObject' IRowset::GetData
returned
> 0x40eda: Data status returned from the provider: [COLUMN_NAME=member
> STATUS=DBSTATUS_E_CANTCONVERTVALUE], [COLUMN_NAME=name
> STATUS=DBSTATUS_S_OK]].
>
> Thanks,
> Kevin E.
>
>
ADSI and Reporting Services Permission issue.
actually my Active Directory LDAP query. I have already created a
linked server and account for my user name jkim.
I have a report that polls data from this stored proc. After I set the
datasource which uses an account "sqluser", I try to the run the report
and I get this:
An error has occurred during report processing. (rsProcessingAborted)
Get Online Help
Query execution failed for data set 'DispatchActivity'.
(rsErrorExecutingCommand) Get Online Help
OLE DB provider 'ADSDSOObject' reported an error. The provider
indicates that the user did not have the permission to perform the
operation.
The data source uses the account "sqluser" which is an account that's
stored in the report server. I'm pretty sure this is what's causing
the error. Does 'sqluser' have to be an actual Active Directory user
for it to have access to the ADSDSOObject?
I don't know if I'm making any sense.nevermind, i figured it out.
i didn't check the "use as windows authentication" checkbox in the
datasource.
ADSI - SQL Server - Link to ADAM Help
I've seen a few others with this problem, but have not found a
solution anywhere:
I'm trying to link AD/AM to SQL Server through ADSI for querying in
SQL.
Environment:
Windows Server 2003 **Not in an AD domain
SQL Server 2000 (running under 'administrator' user account)
ADAM (Added "servername\administrator" and several adam users to the
"Readers" role)
Steps taken:
1. Add Linked Server-
sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces',
'ADSDSOObject', 'adsdatasource'
2. Multiple Attempts at Linked Server Login-
exec sp_addlinkedsrvlogin 'ADSI', false, 'MACHINENAME\administrator',
'MACHINENAME\administrator', 'password'
exec sp_addlinkedsrvlogin 'ADSI', false, 'MACHINENAME\administrator',
'cn=username,cn=users,cn=app,dc=company,
dc=com', 'password'
3. Multiple Attempts to Query through SQL Query Analyzer-
SELECT * FROM OpenQuery(ADSI,
'<LDAP://localhost:389/cn=app,DC=company,DC=com>;subtree')
SELECT * FROM OpenQuery(ADSI,
'<LDAP://localhost:389/cn=app,DC=company,DC=com/cn=users>;subtree')
-- All of the above result in the following error message: 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.].
Now, this query did result in a different error message:
SELECT * FROM OpenQuery(ADAMConn, 'SELECT * FROM
''LDAP://localhost:389/ cn=app,DC=company,DC=com'' WHERE
objectCategory = ''Person''')
--Message: OLE/DB Provider 'ADSDSOObject' ICommandPrepare::Prepare
returned 0x80040e09: The provider indicates that the user did not
have the permission to perform the operation.
Can someone help'!!Having same issue...LOTS of people with problem...but no solution posted.