Skip to Content.
Sympa Menu

freetds - [freetds] fix for spurious server not found in configuration file

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: christos AT zoulas.com (Christos Zoulas)
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] fix for spurious server not found in configuration file
  • Date: Fri, 13 Nov 2009 15:35:10 -0500


Hello,

I really don't want to list > 50 servers in my freetds.conf file to avoid
seeing the message:

Msg 20012, Level 2, State -1, Server OpenClient, Line -1
Server name not found in configuration files.

So, I added this to config.c (which was to actually do what the logging
comment promised but did not deliver):

Index: src/tds/config.c
===================================================================
RCS file: /src/twosigma/cvsroot/external/public/freetds/src/tds/config.c,v
retrieving revision 1.1.1.13
retrieving revision 1.16
diff -u -r1.1.1.13 -r1.16
--- src/tds/config.c 13 Nov 2009 18:22:47 -0000 1.1.1.13
+++ src/tds/config.c 13 Nov 2009 19:39:28 -0000 1.16
@@ -195,7 +195,8 @@
if (!tds_read_interfaces(tds_dstr_cstr(&login->server_name),
connection)) {
tdsdump_log(TDS_DBG_INFO1, "Failed to find [%s] in
configuration files; trying '%s' instead.\n",

tds_dstr_cstr(&login->server_name), tds_dstr_cstr(&connection->server_name));
- tdserror(tds->tds_ctx, tds, TDSEINTF, 0);
+ if (!tds_read_conf_file(connection,
tds_dstr_cstr(&connection->server_name)))
+ tdserror(tds->tds_ctx, tds, TDSEINTF, 0);
}
}


So adding
[SYBASE]

to the bottom of your freetds.conf file will silence the nuisance.

Best,

christos




Archive powered by MHonArc 2.6.24.

Top of Page