[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2009-02-10
Medium Priority
Last Modified: 2013-12-23
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/libtdsodbc.so
Setup           = /usr/local/lib/libtdsS.so           
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

Question by:steelspy
  • 3
  • 2
LVL 62

Assisted Solution

gheist earned 160 total points
ID: 23609717
Can I get 1 line of code and error it produces?

Author Comment

ID: 23611418
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.

Accepted Solution

steelspy earned 0 total points
ID: 23614835
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.
LVL 62

Assisted Solution

gheist earned 160 total points
ID: 23615550
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.

Author Comment

ID: 23634147
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.

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question