Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PGto DB2

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PGto DB2
Дата
Msg-id c7fef832-7332-cf8e-20dd-10c40052fac6@aklaver.com
обсуждение исходный текст
Ответ на Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PGto DB2  (karthik kumar <karthikkumar.db2dba@gmail.com>)
Ответы Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PGto DB2  (karthik kumar <karthikkumar.db2dba@gmail.com>)
Список pgsql-general
On 04/11/2018 11:22 AM, karthik kumar wrote:
> Hello Adrian
> 
> I built fdw with debug option and ran it with debug option.  Here is the 
> output
> 
> postgres=# select * from odbc_testt;
> DEBUG:  StartTransactionCommand
> DEBUG:  StartTransaction
> DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, 
> xid/subid/cid: 0/1/0, nestlvl: 1, children:
> DEBUG:  odbcGetForeignRelSize
> DEBUG:  odbcGetTableOptions
> DEBUG:  odbcGetOptions
> DEBUG:  extract_odbcFdwOptions
> DEBUG:  CONN STR: database=SAMPLE;DRIVER=SAMPLE;UID=db2inst1;PWD=db2inst1
> DEBUG:  Error result (-1): Connecting to driver
> ERROR:  Connecting to driver
> 
> Looking at the code this is the place where the error is coming from:
> 
> /* Allocate a connection handle */
>      SQLAllocHandle(SQL_HANDLE_DBC, *env, dbc);
>      /* Connect to the DSN */
>      ret = SQLDriverConnect(*dbc, NULL, (SQLCHAR *) conn_str.data, SQL_NTS,
>                             OutConnStr, 1024, &OutConnStrLen, 
> SQL_DRIVER_COMPLETE);
>      check_return(ret, "Connecting to driver", dbc, SQL_HANDLE_DBC);
> }
> 
> Trouble is, I can't get any unixodbc manual to indicate the meaning of -1.
> 

Per Steven's suggestion:

https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/data-access-tracing-with-the-odbc-driver-on-linux

-- 
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Don Seiler
Дата:
Сообщение: Re: Archiving Data to Another DB?
Следующее
От: Don Seiler
Дата:
Сообщение: Re: Archiving Data to Another DB?