Overview
One of the things which Archive Shuttle must do for a migration is to determine the owner of a mailbox archive. This article explains how this takes place.
Details
1. We use the bellow query to match user to EAS archive by comparing ObjDistNam result to exchangeLegacyDN column.

SELECT t5.ROW_NUMBER, t5.USERID AS UserId, t5.USERNAME AS UserName, t5.OBJDISTNAME AS ObjDistName,
t5.ItemsCount AS ItemsCount, t5.ItemsSize
FROM(
SELECT ROW_NUMBER() OVER(ORDER BY t4.USERID) AS ROW_NUMBER, t4.USERID, t4.USERNAME, t4.OBJDISTNAME, t4.ItemsCount, t4.ItemsSize
FROM(SELECT COUNT(t3.MSGID) AS ItemsCount, SUM(t3.MSGSIZE) as ItemsSize, t0.USERID, t0.USERNAME, t0.OBJDISTNAME
FROM USERS AS t0
INNER JOIN REFER AS t1 ON(t0.USERID) = t1.USERID
INNER JOIN FOLDER AS t2 ON t1.FOLDERID = t2.FOLDERID
INNER JOIN PROFILE AS t3 ON t1.MSGID = t3.MSGID
WHERE(t1.MSGID >= 0) AND(t1.FOLDERID >= 0)
GROUP BY t0.USERID, t0.USERNAME, t0.OBJDISTNAME ) AS t4) AS t5
ORDER BY t5.ROW_NUMBER

2. If the user record is not found. The matching is executed by comparing address column in UserProxyAdress table againsts ObjDistName.

Print Friendly, PDF & Email