August 13, 2010 at 5:26 am
When excuting this query below
SELECT *
FROM OPENQUERY( ADSI,
'SELECT Name, SN, ST
FROM ''LDAP://xxxx.local,DC=AAAAA4,''
WHERE objectCategory = ''Person'' AND
objectClass = ''user''')
I receive the error message:
Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "SELECT Name, SN, ST
FROM 'LDAP://xxxx.local,DC=AAAAA4,'
WHERE objectCategory = 'Person' AND
objectClass = 'user'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".
I've tried setting "Be made with this security context" But that didn't help and the login is a Domain account on the LDAP/AD server. What is that I'm missing or doing wrong?
August 17, 2010 at 1:53 pm
kd11 (8/13/2010)
When excuting this query belowSELECT *
FROM OPENQUERY( ADSI,
'SELECT Name, SN, ST
FROM ''LDAP://xxxx.local,DC=AAAAA4,''
WHERE objectCategory = ''Person'' AND
objectClass = ''user''')
I receive the error message:
Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "SELECT Name, SN, ST
FROM 'LDAP://xxxx.local,DC=AAAAA4,'
WHERE objectCategory = 'Person' AND
objectClass = 'user'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".
I've tried setting "Be made with this security context" But that didn't help and the login is a Domain account on the LDAP/AD server. What is that I'm missing or doing wrong?
Follow this syntax to recreate it:
EXEC master.dbo.sp_addlinkedserver
@server = N'ADSI',
@srvproduct=N'Active Directory Services Interfaces',
@provider=N'ADSDSOObject',
@datasrc=N'ServerName'
EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname=N'ADSI',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'domain\LoginName',
@rmtpassword='########'
Replace above with your parameters and retry your query.
Also retry with single quotes.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply