<p>With Oracle DB, if the DB is restarted, db_unixodbc doesn't detect the problem as the error returned by<br>
db_unixodbc_extract_error() is:</p>

<p>Jul  1 06:07:15 newvm1 /usr/sbin/kamailio[2770]: ERROR: db_unixodbc [connection.c:220]: db_unixodbc_extract_error(): unixodbc:SQLExecDirect=HY000:1:3114:[Oracle][ODBC][Ora]ORA-03114: not connected to ORACLE#012</p>

<p>Before, only status 08003 and 08S01 where checked to reconnect to the DB. Now, SQLSTATE HY000 (General error) is checked to trigger a reconnection.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/691'>https://github.com/kamailio/kamailio/pull/691</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>db_unixodbc: detect DB disconnection with generic HY000 status</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/691/files#diff-0">modules/db_unixodbc/dbase.c</a>
    (3)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/691.patch'>https://github.com/kamailio/kamailio/pull/691.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/691.diff'>https://github.com/kamailio/kamailio/pull/691.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/691">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AF36ZQUSH0xpUDnNg19eVb7llrFEY8S1ks5qRQ_DgaJpZM4JDH4j">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZQaaKidV-GSvKARCOccFwdlEtyVpks5qRQ_DgaJpZM4JDH4j.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/691"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>