7.14.2. Using the sql() driver with a Microsoft SQL database
mssql database driver can access Microsoft SQL (MSSQL) destinations. This driver has some special aspects that are important to note.
The date format used by the MSSQL database must be explicitly set in the
/etc/locales.conffile of the syslog-ng server. For details, see the following example.
As certain database versions limit the maximum length of table names, macros in the table names should be used with care.
In the current version of syslog-ng PE, the types of database columns must be explicitly set for the MSSQL destination.
The following column types cannot be used in MSSQL destinations:
The column used to store the text part of the syslog messages should be able to store messages as long as the longest message permitted by syslog-ng. The
varcharcolumn type can store maximum 4096 bytes-long messages. The maximum length of the messages can be set using the
log-msg-size()option. For details, see the following example.
Remote access for SQL users must be explicitly enabled on the Microsoft Windows host running the Microsoft SQL Server. For details, see Procedure 3.9, Configuring Microsoft SQL Server to accept logs from syslog-ng.