Forum Discussion

CadenL's avatar
Level 6
6 years ago

EV deleting old user archives

We have an EV environment that is no longer actively archiving new items and is just used to allow users to recall previously archived items from their mailboxes. The environment is EV11.0.1 and as i...
  • GertjanA's avatar
    6 years ago


    First, deleting archives will give you a high(er) load on SQL/Indexlocations/datalocations. Deleting 100's of archives at the same time might kill your SQL/EV server.

    Using EVPM is not an option. You will have to delete archives. Officialy, you can only do so using the console. But (as always :-) ).....

    You can edit an SQL field to inform EV it can delete an archive. Doing this using a SID is difficult, the best thing to use is the ArchiveName. What I would do is the following:

    1 - Get a list of the archivenames. Use SQL or the Usage report. Create a list of archivenames that need to be changed (i.e. removed)

    2 - change the archivenames of the above by running below. This will change the archivename from "Alink, G. (Gertjan)" to "ZZ Remove - Alink, G. (Gertjan)"

    USE EnterpriseVaultDirectory
    Update Archive
    Set ArchiveName = 'ZZ Remove - ' + ArchiveName
    (ArchiveName = 'archivename 1'
    or ArchiveName = 'archivename 2'
    or ArchiveName = 'archivename 3')

    3 - Get a new list with archivenames, but now only for the ones starting with ZZ Remove (the where clause would be "where Archive name like 'ZZ Remove%'

    Use that list to edit SQL so EV knows to delete archive:

    USE EnterpriseVaultDirectory
     UPDATE Archive
     SET ArchiveStatus = 4
    (ArchiveName = 'ZZ Remove - archivename 1'
    or ArchiveName = 'ZZ Remove - archivename 2'
    or ArchiveName = 'ZZ Remove - archivename 3')

    When done, refresh the console, you should see now archives "marked for deletion".

    If you accidentally marked an archive to be deleted, run the same query, it now use SET ArchiveStatus = 1 where archivename = 'archivename'

    When you are satisifed with selection, restart the storage service, monitor SQL/Index/Data locations.

    Also see, where NO2 also discusses the process, and how to monitor progress.

    No1 and No2

    As always, test first, make sure you have good, recent SQL backups.