SQL Script - How To Check DB for BIS Users
-- Change the '%@BES_Domain.com%'to the current working BES domain to omit thoes from the results
SELECT count(dbo.UserConfig.Id), dbo.UserConfig.DisplayName
FROM dbo.UserConfig INNER JOIN
dbo.SyncDeviceMgmt ON dbo.UserConfig.Id = dbo.SyncDeviceMgmt.UserConfigId
WHERE dbo.SyncDeviceMgmt.data like '%@%' and syncdevicemgmt.id not in
(select id from syncdevicemgmt where dbo.SyncDeviceMgmt.Data LIKE '%@BES_Domain.com%')
Group by dbo.UserConfig.DisplayName
|