Delete all contacts & contact groups from a Lync-2010 User
To delete all contacts & contacts groups from particular lync user, first we have to find out the internal ID of the lync user.
Through “rtc” SQL server database of lync, we can easily find it from “Resource” table.
Eg: Lync user Sign-In Address : [email protected]
Open a new query window from the SQL server management studio and execute the following query
select ResourceId from Resource where UserAtHost=’[email protected]’
You can see the internal ID of the user as query result. Eg:’395’
To delete all the contacts of the user with id 395, execute the below query:
delete FROM [rtc].[dbo].Contact where OwnerId=395
To delete all the contact group association of the user with id 395, execute the below query:
delete FROM [rtc].[dbo].[ContactGroupAssoc] where OwnerId=395
To delete all the contact groups of the user with id 395, execute the below query:
delete FROM [rtc].[dbo].ContactGroup where OwnerId=395
Related Posts
1 Comment
Comments are closed.
Donate
If you find this blog is helpful for you, you can consider to offer a coffee by pressing the donate button.
Hi,
we have 1600 users. How to run these queries to delete contacts for all users?