Summary:ASTERISK-15047: Need a CLI command to force a reconnect of ODBC connections
Reporter:Brad Belanger (btrain1227)Labels:
Date Opened:2009-10-28 13:59:13Date Closed:2011-06-07 14:00:50
Versions:Frequency of
Description:We have a sqlite db file that is updated by the following method:

1. A new file is pushed to the server.
2. This file is 'cp -f' to the name of the production db file.
3. A reload is issued through the cli.

Not the cleanest update, but 99% of the time it works.  Sometimes though the lookups still return data from the db file that was overwritten.  Subsequent reloads do not reconnect to the new db file.  The only solution is to restart asterisk. A cli command to force a reconnect of the ODBC resources would prevent the need for a full restart.

The res_odbc.conf option 'idlecheck' will correct the issue on newer installs.  When the timeout is reached the connection to the new data file is made.  On a busy server this requires setting it to a few seconds though.

SQLite ODBC Driver http://www.ch-werner.de/sqliteodbc/


enabled => yes
dsn => sqlitedb
username => myuser
password => mypass
pre-connect => yes

func_odbc.conf - All simple selects.
Comments:By: Leif Madsen (lmadsen) 2009-11-02 11:47:15.000-0600

This is a feature request without supplying a patch to implement this functionality. Issue closed.