[unixODBC-support] Re: DSN not working

Daniel Corbe daniel.junkmail at gmail.com
Tue Mar 28 20:38:51 BST 2006


Never mind, I'm retarted, I spelled PostgreSQL wrong in the odbcinst file

On 3/28/06, Daniel Corbe <daniel.junkmail at gmail.com> wrote:
> Hello,
>
> I don't understand why the following DSN does not work.  When I try
> using it (with isql) I get:
>
> pbx1 ~ # isql asterisk -v
> [IM002][unixODBC][Driver Manager]Data source name not found, and no
> default driver specified
> [ISQL]ERROR: Could not SQLConnect
>
> pbx1 ~ # odbcinst -j
> unixODBC 2.2.11
> DRIVERS............: /etc/unixODBC/odbcinst.ini
> SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini
> USER DATA SOURCES..: /root/.odbc.ini
>
> pbx1 ~ # cat /etc/unixODBC/odbcinst.ini
> [PosstgreSQL]
> Description             = PostgreSQL ODBC driver
> Driver          = /usr/lib/libodbcpsql.so
> Setup           = /usr/lib/libodbcpsqlS.so
> Debug           = 0
> CommLog         = 1
> FileUsage               = 1
> UsageCount              = 1
>
> pbx1 ~ # cat /etc/unixODBC/odbc.ini
> [ODBC Data Sources]
> asterisk                = PostgreSQL ODBC Driver
>
> [asterisk]
> Description             = PostgreSQL asterisk
> Driver          = PostgreSQL
> Trace           = Yes
> TraceFile               = /tmp/pgsqlodbc.log
> Database                = asterisk
> Servername              = 64.49.129.4
> UserName                = asterisk
> Password                = xxxxx
> Port            = 5432
> Protocol                = 6.4
> ReadOnly                = No
> RowVersioning           = No
> ShowSystemTables                = No
> ShowOidColumn           = No
> FakeOidIndex            = No
> ConnSettings            =
>
> And I know the database is actually set up correctly:
>
> pbx1 ~ # psql -h 64.49.129.4 -p 5432 -U asterisk
> Password:
> Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help with psql commands
>        \g or terminate with semicolon to execute query
>        \q to quit
>
> asterisk=> \q
>
> Any help is appriciated! Thanks
>




More information about the unixODBC-support mailing list