Forum Discussion

bkruizenga's avatar
bkruizenga
Level 4
13 years ago

Renewed question - SQL query to delete EV archive or change ArchivingState (MbxArchivingState = 1 to 4)?

Hi,

Before I'm going to wreck anything i'd like to get some clarification on the following (closed) forum dicussion:

https://www-secure.symantec.com/connect/forums/sql-query-delete-ev-archive-or-change-archivingstate-mbxarchivingstate-1-mbxarchivingstate-4

There is mentioning of different field "names" in the solution (thanks Jesuswept) and the replies:

- ArchivingState --> Assume this is same as "MBXArchivingState"

- MbxArchivingState (change from 1 to 4)

- Archivestatus (in one of the replies)

I created an SQL query that only displays the fields and their relationships, but there is BOTH an MBXArchivingState AND ArchiveStatus.

 

Can you tell me which of the fields will be changed from 1 to 4 in this statement or is it both?

Thanks

BR
Bert Kruizenga


 

  • Yup you only need to concentre on ArchiveStatus in the archive table to delete an archive.
    So to delete an archive it would literally be just the following query
     

    UPDATE Archive
    SET ArchiveStatus = 4
    WHERE ArchiveName = 'my Archive'

  •  

    You need to change the state for MbxArchiving State 
    Below is the detail about the State.
    MbxExchangeState
    0-->Normal
    1-->Deleted
    2-->Hidden
     
    MbxArchivingState:
    0 --> New/ ready to be enabled
    1 -->Enabled
    2 -->Disabled
    3 -->Relinked.
  • Yup you only need to concentre on ArchiveStatus in the archive table to delete an archive.
    So to delete an archive it would literally be just the following query
     

    UPDATE Archive
    SET ArchiveStatus = 4
    WHERE ArchiveName = 'my Archive'

  • It would be interesting to know if Symantec 'fully support' this way of doing things - I know historically changing things via SQL was discouraged.

  • They absolutely do not support it, to be fair i did say that in the original statement too

  • Yep. Cool.  Would also be interesting to know if/when Symantec will give a programatic way to do the deletion.

  • There be tales of an app...shrouded in mystery and secrecy. But don't hold your breath Rob. unless you want to join the blue man group ;)

    For those brave enough to do the mass deletion by SQL, an important thing to note is that each storageservice will only delete one archive at a time, so if you attempt to delete lots of archives in a bundle and they all reside in the same database, then you have a serial delete operation. 

    Also a delete of an archive is a pretty 'expensive' operation (basically each item is removed one at a time)

    Just in case you are wondering why it takes so long for all those deletes to go through.

    Regards,

    Jeff