<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CUC CLI SQL Command Help in Collaboration Applications</title>
    <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4952879#M49607</link>
    <description>&lt;P&gt;Hi Maren&lt;/P&gt;
&lt;P&gt;Here you are&lt;/P&gt;
&lt;P&gt;run cuc dbquery unitymbxdb1 update tbl_FolderItem set deleted = '1' where seen = '1' and arrivaltime between '2023-11-01 00:00:00' and '2023-11-02 23:00:00' and folderobjectid = (select folderobjectid from tbl_folder where mailboxobjectid= (select mailboxobjectid from vw_mailbox where description='vmuser1') and folderinfoobjectid = (select folderinfoobjectid from tbl_folderinfo where name='Inbox'))&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Carlo&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2023 21:22:45 GMT</pubDate>
    <dc:creator>Carlo Poggiarelli</dc:creator>
    <dc:date>2023-11-02T21:22:45Z</dc:date>
    <item>
      <title>CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4951574#M49598</link>
      <description>&lt;P&gt;The following SQL Command will purge voicemails out of CUC for a single user's ('vmuser1' in the below) voicemail box between specified dates:&lt;/P&gt;
&lt;P&gt;run cuc dbquery unitymbxdb1 update tbl_FolderItem set deleted = 1 where arrivaltime between '2023-01-01 06:00:00' and '2023-07-01 06:00:00' and folderobjectid = (select folderobjectid from tbl_folder where mailboxobjectid= (select mailboxobjectid from vw_mailbox where description='vmuser1') and folderinfoobjectid = (select folderinfoobjectid from tbl_folderinfo where name='Inbox'))&lt;/P&gt;
&lt;P&gt;As I am not a SQL expert, so.... Can anyone help me with editing this command so that it will do the "set deleted = 1" within the arrival time but only if the current status is "Seen"?&lt;/P&gt;
&lt;P&gt;So, essentially, voicemails that have been seen/listened-to that are older than a certain datetime will have their status changed to 'set deleted = 1'?&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;P&gt;Maren&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 16:09:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4951574#M49598</guid>
      <dc:creator>Maren Mahoney</dc:creator>
      <dc:date>2023-10-31T16:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4952879#M49607</link>
      <description>&lt;P&gt;Hi Maren&lt;/P&gt;
&lt;P&gt;Here you are&lt;/P&gt;
&lt;P&gt;run cuc dbquery unitymbxdb1 update tbl_FolderItem set deleted = '1' where seen = '1' and arrivaltime between '2023-11-01 00:00:00' and '2023-11-02 23:00:00' and folderobjectid = (select folderobjectid from tbl_folder where mailboxobjectid= (select mailboxobjectid from vw_mailbox where description='vmuser1') and folderinfoobjectid = (select folderinfoobjectid from tbl_folderinfo where name='Inbox'))&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Carlo&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 21:22:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4952879#M49607</guid>
      <dc:creator>Carlo Poggiarelli</dc:creator>
      <dc:date>2023-11-02T21:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4953286#M49609</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/323781"&gt;@Carlo Poggiarelli&lt;/a&gt;&amp;nbsp; - Thank you SO MUCH! I can't wait to try it out. -- Maren&lt;/P&gt;
