[Users] RE: [Devel] unixODBC Database Connection Problem

Lenir lenirsantiago at yahoo.com
Thu Dec 8 20:41:50 CET 2005


Ok, I tried using the FreeTDS driver for unixodbc and I got a more detailed
error message that might shine a light:

Failed to connect

 

The driver reported the following diagnostics whilst running
SQLDriverConnect

 

IM007:1:0:[unixODBC][FreeTDS][SQL Server]Could not find UID parameter

HYC00:2:0:[unixODBC][FreeTDS][SQL Server]Driver not capable

 0(0) auth_db:str_fixup: Unable to open database connection

 0(0) ERROR: fix_expr : fix_actions error

ERROR: error -1 while trying to fix configuration

 

These are my entries in /etc/odbc.ini

 

[SYBASE]

Driver          = /usr/local/lib/libtdsodbc.so

Description     = Sybase Server

Trace           = Yes

Trafcefile      = /tmp/odbc.log

#Servername      = JDBC

Server          = xx.xx.xx.xx

Port            = 2000

DSN             = database

Database        = database

#UserID             = username # I tried using both UID and UserID, had same
results

UID             = username

Password        = passwd

TDS_Version     = 4.2

 

These are my entries in /etc/freetds.conf:

[SYBASE]

        host = xx.xx.xx.xx

        port = 2000

        tds version = 4.2

 

 

  _____  

From: devel-bounces at openser.org [mailto:devel-bounces at openser.org] On Behalf
Of lenirsantiago at yahoo.com
Sent: Thursday, December 08, 2005 12:59 PM
To: devel at openser.org; users at openser.org
Subject: [Devel] unixODBC Database Connection Problem

 

Guys,

 

Im trying to use unixodbc.so to connect to a Sybase database using Sybase
native ODBC drivers. This is the entry that I have on: 

 

/etc/odbc.ini:
=============

[SYBASE]

Description             = Sybase ODBC Data Source

UserID          = username

Password                = passwd

Driver          = ASE

Server          = xx.xx.xx.xx

Port            = 5000

Database                = database

UseCursor               = 1

 

/etc/odbcinst.ini

============

[ASE]

Description             = Sybase ODBC Driver

Driver          = /opt/sybase/ODBC-12_5/lib/libsybdrvodb.so

FileUsage               = -1

UsageCount              = 1

 

 

The database is on a remote host. I can connect from the openser server
using unixodbc's isql tool, as such:

[root at ser openser]# isql SYBASE username passwd

+---------------------------------------+

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

+---------------------------------------+

SQL>

 

This proves that unixodbc is installed correctly and that the Sybase odbc
driver is installed and functioning properly.

However when I try to run openser (debug=4) I get the following:

 

0(0) fixing /usr/local/lib/openser/modules/auth_db.so www_authorize

 0(0) db_init: Connection 'unixodbc://username:passwd@xx.xx.xx.xx/SYBASE'
not found in pool

Failed to connect

 

The driver reported the following diagnostics whilst running
SQLDriverConnect

 

 0(0) auth_db:str_fixup: Unable to open database connection

 0(0) ERROR: fix_expr : fix_actions error

ERROR: error -1 while trying to fix configuration

 0(0) XLOG: destroy module ...

 0(0) DEBUG: tm_shutdown : start

 0(0) DEBUG: unlink_timer_lists : emptying DELETE list

 0(0) DEBUG: tm_shutdown : emptying hash table

 0(0) DEBUG: tm_shutdown : releasing timers

 0(0) DEBUG: tm_shutdown : removing semaphores

 0(0) DEBUG: tm_shutdown : destroying tmcb lists

 0(0) DEBUG: tm_shutdown : done

 0(22871) shm_mem_destroy

 0(22871) destroying the shared memory lock

[root at ser openser]#

 

This is a snippet of my openser.cfg

------------------------------START--------------------------------

debug=4

fork=no

log_stderror=yes

 

listen=yy.yy.yy.yy

port=5060

children=4

server_signature=no

dns=no

rev_dns=no

check_via=no

syn_branch=yes

memlog=1000

sip_warning=no

fifo_mode=0666

fifo="/tmp/openser_fifo"

fifo_db_url="unixodbc://username:passwd@xx.xx.xx.xx/SYBASE"

reply_to_via=no

 

loadmodule "/usr/local/lib/openser/modules/mysql.so"

loadmodule "/usr/local/lib/openser/modules/postgres.so"

loadmodule "/usr/local/lib/openser/modules/unixodbc.so"

loadmodule "/usr/local/lib/openser/modules/sl.so"

loadmodule "/usr/local/lib/openser/modules/tm.so"

loadmodule "/usr/local/lib/openser/modules/rr.so"

loadmodule "/usr/local/lib/openser/modules/maxfwd.so"

loadmodule "/usr/local/lib/openser/modules/usrloc.so"

loadmodule "/usr/local/lib/openser/modules/registrar.so"

loadmodule "/usr/local/lib/openser/modules/acc.so"

loadmodule "/usr/local/lib/openser/modules/auth.so"

loadmodule "/usr/local/lib/openser/modules/auth_db.so"

loadmodule "/usr/local/lib/openser/modules/auth_radius.so"

loadmodule "/usr/local/lib/openser/modules/uri.so"

loadmodule "/usr/local/lib/openser/modules/uri_radius.so"

loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"

loadmodule "/usr/local/lib/openser/modules/nathelper.so"

loadmodule "/usr/local/lib/openser/modules/textops.so"

loadmodule "/usr/local/lib/openser/modules/domain.so"

loadmodule "/usr/local/lib/openser/modules/avpops.so"

loadmodule "/usr/local/lib/openser/modules/avp_radius.so"

loadmodule "/usr/local/lib/openser/modules/permissions.so"

loadmodule "/usr/local/lib/openser/modules/xlog.so"

loadmodule "/usr/local/lib/openser/modules/options.so"

#loadmodule "/usr/local/lib/openser/modules/group.so"

loadmodule "/usr/local/lib/openser/modules/speeddial.so"

loadmodule "/usr/local/lib/openser/modules/group_radius.so"

 

modparam("usrloc", "db_mode", 0)

modparam("usrloc", "timer_interval", 60)

modparam("usrloc", "desc_time_order", 1)

 

modparam("permissions", "db_mode", 1)

modparam("permissions", "trusted_table", "trusted")

modparam("permissions", "default_allow_file", "/etc/ser/permissions.allow")

modparam("permissions", "default_deny_file", "/etc/ser/permissions.deny")

 

modparam("usrloc|auth_db", "db_url",
"unixodbc://username:passwd@xx.xx.xx.xx/SYBASE")

---------------------------------END----------------------------------------
-

 

 

Any suggestions?

 

Lenir

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20051208/04ebfd0a/attachment.htm>


More information about the sr-users mailing list