Cisco Unity Communication Database Queries

I was assigned a task to find out the mailbox size of an individual user.  Below are the queries that I successfully ran.

Query the mailbox size of a specific user. GSumner is the mailbox username

run cuc dbquery unitydirdb select alias as UserID,bytesize,send,receive, warning from vw_user,unitymbxdb1:vw_mailbox where vw_user.objectid in (select userobjectid from vw_usermailboxmap where vw_usermailboxmap.mailboxid=unitymbxdb1:vw_mailbox.mailboxobjectid and alias='GSumner')

Query the mailbox size of all mailboxes in bytes

run cuc dbquery unitydirdb select alias as UserID,bytesize,send,receive, warning from vw_user,unitymbxdb1:vw_mailbox where vw_user.objectid in (select userobjectid from vw_usermailboxmap where vw_usermailboxmap.mailboxid=unitymbxdb1:vw_mailbox.mailboxobjectid) order by bytesize desc

Query the mailbox size of all mailboxes in Megabytes. 1 megabytes = 1,048,576 bytes

run cuc dbquery unitydirdb select alias as UserID,bytesize/1048576 as MailboxSize,send/1048576 as MailboxSendLimit,receive/1048576 as MailBoxReceiveLimit, warning/1048576 as MailboxWarningLimit from vw_user,unitymbxdb1:vw_mailbox where vw_user.objectid in (select userobjectid from vw_usermailboxmap where vw_usermailboxmap.mailboxid=unitymbxdb1:vw_mailbox.mailboxobjectid) order by bytesize desc

Reference: CUC SQL Queries for Message Counts and Mailbox Size

Comments are closed