SCO-Unix / Perl 5.8.8 / DBI 1.607 / FreeTDS 0.82. Can not get Sybase 1.09 to compile nor unixODBC 2.2.14 to work

I have SCO Unix environment running Perl 5.8.8.  My project is to communicate with a SQL Server 2005 database on a remote server.  I have DBI 1.607 and FreeTDS 0.82 installed.  I can use "tsql" without any problems whatsoever.

I installed Sybase 1.09 so that I could embed a connection in a Perl script, but can not get it to compile correctly.  I googled the sitiuation and was able to find information relating to placing "#undef" statements in dbdimp.c for these constants: CS_VERSION_150, CS_VERSION_125, CS_VERSION_120, CS_DATE_TYPE, and CS_BIGINT_TYPE.  I also had to suppress an additional compiler error by formulating a reference to the "typedef perl_mutex" by including it in a header file (also referenced iin dbdimp.c).

At any rate, the "make test" doesn't work nor do any perl-based connections testing according to the prescribed methods.

I have also unixODBC 2.2.14 as a another possibility to solve this problem, but still no use.
The Sybase and FreeTDS tools are configured for the directory /usr/local/freetds.  My freetds.conf file looks like:
        host = DTRITDDX32CSAKA
        port = 1433           
        tds version = 8.0     
The output from "tsql -C":
Compile-time settings (established with the "configure" script) 
                            Version: freetds v0.82              
             freetds.conf directory: /usr/local/freetds/etc     
     MS db-lib source compatibility: no                         
        Sybase binary compatibility: no                         
                      Thread safety: yes                        
                      iconv library: yes                        
                        TDS version: 8.0                        
                              iODBC: no                         
                           unixodbc: yes                        
My odbc.ini entry looks like:
Description     = Northwind sample connection         
Driver          = /usr/local/freetds/lib/
Setup           = /usr/local/lib/           
Trace = No                                            
Server = DTRITDDX32CSAKA                              
Port   = 1433                                         
Database = Northwind                                  
UID = sa                                              
(Where the Server is a known node on our network.  This connection is valid.)
The output from odbcinst -j:
unixODBC 2.2.14                                    
DRIVERS............: /usr/local/etc/odbcinst.ini   
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini       
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /usr/acct/ces/.odbc.ini       
SQLULEN Size.......: 4                             
SQLLEN Size........: 4                             

Open in new window

Who is Participating?
steelspyConnect With a Mentor Author Commented:
I was able to wrestle with installing DBD-Sybase and finally got a successful test using a connection string embedded in a perl script.

The jury is still out on trying to use unixODBC.  We were hoping to have either tool available for use, so that we could select the solution that provides the most integrity.  Therefore, if you have any unixODBC solutions and/or suggestions, we would greatly appreciate them.

Thanks in advance.
gheistConnect With a Mentor Commented:
Can I get 1 line of code and error it produces?
steelspyAuthor Commented:
Isql output:
<YT>: isql TDS_CES sa xyz                                              
[ISQL]ERROR: Could not SQLConnect                                      

<YT>: isql -v TDS_CES sa xyz                                          
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect                                      

Tried to use osql, but abends with this syntax error (running it from /bin/sh yields exact results):

<YT>: osql -S DTRITDDX32CSAKA -U sa -P xyz                                
/usr/local/freetds/bin/osql: syntax error at line 35: `ISQL=$' unexpected

Still unsure of status regarding Sybase install, so I can't give you anything definitive.
gheistConnect With a Mentor Commented:
I guess server name in your ODBC.INI cannot be resolved on your UNIX system.
Try pinging that name, and after use server's IP instead.
steelspyAuthor Commented:
I am certain that unixODBC is just another way to use the same engines provided by FreeTDS and DBD-Sybase; therefore, I no longer require any help in pursuit of this endeavor.  As far as getting FreeTDS and DBD-Sybase working, I did all the research and testing myself.  I was right on the verge of getting a successful test when my supervisor required that I enter a plea for help on your web site.  My difficulties were never based on not being able to ping the server or not being able to use telnet-based testing in communication attempts.  Communication to the IP address was never an issue; if it were, I never would have been able to use "tsql" to test communicating to the database.  I will tell you that my evaluation copy of SQL Server 2000 had a bug that did not force communication at port 1433, but that too was resolved through research and installing a security patch from Microsoft before I put up this question on your web site.  Therefore, there was absolutely no assistance provided.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.