2009-10-16 191 views

回答

0

如果从SQL Server 2005调用,则需要创建一个.NET存储过程。

使用.NET连接到LDAP:

http://msdn.microsoft.com/en-us/library/system.directoryservices.aspx

using System.DirectoryServices; 

DirectoryEntry DE = new DirectoryEntry(LDAPPath, LDAP_Domain + account, password, AuthenticationTypes.Secure); 

if (DE == null) 
{ 
    // Login failure 
} 
+0

嗨达里尔, 不幸的是,System.Directory一套组件/服务不提供给通过CLR服务的SQL。 – 2009-10-16 21:08:01

+0

您可以访问程序集,但它认为是“不支持的库”。我已经包含了一些关于这个的网址。 http://dbaspot.com/forums/ms-sqlserver/218655-system-directoryservices-allowable-clr.html http://msdn.microsoft.com/en-us/library/ms403279.aspx – 2009-10-18 20:00:06