SQL SMS Logging

Video tutorial: MySQL Server install
Video tutorial: SQL Logging configuration
Video tutorial: SQL Logging testing

Ozeki NG allows you to maintain a log of every incoming and outgoing SMS in a database. This option can be useful if you want to use SQL queries to produce various reports. SQL logging can be configured with any database server the has an ODBC or OleDb driver. For example you can use MSSQL, Oracle, Access, MySQL, Postgres, etc... to store SMS traffic information.

The SQL logging option allows you to specify the database connection string and the SQL statements used to store the traffic information. The SQL statements are SQL templates that hold keywords that are replaced to the appropriate content, prior to the execution of the SQL command.

To enable SQL logging you should open the Server preferences form from the Edit menu. In the server preferences form click on Databases tab, then select Logging database settings (Figure 1). On this form check the Enable SQL reporting checkbox.

enable sql logging in the sms gateway
Figure 1. - Enable SQL logging

After SQL logging is enabled, you must make sure the database connection string allows you to connect to your database server. To log incoming and outgoing messages, you would use the following connection strings:


I have a database user in the system, and the logging is slow at times, the events appear in the log with some delay. Why? How can I fix this issue?

Here are a few ways to rephrase the sentence "The proper indexing of the database solves this issue":

  • Optimizing your database with indexes can significantly improve logging speed.
  • Slow logging is often caused by a lack of database indexing. Indexing the relevant tables can significantly speed up updates and improve logging performance.

What is the recommended database server for SQL logging?

For reliable and efficient SQL logging, Microsoft SQL Server is the preferred choice. It offers a stable native OleDb driver and excels at handling large data volumes.

Maximize your SQL logging performance with Microsoft SQL Server. Its robust native driver and efficient data storage make it the ideal solution.

Can I maintain a log of all sent and received messages in an SQL Server?

Certainly! The software accommodates a wide range of database servers through OleDb or ODBC drivers. This lets you store information like sender, recipient, message text, and timestamp using SQL Insert statements. Additionally, you can customize the SQL statement to include more details and leverage the data for comprehensive reports using SQL queries. You can find more information on this in our dedicated SQL logging page.

More information