cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query to find when user mailbox is enabled in EV?

Rajesh_Velaga1
Level 4

SQL query to find when user mailbox is enabled in EV?

1 ACCEPTED SOLUTION

Accepted Solutions

JesusWept3
Level 6
Partner Accredited Certified

This will show when the Archive was created, when you first enable a mailbox, if the archive doesn't exist, it will create one, so this date usually coincides of when a mailbox was archived


However if you disable/re-enable a user it will not show the date of when they were re-enabled, also you may have a user that has been enabled for archiving, and then move them to a different server via a PST Export and then import, and that won't keep the original created date of that archive, so you would see a newer date of when the new archive was created



SELECT A.ArchiveName, AP.CreatedDate
FROM   EnterpriseVaultDirectory.dbo.Archive A,
       EnterpriseVaultDirectory.dbo.Root R, 
       yourVaultStore.dbo.ArchivePoint AP
WHERE  A.RootIdentity = R.RootIdentity
  AND  R.VaultEntryId = AP.ArchivePointId
ORDER BY A.ArchiveName
https://www.linkedin.com/in/alex-allen-turl-07370146

View solution in original post

12 REPLIES 12

JesusWept3
Level 6
Partner Accredited Certified

This will show when the Archive was created, when you first enable a mailbox, if the archive doesn't exist, it will create one, so this date usually coincides of when a mailbox was archived


However if you disable/re-enable a user it will not show the date of when they were re-enabled, also you may have a user that has been enabled for archiving, and then move them to a different server via a PST Export and then import, and that won't keep the original created date of that archive, so you would see a newer date of when the new archive was created



SELECT A.ArchiveName, AP.CreatedDate
FROM   EnterpriseVaultDirectory.dbo.Archive A,
       EnterpriseVaultDirectory.dbo.Root R, 
       yourVaultStore.dbo.ArchivePoint AP
WHERE  A.RootIdentity = R.RootIdentity
  AND  R.VaultEntryId = AP.ArchivePointId
ORDER BY A.ArchiveName
https://www.linkedin.com/in/alex-allen-turl-07370146

JesusWept3
Level 6
Partner Accredited Certified

oh and a side note a simple please and thankyou never hurts :)

https://www.linkedin.com/in/alex-allen-turl-07370146

Rajesh_Velaga1
Level 4

THanks!!!

JesusWept3
Level 6
Partner Accredited Certified

:)

https://www.linkedin.com/in/alex-allen-turl-07370146

Rajesh_Velaga1
Level 4

Error:

 

/*------------------------

SELECT A.ArchiveName, AP.CreatedDate

FROM EnterpriseVaultDirectory.dbo.Archive A,

EnterpriseVaultDirectory.dbo.Root R,

yourVaultStore.dbo.ArchivePoint AP

WHERE A.RootIdentity = R.RootIdentity

AND R.VaultEntryId = AP.ArchivePointId

ORDER BY A.ArchiveName

------------------------*/

Msg 208, Level 16, State 1, Line 1

Invalid object name 'yourVaultStore.dbo.ArchivePoint'.

JesusWept3
Level 6
Partner Accredited Certified

You will have to rename "YourVaultStore" to the database name of your vault store
Oh and thats another thing, you will have to run it against each of your Vault Store databases

https://www.linkedin.com/in/alex-allen-turl-07370146

Rajesh_Velaga1
Level 4

Thanks!

Rajesh_Velaga1
Level 4

Is it possible to find Archive name, created date & suspended state?

JesusWept3
Level 6
Partner Accredited Certified

suspended date is actually held in the hidden message not in the database

i know it was requested at one point to be held in the database but i don't know what came of that

https://www.linkedin.com/in/alex-allen-turl-07370146

Rajesh_Velaga1
Level 4

Not suspended date, whether archive is in suspended state or not.

JesusWept3
Level 6
Partner Accredited Certified

suspended date or suspended state, neither are held in the database

https://www.linkedin.com/in/alex-allen-turl-07370146

Rajesh_Velaga1
Level 4

Thanks! I really appreciate your help.