I am interested in trying T-SQL to query AD and dump data to some tables for historical use.
I do have some queries running and working but I need to change them and am having troubles.
1) I want to use a query as a stored procedure. For example, i want a user lookup. So, you would create and then call a custom SP like "sp_Lookup_User 'username'". To do that I am obviously passing a variable. I have created it 1000x and it either errors when creating the procedure or does create it but returns no results when i run it. Why is that and how can I write an LDAP lookup as a stored procedure and pass it a variable.
2) I noticed that there is some sorta limit of 1000 returned rows with a T-SQL query of LDAP. Any idea how to change it?
I am using SQL 2000 Enterprise Manager/Query Analyzer.
Thanks!
I do have some queries running and working but I need to change them and am having troubles.
1) I want to use a query as a stored procedure. For example, i want a user lookup. So, you would create and then call a custom SP like "sp_Lookup_User 'username'". To do that I am obviously passing a variable. I have created it 1000x and it either errors when creating the procedure or does create it but returns no results when i run it. Why is that and how can I write an LDAP lookup as a stored procedure and pass it a variable.
2) I noticed that there is some sorta limit of 1000 returned rows with a T-SQL query of LDAP. Any idea how to change it?
I am using SQL 2000 Enterprise Manager/Query Analyzer.
Thanks!