<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Frank,<br>
<br>
There were no changes in the db_unixodbc driver in OpenSIPS for
some time. Maybe something changed in the unixodbc driver for MS
SQL.<br>
<br>
Based on the this log:<br>
core:db_table_version: invalid type (1) or nul (0)<br>
<br>
I see that that the "table_version" from the version table is
returned as BIGINT, while OpenSIPS expects INT. Of course, this is
something we can quickly adjust.<br>
<br>
In regards to the 'avp_db_query', could you post the level 3 logs
corresponding to the query ? Maybe it will give us a clue.<br>
<br>
Regards,<br>
<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
<div class="moz-cite-prefix">On 05/25/2019 07:33 AM, Frank Lee
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:00cb01d512b3$03f3e860$0bdbb920$@wtild.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI Light";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hello, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Was there some
major change between version 1.11 and 2.4.5 on supporting of
the ODBC connection of Microsoft SQL Server? It seems I had
1.11 running fine on SQL server (or at least partial table
on sql server such as location table). But now I use 2.4.5
it seems all the module that uses odbc connector instead of
the mysql connector it will have the error below<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">core:db_table_version:
invalid type (1) or nul (0)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thus, I changed
all the module to use mysql connector (except the AVPOPS
Module because I have custom query in the script which need
to query the Microsoft sql server) which made Opensips start
out fine. But as soon as it uses the </span><span
style="font-family:Consolas;color:black">avp_db_query in the
script it seems it would not work. Alhtough I don’t see any
error in the syslog file (although I had log_level set to 3,
do I need to set it higher?)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">Anyway, it just
seems all the query/support to Microsoft SQL server doesn’t
run right in 2.4.5 vs 1.11.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">Is there some
dependency that I am suppose to install which is different?
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">I had my 1.11 run
on Debian 7. Now we are moving to Azure cloud, I had run
Ubuntu 18.04 since Debian 7 is not support on Azure.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">I had install odbc
version 2.3.4 and also tdsodbc 1.00<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">Are these not to
correct version to interface between 2.4.5 and Microsoft sql
server (I tried both version msssql 2008 and 2016).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">Anyway, any
pointer or help will be greatly appreciated!<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black">Thank you!<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Frank Lee
[<a class="moz-txt-link-freetext" href="mailto:frank@wtild.com">mailto:frank@wtild.com</a>] <br>
<b>Sent:</b> Friday, May 24, 2019 10:58 AM<br>
<b>To:</b> '<a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>'
<a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
<b>Subject:</b> Opensip 2.4.5 Subscriber module on ODBC
(MSSQL 2016 )<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is the first time I use this mail
message, so let me know if this is not the correct way of
posting question.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Anyway, I am running Opensips 2.4.5 and
when I use MYSQL database on all module, opensips runs fine.
But as soon as I switch over the database source to use ODBC
driver (which is linked to Microsoft SQL server 2016), I get
this error. What is It mean?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-family:Consolas;color:black">May 24 17:36:48
osipibDprimary /usr/local/sbin/opensips[13534]:
ERROR:core:db_table_version: invalid type (1) or nul (0)
version columns for subscriber<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-family:Consolas;color:black">May 24 17:36:48
osipibDprimary /usr/local/sbin/opensips[13534]:
ERROR:core:db_check_table_version: querying version for
table subscriber<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-family:Consolas;color:black">May 24 17:36:48
osipibDprimary /usr/local/sbin/opensips[13534]:
ERROR:uri:mod_init: Invalid table version.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I first created the MySQL table usinmg the
command:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">opensipsdbctl create<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And then I transfer the tables to MSSQL
using the:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"
style="background:white;vertical-align:baseline"><span
style="font-size:17.0pt;font-family:"Segoe UI
Light",sans-serif;color:#333333">Microsoft SQL Server
Migration Assistant 8.1 for MySQL<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">All the table named corrected and all the
index was created too.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you very much!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Frank<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>