<?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: Query Cisco Unity Databases from Linux. in Call Control</title>
    <link>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4143337#M2981</link>
    <description>&lt;P&gt;Took a while to tested I Struggled a lot to make it work in Widows, at the end I could because version of python and win64 drivers and Ifxpy.&lt;/P&gt;&lt;P&gt;If you are interesting in what exactly I am struggling on, please take a look at.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/OpenInformix/IfxPy/issues/50" target="_self"&gt;https://github.com/OpenInformix/IfxPy/issues/50&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I exactly followed your instructions in Linux and I got ti working,&lt;/P&gt;&lt;P&gt;I got this error:&lt;/P&gt;&lt;PRE&gt;juan@ubuntu:~/py_works$ python3 cuc_sql.py 
Traceback (most recent call last):
  File "cuc_sql.py", line 4, in &amp;lt;module&amp;gt;
    conn = IfxPy.connect(connStr, "", "")
Exception: [Informix][Informix ODBC Driver][Informix]Network connection is broken. SQLCODE=-25582&lt;/PRE&gt;&lt;P&gt;That was because the user needed to have the "Remote Administrator" Role assigned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another disadvantage, the password is sent in clear text.&lt;/P&gt;&lt;P&gt;This is the partial output of a wireshark capture.&lt;/P&gt;&lt;PRE&gt;sqlexec administrator -pciscopsdt 4.50.FC2 serial -dunitydyndb -fIEEEI DBPATH=//ciscounity DBMONEY=$. CLIENT_LOCALE=en_US.57372 NODEFDAC=no CLNT_PAM_CAPABLE=1 DB_LOCALE=en_US.57372 :.....=...d.e...=..IEEEI..lsrvinfx......+Informix Dynamic Server Version 9.56.UC9W1..#Software Serial Number AAA#...ciscounity_pub....&amp;lt;..............on.........=soctcp.......f...............k......Nt......hq-cuc...../..n.......t./.........%/usr/local/cm/db/informix/bin/oninit....~......}.b....~.	.............Q.......x..DBTEMP../tmp..SHELL..	/bin/bash...SUBQCACHESZ...10..PATH.x/home/juan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin..NODEFDAC..no..OPTOFC..0..........#...c.............c............... select count(*) from tbl_notifyq...1.............	....................(count(*))...................7..................sql_cur2...........	...............	...........................7...............
...............8.8&lt;/PRE&gt;&lt;P&gt;Do you know how this can be encrypted? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 29 Aug 2020 01:39:06 GMT</pubDate>
    <dc:creator>Juan Gerardo Hernandez</dc:creator>
    <dc:date>2020-08-29T01:39:06Z</dc:date>
    <item>
      <title>Query Cisco Unity Databases from Linux.</title>
      <link>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4014930#M2854</link>
      <description>&lt;P&gt;Good morning Developer friends!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a newbie for DevNet, I respect your work very much and I hope I can be a qualified Cisco Developer.&lt;/P&gt;&lt;P&gt;Right now I am working into Collaboration Stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me with something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I am using Cisco Unity Connection Tools to query a database in unity connection.&lt;/P&gt;&lt;P&gt;in the query builder (GUI) I am putting this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;select count(*) from tbl_notifyq&lt;/PRE&gt;&lt;P&gt;to get the count,&lt;/P&gt;&lt;P&gt;but I would like to do this automatically in several clusters using a Linux computer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which would be the best way to accomplish the task,?&lt;/P&gt;&lt;P&gt;Note: you don;t have to be very specific, I know "Google is your best fried", but I hope you can give me some over-simplified instructions like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get this,&lt;/P&gt;&lt;P&gt;download this&lt;/P&gt;&lt;P&gt;use this&lt;/P&gt;&lt;P&gt;be happy!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;P&gt;Thank you very much for your time, and have a nice day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 22:24:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4014930#M2854</guid>
      <dc:creator>Juan Gerardo Hernandez</dc:creator>
      <dc:date>2020-01-20T22:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Query Cisco Unity Databases from Linux.</title>
      <link>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4015666#M2855</link>
      <description>&lt;P&gt;I got the below working on Ubuntu 19.10 using the Python IfxPy library:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;import IfxPy