&lt;P&gt;(And I'll come back and mark it "Solution" providing it works - which I have no doubt it will!)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:50:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4953286#M49609</guid>
      <dc:creator>Maren Mahoney</dc:creator>
      <dc:date>2023-11-03T15:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4953304#M49610</link>
      <description>&lt;P&gt;Hi Maren,&lt;/P&gt;
&lt;P&gt;You are most welcome!&lt;/P&gt;
&lt;P&gt;To convince you more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; , here below you can find&amp;nbsp; a sequence that I've done on my lab.&lt;/P&gt;
&lt;P&gt;Here you can&amp;nbsp; see that there is a seen message in today's time range&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeenMessage.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/201585i4AB828CCA7D6B037/image-size/large?v=v2&amp;amp;px=999" role="button" title="SeenMessage.png" alt="SeenMessage.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here I marked as deleted the seen message.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mark Deleted.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/201586iDD6D400968072256/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mark Deleted.png" alt="Mark Deleted.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...and last, the result.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Query after deletion.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/201587i5A71EA25A1B7434E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Query after deletion.png" alt="Query after deletion.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this is what you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Carlo&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 16:31:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4953304#M49610</guid>
      <dc:creator>Carlo Poggiarelli</dc:creator>
      <dc:date>2023-11-03T16:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4954965#M49621</link>
      <description>&lt;P&gt;That does work exactly as described, thank you so much&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/323781"&gt;@Carlo Poggiarelli&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While I am on the subject, do you happen to know a SQL command that will purge deleted items out of the database? Essentially, rather than waiting for the Message Aging Policy to purge deleted items after 1 day (which is what is currently set in our system), to have the system purge deleted items when I run the command?&lt;/P&gt;
&lt;P&gt;Maren&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 14:11:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4954965#M49621</guid>
      <dc:creator>Maren Mahoney</dc:creator>
      <dc:date>2023-11-07T14:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4954989#M49622</link>
      <description>&lt;P&gt;Hi Maren&lt;/P&gt;
&lt;P&gt;Thanks for your feedback&lt;/P&gt;
&lt;P&gt;You can try to run the "run cuc sysagent task Umss.MessageAgingTask" command&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Carlo&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 15:13:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4954989#M49622</guid>
      <dc:creator>Carlo Poggiarelli</dc:creator>
      <dc:date>2023-11-07T15:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955002#M49623</link>
      <description>&lt;P&gt;That one will immediately run the regular Message Aging Task, but does not "Clean Deleted Items" which is what I'm looking for. I've looked for such a command for some time, but come up empty. Thanks for getting back to me so fast.&lt;/P&gt;
&lt;P&gt;Maren&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 15:26:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955002#M49623</guid>
      <dc:creator>Maren Mahoney</dc:creator>
      <dc:date>2023-11-07T15:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955186#M49625</link>
      <description>&lt;P&gt;Ok let's apply this trick.&lt;/P&gt;
&lt;P&gt;Make the seen message a little old &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;run cuc dbquery unitymbxdb1 update tbl_FolderItem set deleted = '1' ,arrivaltime ='2019-11-01 00:00:00',modificationtime='2019-11-01 00:00:00' where seen='1' and arrivaltime between '2019-11-01 00:00:00' and '2023-11-07 23:00:00' and folderobjectid = (select folderobjectid from tbl_folder where mailboxobjectid= (select mailboxobjectid from vw_mailbox where description='VMUSER1') and folderinfoobjectid = (select folderinfoobjectid from tbl_folderinfo where name='Inbox'))&lt;/P&gt;
&lt;P&gt;than run run cuc sysagent task Umss.MessageAgingTask&lt;/P&gt;
&lt;P&gt;That will do the trick &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Carlo&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 21:13:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955186#M49625</guid>
      <dc:creator>Carlo Poggiarelli</dc:creator>
      <dc:date>2023-11-07T21:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955190#M49626</link>
      <description>&lt;P&gt;ooooOOHHHHHOoooo! Making the modification date 'old'. That's sneaky and I like it. I doubt my customer would allow it, but I think I will give it a go in our development platform.&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;Maren&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 21:24:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955190#M49626</guid>
      <dc:creator>Maren Mahoney</dc:creator>
      <dc:date>2023-11-07T21:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: CUC CLI SQL Command Help</title>
      <link>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955191#M49627</link>
      <description>&lt;P&gt;ahahah&lt;/P&gt;
&lt;P&gt;I doubt your customer will complain with that cause you are going to delete his dated messages and that’s what he’s asking for&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Carlo&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 21:37:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/collaboration-applications/cuc-cli-sql-command-help/m-p/4955191#M49627</guid>
      <dc:creator>Carlo Poggiarelli</dc:creator>
      <dc:date>2023-11-07T21:37:07Z</dc:date>
    </item>
  </channel>
</rss>

