Hello Team,

I'm looking to use nxlog to retrieve a table entries from MS SQL , To be clear I do not require any of the database server logging only the info contained within a few tables within a database on the server.

I have followed the setup and battled first under windows and then linux versions of nxlog. I am now trying to use libdbi-freetds without success after having out of memory upon using the mysql hooks.

Here is my im_dbi without the user and pass for security.

<Input DB01-elog>
    Module      im_dbi
    SavePos     TRUE
    SQL         SELECT AllXml FROM db_table
    Driver      freetds
    Option      host
    Option      port 49000 (non standard port changed from 1433)
    Option      username domain\username
    Option      password password
    Option      dbname database


The SQL server im attempting to connect to is MS SQL Server 2014, I also attempted this using mysql however recieved out of memory from the libdbi during execution of the query.

The OS machine has 8GB of mem available currently upped from 4GB when the out of memory initially occured.

I'm secretly hoping someone has run into this before and has been able to successfully retrieve table data and log it from MS SQL Server 2014.

If not im happy to work with the team to resolution on this.

Many Thanks,


AskedDecember 8, 2014 - 10:57pm

Answer (1)

Note that the result set must contain an id column, your SQL statement does not contain this. Perhaps this is the cause.

Otherwise I have heard reports from users using the dbi module with the freetds driver and MSSQL. Please post the bug in a support ticket if you can debug the memory leak with valgrind.

The NXLog Enterprise Edition comes with an im_odbc module that will talk natively to MSSQL, I suggest giving that a try.

Comments (2)

  • ghostcat's picture

    Thank you for the info, Ive subsequently attempted to use the im_odbc but i am unsure as to the arguements to supply within the configuration file,

    Seems like there's a lack of information in this area too as i dont seems to be finding any materials on the subject.

    So someone,anyone please help!, If you have used im_odbc before and know what the input module is expecting for arguements within the conf this would help greatly.