connStr = 'CLIENT_LOCALE=en_US.57372;DB_LOCALE=en_US.57372;SERVER=ciscounity;DATABASE=unitydyndb;uid=Administrator;pwd=password'
conn = IfxPy.connect(connStr, '', '')

sql = 'select count(*) from tbl_notifyq'
stmt = IfxPy.exec_immediate(conn, sql)
dictionary = IfxPy.fetch_assoc(stmt)

print('tbl_notifyq: ',  dictionary[''])
 
IfxPy.free_result(stmt)
IfxPy.free_stmt(stmt)

IfxPy.close(conn)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Download Informix SDK: &lt;A href="https://www.ibm.com/products/informix/developer-tools?mhsrc=ibmsearch_a&amp;amp;mhq=informix" target="_blank" rel="noopener"&gt;https://www.ibm.com/products/informix/developer-tools?mhsrc=ibmsearch_a&amp;amp;mhq=informix&lt;/A&gt;&lt;BR /&gt;- Install SDK:&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;- On Ubuntu 19.10 I had to install libncurses5: sudo apt install libncurses5&lt;BR /&gt;- I selected the ODBC Driver, Common Database Utilities and Global Language Support (GLS) only&lt;BR /&gt;- I installed to /home/dstaudt/opt/IBM/Informix_Client-SDK (hereafter $INFORMIXDIR)&lt;BR /&gt;- Create sqlhosts file in $INFORMIXDIR/etc (important to use 'ciscounity' as the dbservername:)&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;#dbservername nettype hostname servicename options&lt;BR /&gt;ciscounity onsoctcp ds-cuc115.cisco.com 20532&lt;/P&gt;
&lt;P&gt;- Install IfxPy: pip3 install ifxpy&lt;BR /&gt;- Project homepage: &lt;A href="https://github.com/OpenInformix/IfxPy" target="_blank" rel="noopener"&gt;https://github.com/OpenInformix/IfxPy&lt;/A&gt;&lt;BR /&gt;- Setup your environment so that the following variables are active when the Python script runs (in VS Code I used launch.json):&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;LD_LIBRARY_PATH: /home/dstaudt/opt/IBM/Informix_Client-SDK/lib:/home/dstaudt/opt/IBM/Informix_Client-SDK/lib/esql:/home/dstaudt/opt/IBM/Informix_Client-SDK/lib/cli&lt;BR /&gt;INFORMIXDIR: /home/dstaudt/opt/IBM/Informix_Client-SDK&lt;/P&gt;
&lt;P&gt;- I was stuck for a long time trying to get client/DB locales correct (weird locale used: en_US.57372 apparently: utf-8). Eventually I used the dbaccess tool (part of the SDK installed above), which might come in handy for CLI access to the database: &lt;A href="https://www.ibm.com/support/pages/how-run-informix-sql-commands-your-rational-synergy-database-unix-or-linux-environment" target="_blank" rel="noopener"&gt;https://www.ibm.com/support/pages/how-run-informix-sql-commands-your-rational-synergy-database-unix-or-linux-environment&lt;/A&gt;&lt;BR /&gt;- The key IfxPy sample that showed how to use the locale options: &lt;A href="https://github.com/OpenInformix/IfxPy/blob/58edef9321979b82df177f7ba2e9c49bc71544eb/Examples/Sample1.ipynb" target="_blank" rel="noopener"&gt;https://github.com/OpenInformix/IfxPy/blob/58edef9321979b82df177f7ba2e9c49bc71544eb/Examples/Sample1.ipynb&lt;/A&gt;&lt;BR /&gt;- Key info on how to determine the locale of a database: &lt;A href="https://www.ibm.com/support/pages/how-fix-error-message-sql1822-informix-error-code-23197" target="_blank" rel="noopener"&gt;https://www.ibm.com/support/pages/how-fix-error-message-sql1822-informix-error-code-23197&lt;/A&gt;&lt;BR /&gt;- Info on how to enable necessary roles (System Administrator/Remote Access) and services for the Unity Connection database proxy: &lt;A href="http://www.ciscounitytools.com/Applications/CxN/MessageHunter/Help/MessageHunter.htm#_Toc504638754" target="_blank" rel="noopener"&gt;http://www.ciscounitytools.com/Applications/CxN/MessageHunter/Help/MessageHunter.htm#_Toc504638754&lt;/A&gt;&lt;BR /&gt;- Some info re Unity and Informix ODBC: &lt;A href="https://ciscounitytools.com/Applications/CxN/InformixODBC/InformixODBC.html" target="_blank" rel="noopener"&gt;https://ciscounitytools.com/Applications/CxN/InformixODBC/InformixODBC.html&lt;/A&gt;&lt;BR /&gt;- Cisco Unity Tools: &lt;A href="https://ciscounitytools.com/index.html" target="_blank" rel="noopener"&gt;https://ciscounitytools.com/index.html&lt;/A&gt;&lt;BR /&gt;-IfxPy usage examples: &lt;A href="https://github.com/OpenInformix/IfxPy" target="_blank" rel="noopener"&gt;https://github.com/OpenInformix/IfxPy&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Full VS Code project attached&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 16:23:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4015666#M2855</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2020-01-23T16:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Query Cisco Unity Databases from Linux.</title>
      <link>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4017160#M2862</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;5 Stars!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Juan&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 15:42:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4017160#M2862</guid>
      <dc:creator>Juan Gerardo Hernandez</dc:creator>
      <dc:date>2020-01-23T15:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Query Cisco Unity Databases from Linux.</title>
      <link>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4143337#M2981</link>
      <description>&lt;P&gt;Took a while to tested I Struggled a lot to make it work in Widows, at the end I could because version of python and win64 drivers and Ifxpy.&lt;/P&gt;&lt;P&gt;If you are interesting in what exactly I am struggling on, please take a look at.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/OpenInformix/IfxPy/issues/50" target="_self"&gt;https://github.com/OpenInformix/IfxPy/issues/50&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I exactly followed your instructions in Linux and I got ti working,&lt;/P&gt;&lt;P&gt;I got this error:&lt;/P&gt;&lt;PRE&gt;juan@ubuntu:~/py_works$ python3 cuc_sql.py 
