Hi,
everyone I'm trying to link an Active Directory to the SQL Server.
Unluckily I came across some problems and the information I found in the archive of this
forum didn't help me.
I got the link basically running by following code:
EXEC sp_addlinkedserver 'TEST', 'Active Directory Services 2.5', 'ADSDSOObject', 'LDAP://testserver.test.de'
select * from openquery(TEST, '<LDAP://testserver.test.de>;(&(objectClass=Person)(sn=Smith));adspath;subtree')
Unluckily I'm not able to query any other attributes then adspath. Trying the following code results in an error:
select * from openquery(TEST, '<LDAP://testserver.test.de>;(&(objectClass=Person)(sn=Smith));sn;subtree')
I receive the following error message:
OLE DB-Fehlertrace [Non-interface error: OLE DB provider ADSDSOObject returned DBPROP_STRUCTUREDSTORAGE without DBPROPVAL_OO_BLOB being supported].
OLE DB-Fehlertrace [OLE/DB Provider 'ADSDSOObject' IRowset::GetData returned 0x80040e21: Data status returned from the provider: [COLUMN_NAME=sn STATUS=DBSTATUS_E_CANTCONVERTVALUE]].
The administrator of the Active directory service told me that my queries have successfully been executed and
correct values have been returned.
Does anyone have an idea what might cause my problems?
ThanksRefer to this KBA (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q299410) about performing query using ADSI.|||Thanks, but I know this article already. I thought that maybe the chapter about limitations might be of interest for me especially the point about multivalued properties.
However I cross checked all limitations with the admin. of my Active Directory Service. The second query which I posted as not running only returns one value. Also I checked the query with a Delphi application of my colleague and the application returned correctly a string value of the surname. Nevertheless my SQL Server always tells me that it cannot convert a value.|||What was the error during the conversion?|||Well I'm not doing an explicit conversion. The statement which causes the error message which indicates me that there is something wrong with a conversion is:
select * from openquery(TEST, '<LDAP://testserver.test.de>;(&(objectClass=Person)(sn=Smith));sn;subtree')
and the error message is:
Server: Nachr.-Nr. 7346, Schweregrad 16, Status 2, Zeile 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 0x80040e21: Data status returned from the provider: [COLUMN_NAME=sn STATUS=DBSTATUS_E_CANTCONVERTVALUE]].
Unluckily I also don't know of any tool with which I might be able to monitor the OLE DB provider to see what values and type of values are transfered.
Is there any way to do explicit conversions of data types within the LDAP syntax of the OPENQUERY statement?
Showing posts with label across. Show all posts
Showing posts with label across. Show all posts
Wednesday, March 28, 2012
Monday, March 19, 2012
servers - Domain IDs
Is there an issue with using domain IDs with linked servers in 2KSP3 ? For some reason I get login failures using domain ids across linked servers, but sql logins with the exact permissions work fine. ???It sounds like you need a SPN (http://msdn2.microsoft.com/en-us/library/ms191153.aspx) doctor!
-PatP|||It sounds like you need a SPN (http://msdn2.microsoft.com/en-us/library/ms191153.aspx) doctor!
-PatP
Yep, did some research and that's EXACTLY it, thanks much for the feedback.
-PatP|||It sounds like you need a SPN (http://msdn2.microsoft.com/en-us/library/ms191153.aspx) doctor!
-PatP
Yep, did some research and that's EXACTLY it, thanks much for the feedback.
Friday, March 9, 2012
server/SQL Server OLE DB performance problem with parameters?
Hi,
I am interested if anyone else has come across performance problems with the SQL Server linked servers to SQL Server. I suspect that the OLE DB Provider that I am using perhaps has some performance issues when passed parameters.
I have set the dynamic paramters option on, and use collation compatible.Linked servers in general are a performance nightmare.
Get me that bucket of data over there...ALL of it.
Careful...carry it over here now. Be careful. Oh crap...I dropped some. You need to start over.
Great...it's finally here....ALL OF IT. Can you throw away everything that doesn't match this one value?
That's great. Thanks.|||Replace a straight DML/SELECT with a call to a stored procedure on the remote side and you'll be home free!|||SQL Attempts to retrieve statistics information from remote tables to determine which server should be the driving server - or where to filter rows first before joins. It runs some system stored procedures (I forget the names at the moment) If the account connecting to the remote server does not have permisisons on the procedures SQL will assume the worset and generate a query plan with the statistics available on the local server. I'm not recommending you grant the remote user dbo rights (not that I would do that ...) but if you did do it temporarily and saw a performance increase you could research exactly which permissions were really needed. Actually you can run profiler on the remote server and you will see the statistics gathering queries and identify the objects involved.|||In testing I found that the query performed faster with the parameters declared 'inline'. Does this make sense? Or am I suffering from inconsistent testing conditions? Our production databases are on the same servers as our test dbs.
The distributed queries are in stored procedures. And they (usually) don't join to the local server. However, the stored procs need to query the local db and store results there. It would be possible to put stored procs on the remote db. But we have already taken the functions into production so code changes are undesired.|||Try using the openquery() method. When this method is used the calling SQL server instance does not attempt to retrieve statistics info and the linked server processes the SQL and simply returns the results.
This especially makes a huge difference when the linked server is Sybase ASE.
I am interested if anyone else has come across performance problems with the SQL Server linked servers to SQL Server. I suspect that the OLE DB Provider that I am using perhaps has some performance issues when passed parameters.
I have set the dynamic paramters option on, and use collation compatible.Linked servers in general are a performance nightmare.
Get me that bucket of data over there...ALL of it.
Careful...carry it over here now. Be careful. Oh crap...I dropped some. You need to start over.
Great...it's finally here....ALL OF IT. Can you throw away everything that doesn't match this one value?
That's great. Thanks.|||Replace a straight DML/SELECT with a call to a stored procedure on the remote side and you'll be home free!|||SQL Attempts to retrieve statistics information from remote tables to determine which server should be the driving server - or where to filter rows first before joins. It runs some system stored procedures (I forget the names at the moment) If the account connecting to the remote server does not have permisisons on the procedures SQL will assume the worset and generate a query plan with the statistics available on the local server. I'm not recommending you grant the remote user dbo rights (not that I would do that ...) but if you did do it temporarily and saw a performance increase you could research exactly which permissions were really needed. Actually you can run profiler on the remote server and you will see the statistics gathering queries and identify the objects involved.|||In testing I found that the query performed faster with the parameters declared 'inline'. Does this make sense? Or am I suffering from inconsistent testing conditions? Our production databases are on the same servers as our test dbs.
The distributed queries are in stored procedures. And they (usually) don't join to the local server. However, the stored procs need to query the local db and store results there. It would be possible to put stored procs on the remote db. But we have already taken the functions into production so code changes are undesired.|||Try using the openquery() method. When this method is used the calling SQL server instance does not attempt to retrieve statistics info and the linked server processes the SQL and simply returns the results.
This especially makes a huge difference when the linked server is Sybase ASE.
Labels:
across,
database,
interested,
linked,
microsoft,
mysql,
ole,
oracle,
parameters,
performance,
server,
servers,
sql,
suspect
Subscribe to:
Posts (Atom)