11-05-2018 07:16 AM
Hello Experts,
I need help with my problem that I am having at my organization. I'm supposed to delete all the archives of the users(users who has already left the Org.) whose mailboxes were disabled/deleted before Jan 2012. Can someone please provide me with a SQL query to find the same?
Thank you in advance.
Best Regards
Solved! Go to Solution.
11-05-2018 10:59 PM
I don't think this is something you can find in SQL unfortunately. Probably best to check with the HR department to get a list, and then match that with the archives in EV
11-05-2018 10:59 PM
I don't think this is something you can find in SQL unfortunately. Probably best to check with the HR department to get a list, and then match that with the archives in EV
11-06-2018 03:27 AM
Hello,
the below query will list some basic information about the archives. It is safe to assume if the Newest Archived Item is < 1/1/2013 those archives are for users who left. But, I would also check/verify with HR department.
--
-- Query shows Archive Information of one user, when archivename is filled in
-- Change My User to archivename needed
-- For all archives in VS, comment And A.ArchiveName - 'My User' etc
--
-- Change MyVaultStore to your VaultStore database name
SELECT A.ArchiveName "Archive Name",
AP.CreatedDate "Archive Created",
AP.ModifiedDate "Archived Last Modified",
MIN(S.IdDateTime) "Oldest Sent/Received Item",
MAX(S.IdDateTime) "Newest Sent/Received Item",
MIN(S.ArchivedDate) "Oldest Archived Item",
MAX(S.ArchivedDate) "Newest Archived Item"
FROM EnterpriseVaultDirectory.dbo.Archive A,
EnterpriseVaultDirectory.dbo.Root R,
MyVaultStore.dbo.ArchivePoint AP,
MyVaultStore.dbo.Saveset S
WHERE A.RootIdentity = R.RootIdentity
AND R.VaultEntryId = AP.ArchivePointId
AND AP.ArchivePointIdentity = S.ArchivePointIdentity
AND A.ArchiveName = 'My User'
GROUP BY A.ArchiveName, AP.CreatedDate, AP.ModifiedDate
order by AP.CreatedDate
11-07-2018 07:05 PM
Thank you both for your kind replies. You are right, I need to get this info. from the HR.
Thanks again! :)