Traceback (most recent call last):
  File "cuc_sql.py", line 4, in &amp;lt;module&amp;gt;
    conn = IfxPy.connect(connStr, "", "")
Exception: [Informix][Informix ODBC Driver][Informix]Network connection is broken. SQLCODE=-25582&lt;/PRE&gt;&lt;P&gt;That was because the user needed to have the "Remote Administrator" Role assigned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another disadvantage, the password is sent in clear text.&lt;/P&gt;&lt;P&gt;This is the partial output of a wireshark capture.&lt;/P&gt;&lt;PRE&gt;sqlexec administrator -pciscopsdt 4.50.FC2 serial -dunitydyndb -fIEEEI DBPATH=//ciscounity DBMONEY=$. CLIENT_LOCALE=en_US.57372 NODEFDAC=no CLNT_PAM_CAPABLE=1 DB_LOCALE=en_US.57372 :.....=...d.e...=..IEEEI..lsrvinfx......+Informix Dynamic Server Version 9.56.UC9W1..#Software Serial Number AAA#...ciscounity_pub....&amp;lt;..............on.........=soctcp.......f...............k......Nt......hq-cuc...../..n.......t./.........%/usr/local/cm/db/informix/bin/oninit....~......}.b....~.	.............Q.......x..DBTEMP../tmp..SHELL..	/bin/bash...SUBQCACHESZ...10..PATH.x/home/juan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin..NODEFDAC..no..OPTOFC..0..........#...c.............c............... select count(*) from tbl_notifyq...1.............	....................(count(*))...................7..................sql_cur2...........	...............	...........................7...............
...............8.8&lt;/PRE&gt;&lt;P&gt;Do you know how this can be encrypted? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 01:39:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4143337#M2981</guid>
      <dc:creator>Juan Gerardo Hernandez</dc:creator>
      <dc:date>2020-08-29T01:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Query Cisco Unity Databases from Linux.</title>
      <link>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4401443#M3083</link>
      <description>&lt;P&gt;I was able to get this to work on RHEL 7.&lt;/P&gt;&lt;P&gt;I'll put my steps if it helps anyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using RHEL 7 x86_64.&lt;/LI&gt;&lt;LI&gt;Python is already installed.&lt;/LI&gt;&lt;LI&gt;Ifxpy is already installed.&lt;/LI&gt;&lt;LI&gt;ncurses libraries are already installed.&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;"Connection Database Proxy" is activated in "Cisco Unity Connection Serviceability -&amp;gt; Service Management".&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Remote Administrator role is associated to your user.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;1.&amp;nbsp;&lt;A href="https://www.ibm.com/products/informix/developer-tools?mhsrc=ibmsearch_a&amp;amp;mhq=informix" target="_blank" rel="noopener nofollow noreferrer"&gt;https://www.ibm.com/products/informix/developer-tools?mhsrc=ibmsearch_a&amp;amp;mhq=informix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Eventually found the file I needed for x86_64 Linux (ibm.csdk.4.50.FC5.LNX.tar)&lt;/P&gt;&lt;P&gt;2. Uploaded tar to server using SFTP.&lt;/P&gt;&lt;P&gt;3. Elevated to root.&lt;/P&gt;&lt;PRE&gt;sudo -i -u root&lt;/PRE&gt;&lt;P&gt;4. unzip the tar file from step 1 and 2.&lt;/P&gt;&lt;PRE&gt;tar xvf&amp;nbsp;ibm.csdk.4.50.FC5.LNX.tar&lt;/PRE&gt;&lt;P&gt;5. Ran installer (selected default options for all).&lt;/P&gt;&lt;PRE&gt;./installclientsdk&lt;/PRE&gt;&lt;P&gt;6. Created static environment paths file.&lt;/P&gt;&lt;PRE&gt;vi /etc/profile.d/informix.sh&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; 7. Added path information to the file.&lt;/P&gt;&lt;PRE&gt;#!/bin/bash&lt;BR /&gt;export LD_LIBRARY_PATH=/opt/IBM/Informix_Client-SDK/lib:/opt/IBM/Informix_Client-SDK/lib/esql:/opt/IBM/Informix_Client-SDK/lib/cli&lt;BR /&gt;export INFORMIXDIR=/opt/IBM/Informix_Client-SDK&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;8. Created the sqlhosts file.&lt;/P&gt;&lt;PRE&gt;vi /opt/IBM/Informix_Client-SDK/etc/sqlhosts&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;9. Entered in the hostname for the test (replace unityloab01 with the real name).&lt;/P&gt;&lt;PRE&gt;ciscounity onsoctcp &lt;STRONG&gt;unitylab01&lt;/STRONG&gt; 20532&lt;/PRE&gt;&lt;P&gt;10. I ran dstaudt's script and it worked fine. I was also able to write my own script using the same and it worked fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 21:17:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/call-control/query-cisco-unity-databases-from-linux/m-p/4401443#M3083</guid>
      <dc:creator>dwasserzug1</dc:creator>
      <dc:date>2021-05-11T21:17:17Z</dc:date>
    </item>
  </channel>
</rss>

