Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle/MySQL database link configuration issues

883513Aug 19 2011 — edited Apr 2 2012
I have looked at everything I could find about the errors I am seeing but am still at a loss. Basically, I have created a database link between a oracle DB (11.2.0.2.0, 64bit) running on linux and a mysql DB (5.0.45 64bit) also running on linux. The mysql ODBC driver version is 5.1.8-1 (64bit) and the unixODBC version is 2.2.11-7.1 (also 64bit). isql can connect and provides the correct results. Connected to the oracle DB, I can run 'select count(*)' on any table of the mysql DB. I can also select varchar columns from tables but the displayed values are abbreviated strangely and incomplete. Selecting all columns from more than one row for most tables gives me the dreaded ORA-28528 error. Selecting specific rows, however, seems to work. Here is a typical session:
SQL> select count(*) from "status"@mysql;

  COUNT(*)
----------
	30

SQL> select "name" from "status"@mysql;

name
--------------------------------------------------------------------------------
approved
cancelled
complet
configu
deleted
Drafti
editing
finalized
hibernat
initialized
manual

name
--------------------------------------------------------------------------------
not used
original
plating
Prepari








name
--------------------------------------------------------------------------------









30 rows selected.

SQL> select * from "status"@mysql;
ERROR:
ORA-28528: Heterogeneous Services datatype conversion error
ORA-02063: preceding line from MYSQL



no rows selected

SQL> select * from "status"@mysql where "name" like 'Drafting%';

 status_id
----------
name
--------------------------------------------------------------------------------
progress_rank
-------------
	12
Drafting Work Order
	 1000


SQL>
My various settings files look as follows:

/etc/odbc.ini :
[lims]
driver=MySQL
database=lims
server=dbserv
port=3306
user=root
password=*******
charset=latin1
/etc/odbcinst.ini :
[MySQL]
Description		= ODBC for Mysql
Driver64		= /usr/lib64/libmyodbc5.so
FileUsage		= 1
$ORACLE_HOME/hs/admin/initLIMS.ora :
HS_FDS_CONNECT_INFO = LIMS
HS_FDS_TRACE_LEVEL = 255
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
HS_NLS_NCHAR=UCS2

#
# ODBC specific environment variables
#
set ODBCINI=/etc/odbc.ini
set SQL_MODE='ANSI_QUOTES'
[url http://pastie.org/private/mx2whunhvkknurmcc02qa]Here is a trace file for the sql
select * from "status"@mysql where "status_id" < 3
Any help would be greatly appreciated!!

Edited by: helgew on Aug 24, 2011 11:55 AM
This post has been answered by Kgronau-Oracle on Aug 24 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2012
Added on Aug 19 2011
26 comments
24,260 views