Another option is that you could set up a SQL Server "Linked Server" to LDAP. There's some (admittedly old) documentation available [here][1], and [this is the documentation for something in SQL 2008][2]. That'd remove the pain of having to call external scripts and parse the output... Just a thought.
[1]: http://msdn.microsoft.com/en-us/library/aa772380(v=vs.85).aspx
[2]: http://msdn.microsoft.com/en-us/library/ms190803.aspx
↧