cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in updating an Enterprise Vault Table through SQL

SheldonDsouza
Level 4
Certified

Hello,

I have recently taken over this environment. There have been a few practices being followed which I may not be very comfortable carrying forward.

There is a regular activity of disabling mailboxes from Archiving. Because there is no systematic way of provisioning users and enabling their mailboxes for archiving, disabling them becomes a little difficult.

As a clean up process (in terms of practices and processes) concerning the interactions with Enterprise Vault, I was looking to disable all mailboxes which according to the ExchangeMailboxEntry table have their ADMbxFlags  value set to "2" (meaning disabled users).

Please share your advice on the SQL Query I have come up with...

Update dbo.ExchangeMailboxEntry

Set MbxArchivingState = '2'

Where MbxArchivingState = '1' and ADMbxFlags = '2' and MbxExchangeState = '1'

Regards,
Sheldon Dsouza
1 ACCEPTED SOLUTION

Accepted Solutions

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

i'd say as long as you dont have the registry key in place on your EV servers to archive disabled and/or hidden mailboxes then it doesnt really matter if they are "disabled" in EV when the exchange mailbox is disabled. that's why i was asking about the purpose or intent of the process.

View solution in original post

7 REPLIES 7

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

your sql query looks ok but what's the point of this process if the mailboxes themselves are disabled already?

SheldonDsouza
Level 4
Certified

The Mailboxes are disabled from Active Directory and not necessarily from EV. And hence, I was looking at a way to do it from SQL as the Provisioning Group created in this environment is individual user based.

Regards,
Sheldon Dsouza

WiTSend
Level 6
Partner

The SQL query is correct.  My question would more to the point be, why are you disabling archiving?  What is the desired result of this activity?  Generally speaking I'm not a big fan of mucking around in SQL for routine administrative management due to unintended consequences.  

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

i'd say as long as you dont have the registry key in place on your EV servers to archive disabled and/or hidden mailboxes then it doesnt really matter if they are "disabled" in EV when the exchange mailbox is disabled. that's why i was asking about the purpose or intent of the process.

SheldonDsouza
Level 4
Certified

Hi,

I am looking to disable the Mailboxes (in EV) for Archiving as the users are no longer in the Environment. The users have been disabled in AD (based on the value for ADMbxFlags).

It is more of a clean up activity and hence taking the route via SQL

I am also not a fan of playing too much with SQL, but since this is the only quickest way out taking it. 

Regards,
Sheldon Dsouza

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

I've heard (never done it myself, but can see value) of people who remove all rows from the ExchangeMailboxEntry table, then rerun provisioning. That should give you then only the active and recently disabled mailboxes.

I am not sure about any sideeffects, if any, but that might be worth a check.

Regards. Gertjan

WiTSend
Level 6
Partner

The SQL query will work, but I quesiton the value of it.  As mentioned above, if you don't add the registry key to archive disabled accounts or hidden mailboxes they won't get archived.  From an administrative perspective there's not any additional value to changing them to "disabled for archiving" either.  I've not see this done in any of the environments I've worked with in the past, nor do we do it on my environment here.