I'm trying to connect to Active Directory. I'm using this code (running from SQL Analyzer ofcourse)
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource'
I'm also using:
sp_addlinkedsrvlogin ADSI, FALSE, 'yourusername', 'CN=yourusername,CN=Users,DC=yourdomain,DC=com', 'yourpassword'
The last is (with I have a problem):
SELECT * FROM ''LDAP://DC=XXX,DC=XXX''
After this i have an error, that "Invalid object name 'LDAP://DC=XXX,DC=XXX'.
What I'm doing wrong?
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource'
I'm also using:
sp_addlinkedsrvlogin ADSI, FALSE, 'yourusername', 'CN=yourusername,CN=Users,DC=yourdomain,DC=com', 'yourpassword'
The last is (with I have a problem):
SELECT * FROM ''LDAP://DC=XXX,DC=XXX''
After this i have an error, that "Invalid object name 'LDAP://DC=XXX,DC=XXX'.
What I'm doing wrong?