EPEL FreeTDS on RHEL6.x – “Name too long for LOGINREC field”

FreeTDS (a linux ?Sybase?/Microsoft-SQL driver) is available from the EPEL repository for RedHat Enterprise Linux 6.x.

The package available on EPEL was named: freetds-0.91-2.el6.x86_64

It has a command-line query utility called ‘bsqldb’.

This utility seems to work, but it complains if your client hostname is longer than a certain length (the ones that were causing the issue had their FQDN as their HOSTNAME= value in /etc/sysconfig/network).

The bsqldb executable, when executed, complains:

bsqldb: Msg 20042, Level 2

Name too long for LOGINREC field

Took me a while to figure out that was what it was complaining about.

To work around it, you can:

  1.  ignore it; it seems to be somewhat cosmetic
  2. remove the fqdn part of the /etc/sysconfig/network
  3. pass the -H “$( hostname -s )” parameter which will get the shortened hostname (everything before the ‘.’)



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s