Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7610487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:25:47+00:00 2026-05-31T01:25:47+00:00

I linked my SQL Server 2008 to Active Directory like this: EXEC sp_addlinkedserver ‘ADSI’,

  • 0

I linked my SQL Server 2008 to Active Directory like this:

EXEC sp_addlinkedserver 
        'ADSI', 
        'Active Directory Services 2.5', 
        'ADSDSOObject', 
        'adsdatasource'

Then I can query my phone number like this:

SELECT *
FROM OPENQUERY( 
    ADSI, 
    'SELECT DisplayName, TelephoneNumber from ''LDAP://ad1/DC=directagents,DC=local'' WHERE DisplayName=''Aaron Anodide''')
where not DisplayName is null
order by DisplayName

But I have not been able to change my phone number, as this causes an error:

SELECT * FROM
OPENQUERY( 
    ADSI, 
    'UPDATE TelephoneNumber from ''LDAP://ad1/DC=directagents,DC=local'' SET TelephoneNumber=''136'' WHERE DisplayName=''Aaron Anodide''')

Error:

Msg 7321, Level 16, State 2, Line 2
An error occurred while preparing the query…

Is this possible or is the idea that this is used for read-only access?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:25:48+00:00Added an answer on May 31, 2026 at 1:25 am

    As far as I know, the SQL Server-to-Active Directory interface is read-only – you can select from AD, but you cannot update it.

    See Richard Mueller’s ADO Search Tips on the topic – he states:

    Active Directory searches using ADO are very efficient. The provider retrieves records matching your query criteria in one operation,
    without the need to bind to many objects. However, the resulting
    recordset is read-only
    , so ADO cannot be used to modify Active
    Directory
    objects directly. If you need to modify attribute values,
    you will have to bind to the object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've installed two SQL Server 2008 in two sites linked by internet connection and
Using SQL Server 2008, I am trying to do something similar to this post
I am using SQL Server 2008 (let us call this source database server in
I have an issue similar to this one: SQL Server 2008: ODBC connection problems
We are using SQL Server 2008 R2 Standard and linked servers to get information
I am using SQL Server 2008 Enterprise. And I am using Linked Server technologies
This page from SQL Server 2008 BOL , talks about CLR Stored Procedures and
How can I find the address of defined linked server in SQL Server 2008?
I have a MySQL server as a linked server in Microsoft SQL Server 2008.
I have tried to make use of linked servers in SQL Server 2008 by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.