Skip site navigation (1) Skip section navigation (2)

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

From: raja agireddy <tagireddy(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
Date: 2010-03-24 18:13:55
Message-ID: bbf77681003241113qc139744s663a95a51b5384ef@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-odbc
Hi,

I have compiled unixodbc and postgressql odbc driver on solaris 10 server to
connect to postgressql database and I am having following issues

./isql -vvv DG4ODBC
[IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed
[ISQL]ERROR: Could not SQLConnect


Here is the trace file:

[DEVL] oradevl(at)dbdev> vi trace.log
[ODBC][23264][1269453011.641639][__handles.c][450]
                Exit:[SQL_SUCCESS]
                        Environment = 2b048
[ODBC][23264][1269453011.641760][SQLAllocHandle.c][364]
                Entry:
                        Handle Type = 2
                        Input Handle = 2b048
[ODBC][23264][1269453011.641801][SQLAllocHandle.c][482]
                Exit:[SQL_SUCCESS]
                        Output Handle = 2b670
[ODBC][23264][1269453011.641911][SQLConnect.c][3614]
                Entry:
                        Connection = 2b670
                        Server Name = [DG4ODBC][length = 7 (SQL_NTS)]
                        User Name = [NULL]
                        Authentication = [NULL]
[ODBC][23264][1269453011.666745][SQLAllocHandle.c][337]Error:
SQL_INVALID_HANDLE
[ODBC][23264][1269453011.666776][SQLConnect.c][1583]Error: IM005
[ODBC][23264][1269453011.666818][SQLError.c][482]Error: SQL_INVALID_HANDLE
[ODBC][23264][1269453011.666852][SQLError.c][430]
                Entry:
                        Connection = 2b670
                        SQLState = ffbff2e0
                        Native = ffbff2d8
                        Message Text = ffbff2f0
                        Buffer Length = 500
                        Text Len Ptr = ffbff2de
[ODBC][23264][1269453011.666894][SQLError.c][467]
                Exit:[SQL_SUCCESS]
                        SQLState = IM005
                        Native = ffbff2d8 -> 0
                        Message Text = [[unixODBC][Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_DBC failed]
[ODBC][23264][1269453011.667036][SQLError.c][430]
                Entry:
                        Connection = 2b670
                        SQLState = ffbff2e0
                        Native = ffbff2d8
                        Message Text = ffbff2f0
                        Buffer Length = 500
                        Text Len Ptr = ffbff2de
[ODBC][23264][1269453011.667063][SQLError.c][467]
                Exit:[SQL_NO_DATA]
[ODBC][23264][1269453011.667089][SQLError.c][510]
                Entry:
                        Environment = 2b048
                        SQLState = ffbff2e0
                        Native = ffbff2d8
                        Message Text = ffbff2f0
                        Buffer Length = 500
                        Text Len Ptr = ffbff2de
[ODBC][23264][1269453011.667117][SQLError.c][547]
                Exit:[SQL_NO_DATA]
[ODBC][23264][1269453011.667178][SQLFreeHandle.c][279]
                Entry:
                        Handle Type = 2
                        Input Handle = 2b670
[ODBC][23264][1269453011.667207][SQLFreeHandle.c][194]Error:
SQL_INVALID_HANDLE
[ODBC][23264][1269453011.667239][SQLFreeHandle.c][330]
                Exit:[SQL_SUCCESS]
[ODBC][23264][1269453011.667271][SQLFreeHandle.c][212]
                Entry:
                        Handle Type = 1
                        Input Handle = 2b048


=====================
Here is my odbc.ini file:
===============

[DG4ODBC]
Description = Services Database
Driver = PostgreSQL
Database = vidb05
Servername = 192.168.17.13
UserName = username
Password = password
Port = 5432
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =

==============
Here is my odbcinst.ini
=================
[ODBC]
Trace = yes
TraceFile = /tmp/trace.log

[PostgreSQL]
Description = PostgreSQL Official ODBC Driver
Driver = /usr/tmp/raja/psqlodbc/lib/psqlodbca.so
Debug = 1
CommLog = 1

pgsql-odbc by date

Next:From: Marian PopeangaDate: 2010-03-25 08:27:05
Subject: psqlodbc-08.04.0200 unicode
Previous:From: Marian PopeangaDate: 2010-03-24 10:14:23
Subject: psqlodbc-08.04.0200 unicode

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group