[cisco-voip] Execute sql query via vmrest on CUC (or alternatative approach)?

Nick Barnett nicksbarnett at gmail.com
Wed Mar 8 15:49:05 EST 2017


I found this SQL query
<https://www.cisco.com/c/en/us/support/docs/unified-communications/unity-connection/118299-technote-cuc-00.html#anc8>
to return a count of all message boxes in CUC. I modified it to return the
top 10 by adding "FIRST 10" immediately after "select" on the first line:

run cuc dbquery unitymbxdb1 select FIRST *10* alias as UserID, count (*) as
messages \

from vw_message, unitydirdb:vw_mailbox, unitydirdb:vw_user \

where mailboxobjectid in \

(select mailboxid from vw_mailbox where unitydirdb: vw_user.objectid =
unitydirdb:vw_mailbox.userobjectid) \

group by alias order by \

messages desc


This works, but it's not very "dev ops friendly." I think I'd have to use
an expect script and code in my CLI password... which I really don't want
to do.


I looked through the VMREST kit for CUC 10.5 and I don't see anything like
this. I can usually find my way around the AXL kit in CUCM but I frequently
have issues finding what I need in the CUC VMREST calls.


Is there a way to execute this specific query via VMREST to CUC? Is there a
VMREST call already baked into CUC that will return similar information?


Thanks,

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20170308/8b78ce6a/attachment.html>


More information about the cisco-voip mailing list