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
Conf file
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
Note I created the table test1
manually in SQL server
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;
Grateful if someone can help me figure out the problem
Regards
KP