Avatar of Eric3141
Eric3141
Flag for Afghanistan asked on

Can't open linked server to Active Directory

I created a linked server to Active Directory in SQL Server 2008.  I am getting the attached error.  Scripted linked server:

EXEC master.dbo.sp_addlinkedserver @server = N'ADSI', @srvproduct=N'Active Directory Service Interfaces', @provider=N'ADSDSOObject', @datasrc=N'adsdatasource'

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'ADSI',@useself=N'False',@locallogin=NULL,@rmtuser=N'my_username',@rmtpassword='########'

Ideas?
Error.docx
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Eric3141

8/22/2022 - Mon
Eric3141

ASKER
I setup security to run under my userid whichy has network admin privileges.
ASKER CERTIFIED SOLUTION
Eric3141

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Eric3141

ASKER
If I work at MyStuff.com then the query would be:

SELECT * FROM OpenQuery(... FROM ''LDAP://DC=MyStuff,DC=COM''...

There is a "DC" to separate each part of the domain name.

If my domain = SomeAgency.ky.gov then the query would be:

SELECT * FROM OpenQuery(... FROM "LDAP://DC=SomeAgency,DC=KY,DC=gov''...
Your help has saved me hundreds of hours of internet surfing.
fblack61