Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client - Mailing list pgsql-odbc

From Stefan Viljoen
Subject Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
Date
Msg-id 002e01d0c088$c6b57390$54205ab0$@verishare.co.za
Whole thread Raw
In response to Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client  ("Stefan Viljoen" <viljoens@verishare.co.za>)
List pgsql-odbc
Hi Nick,

Ok, I added -v back, this gives

[root@jhbasterisk ~]# isql -v pgdb-cdr  dbuser password
[S1000][unixODBC]The database does not exist on the server
or user authentication failed.
[ISQL]ERROR: Could not SQLConnect
[root@jhbasterisk ~]#

If I do

[root@jhbasterisk ~]# psql -U dbuser -d dbname

all works fine:

[root@jhbasterisk ~]# psql -U dbuser -d dbname
Password for user asteriskcdruser:
psql (9.4.4)
Type "help" for help.

dbname=> \d+
;
                                List of relations
 Schema |      Name      |   Type   |      Owner      |    Size    |
Description
--------+----------------+----------+-----------------+------------+--------
-----
 public | cdr            | table    | dbuser | 8192 bytes |
 public | cdr_id_seq     | sequence | dbuser | 8192 bytes |
 public | cdr_leg        | table    | dbuser | 8192 bytes |
 public | cdr_leg_id_seq | sequence | dbuser | 8192 bytes |
 public | cel            | table    | dbuser | 8192 bytes |
 public | cel_id_seq     | sequence | dbusr | 8192 bytes |
(6 rows)

dbname=> ;
dbname=>

So Postgres itself does seem to know of the user and the database... but
accessing them via ODBC goes south somehow.

Is there any way I can raise the verbosity level (for example)? I've tried
isql -vvvvvv but I still just get "Database soed not exist on the server or
user authentication failed".

Thank you very much for your kind assistance.

Regards,

-----Original Message-----
From: Nick Gorham [mailto:nick@lurcher.org]
Sent: Friday,July 17, 2015 01:02 PM
To: Stefan Viljoen
Subject: Re: [ODBC] Postgres 9.4 + unixODBC on Centos 6.5 problem connecting
localhost postgres instance with isql ODBC commandline client

On 17/07/15 12:00, Stefan Viljoen wrote:
> Hi Nick
>
> Thanks for the response - ok, I tried
>
> [root@jhbasterisk ~]# isql -v pgdb-cdr dbuser dbname password
> [28000][unixODBC]FATAL:  password authentication failed for user
> "asteriskcdruser"
> [ISQL]ERROR: Could not SQLConnect
> [root@jhbasterisk ~]# isql pgdb-cdr dbuser password
> [ISQL]ERROR: Could not SQLConnect
> [root@jhbasterisk ~]#
>
> E. g. the 28000 error message is gone, but now I just get Could Not
> SQLConnect from isql...
>
> So maybe a step in the right direction?
>
> What can I try next?
>
> Thank you very much for the assistance.
>
> Kind regards,

The error has gone because you didn't have the -v option.

My point was you cant specify the database on the command line with isql

isql -v pgdb-cdr dbuser password

Will show you the error.

--
Nick




pgsql-odbc by date:

Previous
From: "Stefan Viljoen"
Date:
Subject: Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
Next
From: "Stefan Viljoen"
Date:
Subject: Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client