Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

syslog-ng ignores the database defined in syslog-ng.conf and instead uses the default database of the user when logging to MSSQL destination.

destination d_mssql {
        host("myhost") username("myuser") password("mypass")
                "seqnum bigint",
                "datetime varchar(16)", "host varchar(32)",
                "program varchar(32)", "pid varchar(8)", "priority varchar(10)", "facility varchar(10)", "pri int",
                "message varchar(max)")
        values("$SEQNUM", "$R_DATE", "$HOST", "$PROGRAM", "$PID", "$PRIORITY", "$FACILITY", "$PRI", "$MSGONLY")
        indexes("datetime", "host", "program", "pid"));

As you can see I want to use "syslogng" as my database but what happens is that syslog-ng uses the default database ("master") configured for "myuser" in MS SQL Server.

If I change the default database for "myuser" in SQL server to "syslogng", then it will write to "syslogng" database. But this is not what I want. I want to be able to configure the database in syslog-ng.conf.

Any ideas why this is happening?

Same question on BalaBit community website.

share|improve this question

To get around this, in my sql() statement I set:


Then use the full path to the table I want to create/update:


Use a DB browser, like DBeaver, to connect to you MSSQL DB and determine the full path to your table.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.