Hello,
I have one assignment like follows.
I have Active Direcory Services installed in one of the Primary Domain Controller ABC, and SQL Server 2000 in an another System XYZ.
Write an insert trigger which gets users from Active Directory and mail them about a new record has been added.
I tried with adding Linked server,
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
'ADSDSOObject', 'adsdatasource'
GO
CREATE VIEW viewADContacts
AS
SELECT [Name], SN [Last Name]
FROM OPENQUERY( ADSI,
'SELECT Name, SN
FROM ''LDAP://ADSISrv:389/ OU=Bangalore,DC=www,DC=company,DC=com''
WHERE objectCategory = ''Person'' AND
objectClass = ''user''')
GO
SELECT * FROM viewADContacts
I would appreciate your suggetions at the earliest.
Regards, BN