GAMMU-SMSD-ODBC(7)

NAME
gammu-smsd-odbc - gammu-smsd(1) backend using ODBC abstraction layer to use any supported database as a message storage

DESCRIPTION

Added in version 1.29.92.

ODBC backend stores all data in any database supported by ODBC <https://en.wikipedia.org/wiki/Open_Database_Connectivity>, which parameters are defined by configuration (see SMSD Configuration File <#gammu-smsdrc> for description of configuration options).

For tables description see SMSD Database Structure <#gammu-smsd-tables>.

This backend is based on SQL Service <#gammu-smsd-sql>.

SUPPORTED DRIVERS

On Microsoft Windows, Gammu uses native ODBC, on other platforms, unixODBC <http://www.unixodbc.org/> can be used.

LIMITATIONS

Due to limits of the ODBC interface, Gammu can not reliably detect which SQL engine it is connected to.

In most cases this can be solved by setting SQL <#option-SQL> setting to correct dialect.

If that fails, you can also tweak the SQL queries to work in used SQL server, see SQL Queries <#sql-queries> for more details. Still you should set SQL <#option-SQL> to closest matching SQL dialect.

CONFIGURATION

Before running gammu-smsd <#gammu-smsd> you need to create necessary tables in the database. You can use examples given in database specific backends parts of this manual to do that.

You specify data source name (DSN) as Host <#option-Host> in SMSD Configuration File <#gammu-smsdrc>. The data source is configured depending on your platform.

Note: Please remember that SMSD might be running in different context than your user (separate account on Linux or as as service on Windows), so the ODBC DSN needs to be configured as system wide in this case (system DSN on Windows or in global configuration on Linux).

On Microsoft Windows, you can find instructions on Microsoft website: <https://support.microsoft.com/kb/305599>

For unixODBC this is documented in the user manual: <http://www.unixodbc.org/doc/UserManual/>

CREATING TABLES

Prior to starting SMSD you have to create tables it will use. Gammu ships SQL scripts for several databases to do that:

•   Creating tables for MySQL <#mysql-create>

•   Creating tables for PostgreSQL <#pgsql-create>

•   Creating tables for SQLite <#sqlite-create>

EXAMPLE

Example configuration:

    [smsd]
    service = sql
    driver = odbc
    host = dsn_of_your_database
    sql = sql_variant_to_use
    user = username
    password = password

See also: SMSD Configuration File <#gammu-smsdrc>

Author
Michal Čihař <michal@cihar.com>

Copyright
2009-2015, Michal Čihař <michal@cihar.com>