Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 select records from AD

Author  Topic 

TRACEYSQL
Aged Yak Warrior

594 Posts

Posted - 2007-11-02 : 11:28:30
I have two servers test and production
I run the following in production get 43 records
Run the same command in test get 243 records.

Same Linked server properties
OLEDB Linked server properties for Microsoft Directory Servies
Productname ASDI ADSDATASOURCE

DROP TABLE AD_CAPTURE_HOLD

SELECT *
INTO AD_CAPTURE_HOLD
FROM
OpenQuery(ADSI_CAPTURE, 'SELECT
title, company, department, location, manager, physicalDeliveryOfficeName, FacsimileTelephoneNumber, homephone, mobile, streetAddress, st, c, notes,
distinguishedname, employeeid, sn, middlename, givenname, displayname, samaccountname, mail, cn, telephonenumber
FROM ''LDAP://DC=domain,DC=mydc,DC=com''
WHERE objectCategory = ''Person'' AND objectClass= ''user''
AND sn >= ''B''')


I cannot determine why so less in production
Any one got suggestions where to look

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-02 : 23:33:31
Both sql servers are in same domain?
Go to Top of Page

TRACEYSQL
Aged Yak Warrior

594 Posts

Posted - 2007-11-03 : 08:21:17
I fixed it it was the objectcategory part
still on test returned correct numbers regardless of taking out this but it works now
Go to Top of Page
   

- Advertisement -