If you are using an Adaptive Server Enterprise database and FreeTDS as the database driver:
Add the data source information to $DJC_HOME/freetds/etc/freetds.conf. For example, to connect to the MySybase sample database, enter:
[MySybase] host = ASE hostname port = 5000 tds version = 5.0
where:
host – is the server machine’s host name or IP address.
port – is the database server’s TDS listener port.
Test the connection to MySybase using the command line tool in $DJC_HOME/freetds/bin/tsql.
./tsql -S MySybase -U dba -P dba
If the connection is successful, the data source name should be the same as the Adaptive Server Enterprise database name.
Edit $DJC_HOME/odbc/odbcinst.ini to include the ODBC data source information. Define an ODBC driver to be the FreeTDS ODBC library. For example:
[SYBASE] Description = Sybase ASE ODBC Driver Driver = $DJC_HOME/freetds/lib/libtdsodbc.so Setup = $DJC_HOME/odbc/lib/libtdsS.so TDS_Version = 5 UsageCount = 3 CPTimeout = CPReuse =
Add the ODBC data source information to $DJC_HOME/odbc/odbc.ini. For example:
[testase] Driver = SybaseASE Trace = yes Servername = ASE hostname Port = 5000 Database = tempdb uid = dba
The name of the driver must be the same as that defined in odbcinst.ini. The server name is the database name without the extension.
To verify whether the connection works, change to $DJC_HOME/odbc/bin, and run:
./isql testase user password
If the output displays a command prompt, the connection is successful.