Use SQL Server to access information in the AD

xiaoxiao2021-03-05  21

We can use the ADSI (AD service interface) to operate multiple directory services.

Here I just briefly introduced, how to access the information in AD through SQL's LinkServer

1. Use the sp_addlinkedsever system stored procedure to establish a link server ADSI to the AD. Exec sp_addlinkedServer 'adsi', 'Active Directory Services 2.5', 'AdsdsoObject', 'AdsDataSource'

2. Set the username password to access the AD in this link server

3. Here we can access information in the AD through different SQL statements.

转载请注明原文地址:https://www.9cbs.com/read-37872.html

New Post(0)