Some comments from backstage:
unixODBC's driver manager lib's name is libodbcinst.a. Sometimes the
datasource driver will ask to find the driver manager name in
"libodbcinst.so ", you can do this:
In unixODBC/lib/,
ar -x libodbcinst.a -->this will archive the
"libodbcinst.so .1" out
ln -s libodbcinst.so. 1 libodbcinst.so
Once I tested with odbc wrapper to access mysql via unixODBC, when I
issue below statement when create wrapper.
create wrapper odbcwrapper library 'libdb2rcodbc.a ' options (MODULE
'/home2/sunyunf/mysqlstuff/mysql-connector-odbc-3.51.17-aix5.2-powerpc-32bi*t/lib/libmyodbc3.so', DB2_FENCED
'N')
Here is the example of use unixODBC access mysql, hope it will behelpful.
create wrapper odbcwrapper library 'libdb2rcodbc.a ' options (MODULE
'/home2/sunyunf/unixODBC/lib/libodbc.so', DB2_FENCED 'N')
DB20000I The SQL command completed successfully.
create server odbcserver type odbc version 3 wrapper odbcwrapper options
(node 'mysql', dbname 'test', PUSHDOWN 'Y', DB2_MAXIMAL_PUS HDOWN 'Y',
DB2_IUD_ENABLE 'Y',DB2_ONE_REQ UEST_PER_CONNEC TION 'N' )
DB20000I The SQL command completed successfully.
create user mapping for user server odbcserver options ( REMOTE_AUTHID
'Login', REMOTE_PASSWORD 'Passw0rd' )
DB20000I The SQL command completed successfully.
Hello.
Serge, thanks for your help.
I reinstal my environment on RHEL5 and is not succesfull :((
I install and configure ODBC-access to my PostgreSQL test database, is
work fine
Next i'm try to configure federated db :
db2 =create wrapper odbc options (module '/usr/lib64/
libodbc.so',DB2 _FENCED 'N')
DB20000I The SQL command completed successfully.
db2 =create server db2pgserv type odbc version 3.0 wrapper odbc
options (node 'pgtest', dbname 'testpgdb')
DB20000I The SQL command completed successfully.
db2 =create user mapping for db2inst1 server db2pgserv options
(remote_authid 'postgres', remote_password 'db2wfs913rhel5 ')
DB20000I The SQL command completed successfully.
db2 =set passthru db2pgserv
DB20000I The SQL command completed successfully.
db2 =select * from testtab
SQL1822N Unexpected error code "I" received from data source
"DB2PGSERV" .
Associated text and tokens are "[". SQLSTATE=560BD
In db2diag.log for this error logged this message :
2007-09-17-09.27.31.897164-420 E57705E753 LEVEL: Error
(Received)
PID : 3139 TID : 46912633403232P ROC : db2agent
(DB2PGDB) 0
INSTANCE: db2inst1 NODE : 000 DB : DB2PGDB
APPHDL : 0-7 APPID: *LOCAL.db2inst1 .070917160821
AUTHID : DB2INST1
FUNCTION: DB2 UDB, ODBC wrapper, report_error_me ssage, probe:1072
DATA #1 : String, 16 bytes
Server name:
DATA #2 : String, 9 bytes
DB2PGSERV
DATA #3 : String, 16 bytes
Function name:
DATA #4 : String, 7 bytes
connect
DATA #5 : String, 16 bytes
ODBC native err:
DATA #6 : signed integer, 4 bytes
0
DATA #7 : String, 16 bytes
ODBC sqlstate:
DATA #8 : String, 1 bytes
I
DATA #9 : String, 16 bytes
ODBC error text:
DATA #10: String, 1 bytes
[