title: tsql connects to ODBC but Perl DBI gets an error
body: <ul>
  <li>Client is Ubuntu 14.04.1 LTS talking to an MS SQL Server 2005. Ubuntu has no registered domain. It's inside the local network as is the MS SQL Server. </li>
  <li>Perl 5.18.2 using DBI 1.63 and DBD::ODBC 1.52.</li>
  <li>Installed FreeTDS 0.92 (with TDS v4.2) and unixODBC 2.2.14. </li>
  <li><code>isql DSN USERNAME PASSWD</code> at the command line also doesn't work. Perhaps I should start with that. I still get the same error which is <code>Unable to connect to data source (SQL-08001).</code></li>
  </ul>
  
  <p>My related config files: </p>
  
  <pre><code>2015-07-09 11:55:14 AM
  NOTE: TDS version from tsql -C must go into freetds.conf and odbc.ini files
  
  =========================================
  /etc/odbcinst.ini:
  [FreeTDS]
  Description = FreeTDS 0.91 for Microsoft SQL Server 2005
  #Driver = /usr/lib/odbc/libtdsodbc.so
  Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
  Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
  UsageCount = 1
  #Threading = 2
  fileusage = 1
  dontdlclose = 1
  
  =========================================
  /etc/odbc.ini:
  [ODBC Data Sources]
  ResponseBDO = Response database desc in /etc/odbc/ini
  
  [FreeTDS]
  Description = FreeTDS 0.91 driver
  Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
  
  [responsebdo]
  Driver = FreeTDS
  Description = Response MSSQL 2005 ODBC driver
  SERVER = sqlsvr.mydomain.com
  PORT = 1433
  USER = 'domain\domainuser'
  Password = mypasswd
  Database = r4w_004
  # TDS_VERSION should be same as reported by 'tsql -C'.
  TDS_Version = 4.2
  
  [Default]
  Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
  Description = Default FreeTDS ODBC driver
  SERVER = 10.20.30.40
  USER = "domain\domainuser"
  Database = r4w_4
  
  =========================================
  Relevant part of /etc/freetds/freetds.conf:
  #   $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
  #
  # This file is installed by FreeTDS if no file by the same 
  # name is found in the installation directory.  
  #
  # For information about the layout of this file and its settings, 
  # see the freetds.conf manpage "man freetds.conf".  
  # 
  [responsetds]
      #host = 10.20.30.40
      host = sqlsvr.mydomain.com
      port = 1433
      tds version = 4.2
      connect timeout = 20
      timeout = 20
      dump file = /tmp/freetds-resp.log
      instance = MSSQLSERVER  
      use ntlmv2 = yes
  
  
  =========================================
  tsql -C:
  Compile-time settings (established with the "configure" script)
                              Version: freetds v0.91
               freetds.conf directory: /etc/freetds
       MS db-lib source compatibility: no
          Sybase binary compatibility: yes
                        Thread safety: yes
                        iconv library: yes
                          TDS version: 4.2
                                iODBC: no
                             unixodbc: yes
                SSPI "trusted" logins: no
                             Kerberos: yes
  
  =========================================
  odbcinst --version:
  unixODBC 2.2.14
  </code></pre>
  
  <p><hr>
  Perl connection info: </p>
  
  <pre><code>$respdsn="dbi:ODBC:Driver={SQL Native Client};Server=10.20.30.40;".
  "UID=$respdbuser;PWD=$respdbpw;Database=r4w_004";
  $respdbh=DBI-&gt;connect($respdsn);
  </code></pre>
  
  <p>I can connect to the database by using tsql at the command line. 
  But using Perl I get this error: </p>
  
  <pre><code>DBI connect('Driver={SQL Native Client};Server=10.19.1.3;UID=gilson\mwreports;PWD=MR4gilson;Database=r4w_004','',...) failed:
  [unixODBC][Driver Manager]Data source name not found, and no default 
  driver specified (SQL-IM002) at /home/chuck/perl/gilson/jimv/fedex/fedex.pl line 1557.
   at /usr/lib/perl5/DBI.pm line 691.
          DBI::__ANON__[/usr/lib/perl5/DBI.pm:744](undef, undef) called at /usr/lib/perl5/DBI.pm line 747
  </code></pre>
  
  <p><hr>
  My questions:</p>
  
  <ul>
  <li>Is the "{SQL Native Client}" in the Perl connection string correct? Does it refer to an entry in the odbc.ini or freetds.conf file? </li>
  <li>What am I missing here? </li>
  </ul>
  
  <p>Thank you.</p>