im_dbi & MS SQL


#1 ghostcat

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 192.168.148.227
    Option      port 49000 (non standard port changed from 1433)
    Option      username domain\username
    Option      password password
    Option      dbname database
</Input>

 

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,

GC

#2 adm Nxlog ✓ (Last updated )
#1 ghostcat
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 192.168.148.227     Option      port 49000 (non standard port changed from 1433)     Option      username domain\username     Option      password password     Option      dbname database </Input>   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, GC

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.