Syslog-ng 3.0.7 fails to insert into microsoft sql server

 
Thread Tools Search this Thread
Operating Systems Linux SuSE Syslog-ng 3.0.7 fails to insert into microsoft sql server
# 1  
Old 07-12-2010
Syslog-ng 3.0.7 fails to insert into microsoft sql server

Dear All,

Im currently configuring syslog-ng on SUSE Linux 10 SP2 to communicate with microsoft sql server 2005.

I have installed freeTds 8.0.

Tested TSQL ..works fine
ISQL works fine.

when testing with syslog-ng

Code:
destination d_mssql {
sql(type(mssql) host("ip address") port("1433")
username("sa") password("password") database("syslogng")
table("test1")
columns("datetime varchar(16)","host varchar(32)" ,"program varchar(32)","pid varchar(8)","message varchar(4096)")
values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSGONLY")
indexes()
);
};
log {
     source(src);
     destination(d_mssql);
};

I get the following error

Code:
Jul 12 09:57:06 syslogng syslog-ng[25034]: Error running SQL query; type='freetds', host='ip address', port='1433', user='sa', database='syslogng', error='', query='INSERT INTO test1 (datetime, host, program, pid, message) VALUES (\'Jul 12 08:59:46\', \'syslogng\', \'agetty\', \'25154\', \'/dev/xvc0: No such file or directory\')'
Jul 12 09:57:36 syslogng syslog-ng[25034]: Error opening pipe, underlying file is not a FIFO, it should be used by file(); filename='/dev/tty10'
Jul 12 09:57:36 syslogng syslog-ng[25034]: Error opening file for writing; filename='/dev/tty10', error='Illegal seek (29)'
Jul 12 09:59:06 syslogng syslog-ng[25034]: Error running SQL query; type='freetds', host='ip address', port='1433', user='sa', database='syslogng', error='', query='INSERT INTO test1 (datetime, host, program, pid, message) VALUES (\'Jul 12 08:59:46\', \'syslogng\', \'agetty\', \'25154\', \'/dev/xvc0: No such file or directory\')'
Jul 12 09:59:06 syslogng syslog-ng[25034]:   Error inserting message into database. It is tried to insert 3 times, but it's failed. Message is dropped;

Any idea wat could be wrong??

Regards

Last edited by pludi; 07-12-2010 at 05:54 AM.. Reason: code tags, please...
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Connection to Microsoft SQL Server

Hi, I am using "ksh" and trying to connect to the Microsoft SQL Server but it gives an error that is: DB-LIBRARY error: Unexpected EOF from SQL Server. Can any one please help me to resolve this issue. And i am using Putty to connect to the Unix server. Thanks (3 Replies)
Discussion started by: anupdas
3 Replies

2. Shell Programming and Scripting

(perl) Microsoft SQL Server client for solaris. cant find it...

let me save everyone the pain that it caused me. This is all free. And make sure it is in this order 1) make sure you have the latest version of perl installed 2) make sure you have NET:aemon installed 3) make sure you have RPC::PlServer & PlClient (the bundle has both) 4) make sure... (3 Replies)
Discussion started by: Optimus_P
3 Replies
Login or Register to Ask a Question