Обсуждение: ODBC not connecting.

Поиск
Список
Период
Сортировка

ODBC not connecting.

От
Peter Cordone
Дата:
I am running windows NT version 4.0 (I believe there are no service paks
applied, at least I didn't apply any).  I have installed the Postgres
ODBC driver.  I have Linux from Redhat ver 5.1 installed running
Postgres.  I edited the pg_hba.conf file and added my machine to the
host list.  When I set the database to all with no identification, I am
able to connect through the ODBC driver fine.  I changed the database to
test (there is a test database in postgres that I can connect to fine on
the Linux local machine) and change the authentication to ident
sameuser.  And then I can't connect.  I keep getting some vague error on
the win NT side about user authentication or database nonexistent.  What
am I doing wrong here?  I have attached the output from the ODBC log on
the windows NT side.  I haven't found where the postgres log is on the
Linux side (I am new to unix and postgres).

Your help is appreciated.

Attached ODBC log from windows NT side.  Look at the bottom of the log.
I think the top is some successfull connections before I changed the
ident.


bdeadmin        5e:41 ENTER SQLAllocEnv
  HENV *              0x00dcf8d0

bdeadmin        5e:41 EXIT  SQLAllocEnv  with return code 0
(SQL_SUCCESS)
  HENV *              0x00dcf8d0 ( 0x02872d68)

bdeadmin        5e:41 ENTER SQLDataSources
  HENV                0x02872d68
  UWORD                        2 <SQL_FETCH_FIRST>
  UCHAR *             0x0012f3d4
  SWORD                       33
  SWORD *             0x0012f3fa
  UCHAR *             0x0012f2d0
  SWORD                      257
  SWORD *             0x0012f3f8

bdeadmin        5e:41 ENTER SQLDataSourcesW
  HENV                0x02872d68
  UWORD                        2 <SQL_FETCH_FIRST>
  WCHAR *             0x02872df0
  SWORD                       66
  SWORD *             0x0012f3fa
  WCHAR *             0x02872e40
  SWORD                      514
  SWORD *             0x0012f3f8

bdeadmin        5e:41 EXIT  SQLDataSourcesW  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        2 <SQL_FETCH_FIRST>
  WCHAR *             0x02872df0 [      42] "MS Access 97 Database"
  SWORD                       66
  SWORD *             0x0012f3fa (42)
  WCHAR *             0x02872e40 [      62] "Microsoft Access Driver
(*.mdb)"
  SWORD                      514
  SWORD *             0x0012f3f8 (62)

bdeadmin        5e:41 EXIT  SQLDataSources  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        2 <SQL_FETCH_FIRST>
  UCHAR *             0x0012f3d4 [      21] "MS Access 97 Database"
  SWORD                       33
  SWORD *             0x0012f3fa (21)
  UCHAR *             0x0012f2d0 [      31] "Microsoft Access Driver
(*.mdb)"
  SWORD                      257
  SWORD *             0x0012f3f8 (31)

bdeadmin        5e:41 ENTER SQLDataSources
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4
  SWORD                       33
  SWORD *             0x0012f3fa
  UCHAR *             0x0012f2d0
  SWORD                      257
  SWORD *             0x0012f3f8

bdeadmin        5e:41 ENTER SQLDataSourcesW
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0
  SWORD                       66
  SWORD *             0x0012f3fa
  WCHAR *             0x02872e40
  SWORD                      514
  SWORD *             0x0012f3f8

bdeadmin        5e:41 EXIT  SQLDataSourcesW  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0 [      22] "dBASE Files"
  SWORD                       66
  SWORD *             0x0012f3fa (22)
  WCHAR *             0x02872e40 [      60] "Microsoft dBase Driver
(*.dbf)"
  SWORD                      514
  SWORD *             0x0012f3f8 (60)

bdeadmin        5e:41 EXIT  SQLDataSources  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4 [      11] "dBASE Files"
  SWORD                       33
  SWORD *             0x0012f3fa (11)
  UCHAR *             0x0012f2d0 [      30] "Microsoft dBase Driver
(*.dbf)"
  SWORD                      257
  SWORD *             0x0012f3f8 (30)

bdeadmin        5e:41 ENTER SQLDataSources
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4
  SWORD                       33
  SWORD *             0x0012f3fa
  UCHAR *             0x0012f2d0
  SWORD                      257
  SWORD *             0x0012f3f8

bdeadmin        5e:41 ENTER SQLDataSourcesW
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0
  SWORD                       66
  SWORD *             0x0012f3fa
  WCHAR *             0x02872e40
  SWORD                      514
  SWORD *             0x0012f3f8

bdeadmin        5e:41 EXIT  SQLDataSourcesW  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0 [      22] "Excel Files"
  SWORD                       66
  SWORD *             0x0012f3fa (22)
  WCHAR *             0x02872e40 [      60] "Microsoft Excel Driver
(*.xls)"
  SWORD                      514
  SWORD *             0x0012f3f8 (60)

bdeadmin        5e:41 EXIT  SQLDataSources  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4 [      11] "Excel Files"
  SWORD                       33
  SWORD *             0x0012f3fa (11)
  UCHAR *             0x0012f2d0 [      30] "Microsoft Excel Driver
(*.xls)"
  SWORD                      257
  SWORD *             0x0012f3f8 (30)

bdeadmin        5e:41 ENTER SQLDataSources
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4
  SWORD                       33
  SWORD *             0x0012f3fa
  UCHAR *             0x0012f2d0
  SWORD                      257
  SWORD *             0x0012f3f8

bdeadmin        5e:41 ENTER SQLDataSourcesW
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0
  SWORD                       66
  SWORD *             0x0012f3fa
  WCHAR *             0x02872e40
  SWORD                      514
  SWORD *             0x0012f3f8

bdeadmin        5e:41 EXIT  SQLDataSourcesW  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0 [      24] "FoxPro Files"
  SWORD                       66
  SWORD *             0x0012f3fa (24)
  WCHAR *             0x02872e40 [      62] "Microsoft FoxPro Driver
(*.dbf)"
  SWORD                      514
  SWORD *             0x0012f3f8 (62)

bdeadmin        5e:41 EXIT  SQLDataSources  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4 [      12] "FoxPro Files"
  SWORD                       33
  SWORD *             0x0012f3fa (12)
  UCHAR *             0x0012f2d0 [      31] "Microsoft FoxPro Driver
(*.dbf)"
  SWORD                      257
  SWORD *             0x0012f3f8 (31)

bdeadmin        5e:41 ENTER SQLDataSources
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4
  SWORD                       33
  SWORD *             0x0012f3fa
  UCHAR *             0x0012f2d0
  SWORD                      257
  SWORD *             0x0012f3f8

bdeadmin        5e:41 ENTER SQLDataSourcesW
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0
  SWORD                       66
  SWORD *             0x0012f3fa
  WCHAR *             0x02872e40
  SWORD                      514
  SWORD *             0x0012f3f8

bdeadmin        5e:41 EXIT  SQLDataSourcesW  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0 [      20] "Text Files"
  SWORD                       66
  SWORD *             0x0012f3fa (20)
  WCHAR *             0x02872e40 [      72] "Microsoft Text Driver
(*.txt; *.csv)"
  SWORD                      514
  SWORD *             0x0012f3f8 (72)

bdeadmin        5e:41 EXIT  SQLDataSources  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4 [      10] "Text Files"
  SWORD                       33
  SWORD *             0x0012f3fa (10)
  UCHAR *             0x0012f2d0 [      36] "Microsoft Text Driver
(*.txt; *.csv)"
  SWORD                      257
  SWORD *             0x0012f3f8 (36)

bdeadmin        5e:41 ENTER SQLDataSources
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4
  SWORD                       33
  SWORD *             0x0012f3fa
  UCHAR *             0x0012f2d0
  SWORD                      257
  SWORD *             0x0012f3f8

bdeadmin        5e:41 ENTER SQLDataSourcesW
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0
  SWORD                       66
  SWORD *             0x0012f3fa
  WCHAR *             0x02872e40
  SWORD                      514
  SWORD *             0x0012f3f8

bdeadmin        5e:41 EXIT  SQLDataSourcesW  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  WCHAR *             0x02872df0 [       8] "Test"
  SWORD                       66
  SWORD *             0x0012f3fa (8)
  WCHAR *             0x02872e40 [      20] "PostgreSQL"
  SWORD                      514
  SWORD *             0x0012f3f8 (20)

bdeadmin        5e:41 EXIT  SQLDataSources  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  UWORD                        1 <SQL_FETCH_NEXT>
  UCHAR *             0x0012f3d4 [       4] "Test"
  SWORD                       33
  SWORD *             0x0012f3fa (4)
  UCHAR *             0x0012f2d0 [      10] "PostgreSQL"
  SWORD                      257
  SWORD *             0x0012f3f8 (10)

bdeadmin        5e:41 ENTER SQLAllocConnect
  HENV                0x02872d68
  HDBC *              0x00dcf81c

bdeadmin        5e:41 EXIT  SQLAllocConnect  with return code 0
(SQL_SUCCESS)
  HENV                0x02872d68
  HDBC *              0x00dcf81c ( 0x02872df0)

bdeadmin        5e:41 ENTER SQLDriverConnectW
  HDBC                0x02872df0
  HWND                0x00000000
  WCHAR *             0x02871c58 [      92]
"DATABASE=test;DSN=Test;UID=pcordone;PWD=peanut"
  SWORD                       92
  WCHAR *             0x02873260
  SWORD                     1000
  SWORD *             0x0012f1ce
  UWORD                        0 <SQL_DRIVER_NOPROMPT>

bdeadmin        5e:41 EXIT  SQLDriverConnectW  with return code -1
(SQL_ERROR)
  HDBC                0x02872df0
  HWND                0x00000000
  WCHAR *             0x02871c58 [      92]
"DATABASE=test;DSN=Test;UID=pcordone;PWD=peanut"
  SWORD                       92
  WCHAR *             0x02873260
  SWORD                     1000
  SWORD *             0x0012f1ce
  UWORD                        0 <SQL_DRIVER_NOPROMPT>

bdeadmin        5e:41 ENTER SQLError
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  UCHAR *             0x0012f3f4 (NYI)
   SDWORD *            0x0012f194
  UCHAR *             0x0012f1f0
  SWORD                      511
  SWORD *             0x0012f192

bdeadmin        5e:41 ENTER SQLErrorW
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  WCHAR *             0x0012ecf4 (NYI)
   SDWORD *            0x0012f194
  WCHAR *             0x0012ed00
  SWORD                     1022
  SWORD *             0x0012f192

bdeadmin        5e:41 EXIT  SQLErrorW  with return code 0 (SQL_SUCCESS)
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  WCHAR *             0x0012ecf4 (NYI)
   SDWORD *            0x0012f194 (5)
  WCHAR *             0x0012ed00 [     144] "The database does not exist
on the serveror user authentication failed."
  SWORD                     1022
  SWORD *             0x0012f192 (144)

bdeadmin        5e:41 EXIT  SQLError  with return code 0 (SQL_SUCCESS)
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  UCHAR *             0x0012f3f4 (NYI)
   SDWORD *            0x0012f194 (5)
  UCHAR *             0x0012f1f0 [      72] "The database does not exist
on the serveror user authentication failed."
  SWORD                      511
  SWORD *             0x0012f192 (72)

bdeadmin        5e:41 ENTER SQLError
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  UCHAR *             0x0012f3f4 (NYI)
   SDWORD *            0x0012f194
  UCHAR *             0x0012f1f0
  SWORD                      511
  SWORD *             0x0012f192

bdeadmin        5e:41 ENTER SQLErrorW
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  WCHAR *             0x0012ecf4 (NYI)
   SDWORD *            0x0012f194
  WCHAR *             0x0012ed00
  SWORD                     1022
  SWORD *             0x0012f192

bdeadmin        5e:41 EXIT  SQLErrorW  with return code 100
(SQL_NO_DATA_FOUND)
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  WCHAR *             0x0012ecf4 (NYI)
   SDWORD *            0x0012f194
  WCHAR *             0x0012ed00
  SWORD                     1022
  SWORD *             0x0012f192

bdeadmin        5e:41 EXIT  SQLError  with return code 100
(SQL_NO_DATA_FOUND)
  HENV                0x00000000
  HDBC                0x02872df0
  HSTMT               0x00000000
  UCHAR *             0x0012f3f4 (NYI)
   SDWORD *            0x0012f194
  UCHAR *             0x0012f1f0
  SWORD                      511
  SWORD *             0x0012f192

bdeadmin        5e:41 ENTER SQLFreeConnect
  HDBC                0x02872df0

bdeadmin        5e:41 EXIT  SQLFreeConnect  with return code 0
(SQL_SUCCESS)
  HDBC                0x02872df0

bdeadmin        5e:41 ENTER SQLFreeEnv
  HENV                0x02872d68

bdeadmin        5e:41 EXIT  SQLFreeEnv  with return code 0 (SQL_SUCCESS)

  HENV                0x02872d68