Dblink mysql 5
I have installed a dblink to mysql database. Using this dblink I can access to the tables but only to the numeric fields!
if you have solution to my problem please help me
thanks
I use:
- orable 9.2 and mysql 5.1
Error No 1:
using the following sql statement(SELECT ID1, NAME, LASTNAME FROM CUSTOMER@DLINK1) with
or without surrounding field names with double or single quotes and with or without using
table and column aliases produces the coming error in short and statement fails to return
any data :
{Error encountered ORA-00904 : "FIELD NAME": invalid identifier}
using the following sql statement(SELECT * FROM CUSTOMER@DLINK1) with or without using
table aliases produces the coming results :
Returns only the data from the integer typed field(ID1).
Error No 2:
Suppose the table trying to access its data has the following layout:
oracle database link name : DLINK1
table name : customer
fields : name -> varchar(30), lastname -> varchar(40)
using the following sql statement(SELECT ID1, NAME, LASTNAME FROM CUSTOMER@DLINK1) with
or without surrounding field names with double or single quotes and with or without using
table and column aliases produces the coming error in short and statement fails to return
any data :
{Error encountered ORA-00942 : table or view does not exist }
The same is true for the following sql statement : (SELECT * FROM CUSTOMER@DLINK1)solution:
change the character set settings to "utf8" of mysql odbc driver
through "Details -> Misc Options"
refer: http://bugs.mysql.com/bug.php?id=47680
Similar Messages
-
Problem by doing a query on MySQL using dblink
Good Morning,well,the DBLink works perfectly,but if the field in the MySQL DB is type TEXT(CLOB) throw the next error:
ORA-28500: la conexión de ORACLE a un sistema no Oracle ha devuelto este mensaje:
[Generic Connectivity Using ODBC]DRV_BlobRead: DB_ODBC_ENGINE (1489): ; [MySQL][ODBC 5.1 Driver][mysqld-5.1.30]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"CUSTOM_VALUES" WHERE "id"=16' at line 1 (SQL State: 37000; SQL Code: 1064)
ORA-02063: 2 lines precediendo a MYSQLDB
28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
*Cause: The cause is explained in the forwarded message.
*Action: See the non-Oracle system's documentation of the forwarded
message
Thank you
Edited by: 812419 on 18-ene-2011 0:41Hi,
You are hitting a known problem with the MySQL ODBC driver and 10g HSODBC which is discussed in this note on My Oracle Support -
Problems Selecting Mysql Blob Data Using Hsodbc - Error In Your SQL Syntax (Doc ID 739274.1)
There are 3 workrounds -
a) convert the affected column to a char or varchar column in MySQL.
b) use the Openlink ODBC driver. This is available from -
http://download.openlinksw.com/
c) create a view in MySQL which uses the 'CAST' function to convert the affected column to char. As an
example for a BLOB -
create view test_blob_v as select col1, cast(col2 as char) as col2 from test_blob ;
Then select from the view in Oracle -
select * from test_blob_v@mysql ;
========
If you are using 10g HSODBC you should migrate to 11g Database Gateway for ODBC (DG4ODBC) as 10g HSODBC is now desupported and DG4ODBC is the replacement product.
Regards,
Mike -
Oracle dblink to mysql in Linux machines
Hi,
I want to make a dblink between to linux machines, one with oracle 11g database and the other with MySQL 5.0.77 database. The objective is to create triggers on a few tables in the oracle side and automatically synchronize it with same other tables in the mysql side. Can someone explain me how to accomplish this?
Thanks in advance
Edited by: 859234 on 18/Mai/2011 7:23Hi,
To connect to MySQL from Oracle you can use the Database Gateway for ODBC (DG4ODBC). There are various notes available in My Oracle Support which give details of the setup -
Note.1083703.1 Master Note for Oracle Gateway Products
Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX)
Once you have the gateway installed and configured you can refer to MySQL tables in the triggers using the gateway database link.
However, you need to be aware that DG4ODBC does not support distributed transactions so you would need to have a commit between any Oracle updates and updates to MySQL in the trigger, so you would need to be careful about error checking.
Regards,
Mike -
Query from oracle to MySql using dblink fetch all the rows in MySql table
Hello,
I am using Heterogeneous connectivity between oracle 10204 to Mysql database.
I have a database link in the oracle side .
I am query a table in MySql that have 10 million rows.
Its doesnt matter if i am running :
select * from "CDR_Accounts"@mysql where "id"=7675405;
or
select * from "CDR_Accounts"@mysql ;
There is an index on the id column.
Yet, it seems that the Mysql is feteching all the rows from the table , all the data is transfering to oracle over the dblink , and only after that the requested rows are get back to the client.
The /etc/odbcinst.ini file is as follow:
[odbcprd:oracle@odbc /software/oracle]$ cat /etc/odbcinst.ini
[myodbc3]
Description = Mysql connector to mysql version 3.5
Driver = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3-3.51.25.so
Driver64 = /usr/lib
Setup = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3S-3.51.25.so
Setup64 = /usr/lib
UsageCount = 1
CPTimeout = 3600
CPReuse = Please advice
ThanksWhen using a gateway it is always possible that a where clause is not sent to the remote database. This is called post processing and depends on several factors like the used ODBC driver, the columns and its data types but also if you specify certain functions in the where clause.
The fastest way to see if post processing happens is in Oracle 11g the explain plan for a query. In 10g the plan does not always match the statement sent to the foreign database. Here it would be better to enable gateway tracing and setting the trace level to ON. This will log the statements sent to the foreign database and you can compare what statement was sent with the statement you've tried to execute. -
How to create dblink between oracle 10G and mysql
I want to create dblink between oracle 10G and mysql
I create it in ECC6.0 using DBCO transaction tcode,which database type can choose?Microsoft sql server?Because there have no mysql item.
I choosed MSS so that I can test it, but it failed,there is an error that 'ORA-12569:TNS:packet checksun failure'.
I configured the oracle tnsnames.ora file like this:
CW.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP,WORLD)
(PROTOCOL = TCP)
(HOST = XX.XX.XX.XX)
(PORT = XXXX)
(CONNECT_DATA =
(SID = XXX )
(HS = ok )
When I tnsping CW,it will fail,like this " TNS-12569:TNS:packet checksum failure"
How can I do.I want to know if this possible?
-
Hi.
I made a dblink in an Oracle db to a MySQL db. This works ok. But when i want to query in a table with a lot of records (the biggest one has about 250 million records), it takes a long time to return something. Like hours. Or nothing at all.
When i do the same query in Access with a MySQL ODBC driver, it shows results in seconds. Also with another tool direct on the MySQL db.
How can i make it to perform?
Thankx.I made a dblink in an Oracle db to a MySQL db. This
works ok. But when i want to query in a table with aHow is that possible? My understanding is that a database link could only be to another oracle
database unless you used a transparent gateway. -
Error while accessing DBlink to mysql
Getting following error (trace file content) when querying suing the DB link (select * from "DeviceWindows_Devices"@monolith2.us.oracle.com;)
table: DeviceWindows_Devices
Entered hgopcda at 2012/11/15-18:56:59
Column:1(WindowID): dtype:4 (INTEGER), prc/scl:10/0, nullbl:0, octet:0, sign:1, radix:10
Exiting hgopcda, rc=0 at 2012/11/15-18:56:59
Entered hgopcda at 2012/11/15-18:56:59
Column:2(DeviceID): dtype:4 (INTEGER), prc/scl:10/0, nullbl:0, octet:0, sign:1, radix:10
Exiting hgopcda, rc=0 at 2012/11/15-18:56:59
The hoada for table DeviceWindows_Devices follows...
hgodtab, line 651: Printing hoada @ 0x281a100
MAX:2, ACTUAL:2, BRC:1, WHT=6 (TABLE_DESCRIBE)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER N 4 4 0/ 0 0 0 0 WindowID
4 INTEGER N 4 4 0/ 0 0 0 0 DeviceID
Exiting hgodtab, rc=0 at 2012/11/15-18:56:59
Entered hgodafr, cursor id 0 at 2012/11/15-18:56:59
Exiting hgodafr, rc=0 at 2012/11/15-18:56:59
Entered hgopars, cursor id 1 at 2012/11/15-18:56:59
type:0
SQL text from hgopars, id=1, len=60 ...
00: 53454C45 43542041 312E5769 6E646F77 [SELECT A1.Window]
10: 49442C41 312E4465 76696365 49442046 [ID,A1.DeviceID F]
20: 524F4D20 44657669 63655769 6E646F77 [ROM DeviceWindow]
30: 735F4465 76696365 73204131 [s_Devices A1]
Exiting hgopars, rc=0 at 2012/11/15-18:56:59
Entered hgoopen, cursor id 1 at 2012/11/15-18:56:59
hgoopen, line 83: NO hoada to print
Exiting hgoopen, rc=0 at 2012/11/15-18:56:59
Entered hgodscr, cursor id 1 at 2012/11/15-18:56:59
Entered hgopcda at 2012/11/15-18:56:59
Column:1(WindowID): dtype:4 (INTEGER), prc/scl:10/0, nullbl:0, octet:0, sign:0, radix:0
Exiting hgopcda, rc=0 at 2012/11/15-18:56:59
Entered hgopcda at 2012/11/15-18:56:59
Column:2(DeviceID): dtype:4 (INTEGER), prc/scl:10/0, nullbl:0, octet:0, sign:0, radix:0
Exiting hgopcda, rc=0 at 2012/11/15-18:56:59
Entered hgopoer at 2012/11/15-18:56:59
hgopoer, line 159: got native error 0 and sqlstate HY092; message follows...
[unixODBC][Driver Manager]Invalid attribute/option identifier
Exiting hgopoer, rc=0 at 2012/11/15-18:56:59
hgodscr, line 456: calling SQLSetStmtAttr got sqlstate HY092
hgodscr, line 506: NO hoada to print
Exiting hgodscr, rc=28500 at 2012/11/15-18:56:59 with error ptr FILE:hgodscr.c LINE:456 FUNCTION:hgodscr() ID:Set array fetch size
Driver : ODBC 5.2(w) Driver
Oracle Database: 11.1.0.7
Mysql Database: 5.5.20
Able to connect from isql and select commands also works fine from there
-bash-3.2$ isql -v monolith_itasmon
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
Please help in resolving this, thanks in advance.
Thanks,
Vani
Edited by: user580543 on Nov 16, 2012 2:10 AMHi ,
Sorry for the delay.
Please find the trace file.
Thanks,
Vani
[ODBC][26106][__handles.c][444]
Exit:[SQL_SUCCESS]
Environment = 0x532c160
[ODBC][26106][SQLSetEnvAttr.c][182]
Entry:
Environment = 0x532c160
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = -6
[ODBC][26106][SQLSetEnvAttr.c][349]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 0x532c160
[ODBC][26106][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 0x5361780
[ODBC][26106][SQLSetConnectAttr.c][318]
Entry:
Connection = 0x5361780
Attribute = SQL_ATTR_AUTOCOMMIT
Value = (nil)
StrLen = -5
[ODBC][26106][SQLSetConnectAttr.c][500]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLDriverConnect.c][678]
Entry:
Connection = 0x5361780
Window Hdl = (nil)
Str In = [DSN=MONOLITH_ITASMON;UID=itasmon;PWD=********][length = 45]
Str Out = 0x5363848
Str Out Max = 1024
Str Out Ptr = 0x7fffe146fe44
Completion = 0
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
[ODBC][26106][SQLDriverConnect.c][1487]
Exit:[SQL_SUCCESS]
Connection Out [[DSN=MONOLITH_ITASMON;UID=itasmon;PWD=********][length = 45 (SQL_NTS)]]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_DRIVER_NAME (6)
Info Value = 0x7fffe146fb20
Buffer Length = 512
StrLen = 0x7fffe146fe48
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_DRIVER_VER (7)
Info Value = 0x7fffe146fb20
Buffer Length = 512
StrLen = 0x7fffe146fe48
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_DBMS_NAME (17)
Info Value = 0x7fffe146fb20
Buffer Length = 512
StrLen = 0x7fffe146fe48
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_DBMS_VER (18)
Info Value = 0x7fffe146fb20
Buffer Length = 512
StrLen = 0x7fffe146fe48
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_CATALOG_NAME (10003)
Info Value = 0x7fffe146fe90
Buffer Length = 512
StrLen = 0x7fffe1470124
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_IDENTIFIER_QUOTE_CHAR (29)
Info Value = 0x7fffe146fd60
Buffer Length = 512
StrLen = 0x7fffe147021c
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_COLUMN_ALIAS (87)
Info Value = 0x7fffe146fd60
Buffer Length = 512
StrLen = 0x7fffe147021c
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_NO_DATA]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_INTEGER
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_SMALLINT
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_NO_DATA]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_SMALLINT
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_VARBINARY
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_NO_DATA]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_BIGINT
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_NO_DATA]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_BIGINT
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_TINYINT
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_NO_DATA]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_TINYINT
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_LONGVARCHAR
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetTypeInfo.c][164]
Entry:
Statement = 0x538ae20
Data Type = SQL_LONGVARBINARY
[ODBC][26106][SQLGetTypeInfo.c][314]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 2
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLEndTran.c][315]
Entry:
Connection = 0x5361780
Completion Type = 0
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_CURSOR_COMMIT_BEHAVIOR (23)
Info Value = 0x7fffe14700de
Buffer Length = 8
StrLen = 0x7fffe14700dc
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLEndTran.c][488]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_TXN_CAPABLE (46)
Info Value = 0x7fffe1470274
Buffer Length = 2
StrLen = 0x7fffe1470278
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLGetInfo.c][214]
Entry:
Connection = 0x5361780
Info Type = SQL_TXN_ISOLATION_OPTION (72)
Info Value = 0x7fffe1470270
Buffer Length = 4
StrLen = 0x7fffe1470278
[ODBC][26106][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLSetConnectAttr.c][318]
Entry:
Connection = 0x5361780
Attribute = SQL_ATTR_TXN_ISOLATION
Value = 0x2
StrLen = -5
[ODBC][26106][SQLSetConnectAttr.c][671]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeHandle.c][365]
Entry:
Handle Type = 3
Input Handle = 0x538ae20
[ODBC][26106][SQLFreeHandle.c][462]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLAllocHandle.c][510]
Entry:
Handle Type = 3
Input Handle = 0x5361780
[ODBC][26106][SQLAllocHandle.c][872]
Exit:[SQL_SUCCESS]
Output Handle = 0x538ae20
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 4
Target Type = 1 SQL_CHAR
Target Value = 0x7fffe1470028
Buffer Length = 124
StrLen Or Ind = 0x7fffe1470110
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 5
Target Type = -15 SQL_C_SSHORT
Target Value = 0x7fffe14701c0
Buffer Length = 0
StrLen Or Ind = (nil)
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 6
Target Type = 1 SQL_CHAR
Target Value = 0x7fffe146ffb0
Buffer Length = 120
StrLen Or Ind = 0x7fffe1470108
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 7
Target Type = -16 SQL_C_SLONG
Target Value = 0x7fffe14701a8
Buffer Length = 0
StrLen Or Ind = 0x7fffe1470130
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 9
Target Type = -15 SQL_C_SSHORT
Target Value = 0x7fffe14701cc
Buffer Length = 0
StrLen Or Ind = 0x7fffe1470128
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 10
Target Type = -15 SQL_C_SSHORT
Target Value = 0x7fffe14701c4
Buffer Length = 0
StrLen Or Ind = 0x7fffe1470120
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 11
Target Type = -15 SQL_C_SSHORT
Target Value = 0x7fffe14701c8
Buffer Length = 0
StrLen Or Ind = (nil)
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLBindCol.c][165]
Entry:
Statement = 0x538ae20
Column Number = 16
Target Type = -16 SQL_C_SLONG
Target Value = 0x7fffe14701a4
Buffer Length = 0
StrLen Or Ind = 0x7fffe1470118
[ODBC][26106][SQLBindCol.c][251]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLColumns.c][208]
Entry:
Statement = 0x538ae20
Catalog Name = [NULL]
Schema Name = [itasmon][length = 7]
Table Name = [DeviceWindows_Devices][length = 21]
Column Type = [NULL]
[ODBC][26106][SQLColumns.c][405]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFetch.c][158]
Entry:
Statement = 0x538ae20
[ODBC][26106][SQLFetch.c][340]
Exit:[SQL_NO_DATA]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 0
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLFreeStmt.c][140]
Entry:
Statement = 0x538ae20
Option = 2
[ODBC][26106][SQLFreeStmt.c][246]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLAllocHandle.c][510]
Entry:
Handle Type = 3
Input Handle = 0x5361780
[ODBC][26106][SQLAllocHandle.c][872]
Exit:[SQL_SUCCESS]
Output Handle = 0x53bdd30
[ODBC][26106][SQLPrepare.c][189]
Entry:
Statement = 0x53bdd30
SQL = [SELECT A1.WindowID,A1.DeviceID FROM DeviceWindows_Devices A1][length = 60]
[ODBC][26106][SQLPrepare.c][364]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLNumResultCols.c][149]
Entry:
Statement = 0x53bdd30
Column Count = 0x532c880
[ODBC][26106][SQLNumResultCols.c][234]
Exit:[SQL_SUCCESS]
Count = 0x532c880 -> 2
[ODBC][26106][SQLExecute.c][183]
Entry:
Statement = 0x53bdd30
[ODBC][26106][SQLExecute.c][344]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLDescribeCol.c][231]
Entry:
Statement = 0x53bdd30
Column Number = 1
Column Name = 0x7fffe146ff00
Buffer Length = 30
Name Length = 0x7fffe1470044
Data Type = 0x7fffe1470040
Column Size = 0x7fffe146ffe8
Decimal Digits = 0x7fffe147003c
Nullable = 0x7fffe1470038
[ODBC][26106][SQLDescribeCol.c][474]
Exit:[SQL_SUCCESS]
Column Name = [WindowID]
Data Type = 0x7fffe1470040 -> 4
Column Size = 0x7fffe146ffe8 -> 10
Decimal Digits = 0x7fffe147003c -> 0
Nullable = 0x7fffe1470038 -> 0
[ODBC][26106][SQLColAttribute.c][277]
Entry:
Statement = 0x53bdd30
Column Number = 1
Field Identifier = SQL_DESC_UNSIGNED
Character Attr = (nil)
Buffer Length = 0
String Length = (nil)
Numeric Attribute = 0x7fffe146fff0
[ODBC][26106][SQLColAttribute.c][648]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLDescribeCol.c][231]
Entry:
Statement = 0x53bdd30
Column Number = 2
Column Name = 0x7fffe146ff00
Buffer Length = 30
Name Length = 0x7fffe1470044
Data Type = 0x7fffe1470040
Column Size = 0x7fffe146ffe8
Decimal Digits = 0x7fffe147003c
Nullable = 0x7fffe1470038
[ODBC][26106][SQLDescribeCol.c][474]
Exit:[SQL_SUCCESS]
Column Name = [DeviceID]
Data Type = 0x7fffe1470040 -> 4
Column Size = 0x7fffe146ffe8 -> 10
Decimal Digits = 0x7fffe147003c -> 0
Nullable = 0x7fffe1470038 -> 0
[ODBC][26106][SQLColAttribute.c][277]
Entry:
Statement = 0x53bdd30
Column Number = 2
Field Identifier = SQL_DESC_UNSIGNED
Character Attr = (nil)
Buffer Length = 0
String Length = (nil)
Numeric Attribute = 0x7fffe146fff0
[ODBC][26106][SQLColAttribute.c][648]
Exit:[SQL_SUCCESS]
[ODBC][26106][SQLSetStmtAttr.c][243]
Entry:
Statement = 0x53bdd30
Attribute = SQL_ATTR_ROW_ARRAY_SIZE
Value = 0x1
StrLen = 0
[ODBC][26106][SQLSetStmtAttr.c][636]Error: HY092
[ODBC][26106][SQLGetDiagRec.c][710]
Entry:
Statement = 0x53bdd30
Rec Number = 1
SQLState = 0x7fffe146fe48
Native = 0x7fffe146fec0
Message Text = 0x7fffe146fc30
Buffer Length = 510
Text Len Ptr = 0x7fffe146fec4
[ODBC][26106][SQLGetDiagRec.c][747]
Exit:[SQL_SUCCESS]
SQLState = HY092
Native = 0x7fffe146fec0 -> 0
Message Text = [[unixODBC][Driver Manager]Invalid attribute/option identifier]
[ODBC][26106][SQLGetDiagRec.c][710]
Entry:
Statement = 0x53bdd30
Rec Number = 2
SQLState = 0x7fffe146fe48
Native = 0x7fffe146fec0
Message Text = 0x7fffe146fc30
Buffer Length = 510
Text Len Ptr = 0x7fffe146fec4
[ODBC][26106][SQLGetDiagRec.c][747]
Exit:[SQL_NO_DATA] -
Dblink from Oracle to Mysql error PLZ HELP!!!
Hi All,
I am getting the following error when i am creating a databaselink to connect from oracle 10g to mysql 5.1.
SQL> select * from ahmed_table@ahmedmysql3;
select * from ahmed_table@ahmedmysql3
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from AHMEDMYSQL3My ODBC database source name is ahmedmysql
created file initahmedmysql.ora in hs/admin contents of which are
HS_FDS_CONNECT_INFO = ahmedmysql
HS_FDS_TRACE_LEVEL = offListener.ora contents
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
hmedmysql =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rc-6799)(PORT = 1521))
(SID_NAME = ahmedmysql)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = hsodbc)
)Tnsnames.ora
ahmedmysql = (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST = RC-6799)(PORT = 1521)) (CONNECT_DATA = (SID = ahmedmysql)) (HS = OK))I have searched on this site no one seems to have had found a solution!
Is this a bug or am i missing something in the configuration,
appreciate your help,
regards,28545, 0000, "error diagnosed by Net8 when connecting to an agent"
// *Cause: An attempt to call an external procedure or to issue SQL
// to a non-Oracle system on a Heterogeneous Services database link
// failed at connection initialization. The error diagnosed
// by Net8 NCR software is reported separately.
// *Action: Refer to the Net8 NCRO error message. If this isn't clear,
// check connection administrative setup in tnsnames.ora
// and listener.ora for the service associated with the
// Heterogeneous Services database link being used, or with
// 'extproc_connection_data' for an external procedure call. -
Error connecting to mysql via ODBC
Hi folks,
I set up Oracle Database Gateway for ODBC with mysql driver (I tried mysql-connector-odbc-5.1.11-1.x86_64.rpm (currently used and log output shown) and mysql-connector-odbc-5.2.2-1.x86_64.rpm). I am unable to create a connection to the mysql database.
Here are the parameters:
Oracle database: 11gR2, AL32UTF8 , Suse SLES11 64 Bit
Oracle Database Gateway for ODBC: installed on Suse SLES10, 64 Bit
ODBC DSN: ona_nb
initona_nb.ora in /opt/oracle/product/11.2.0/gtw_odbc/hs/admin:
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO=ona_nb
HS_FDS_TRACE_LEVEL=255
HS_FDS_SHAREABLE_NAME =/usr/lib64/libmyodbc5.so
HS_LANGUAGE=AMERICAN_AMERICA.ISO8859P1
#HS_TRANSACTION_MODEL=READ_ONLY
#HS_FDS_SQLLEN_INTERPRETATION=32
# ODBC specific environment variables
set ODBCINI=/home/oracle/odbc/ona_nb-odbc.ini
set ODBCINSTINI=/home/oracle/odbc/ona_nb-odbc.ini
(I tried diffenet Language settings or no language setting at all, slightly different ..../hs/log trace files)
ODBC file:
ona_nb-odbc.ini :
[ODBC Data Sources]
ona_nb= MySQL ODBC Driver 5.2.2-1
[ona_nb]
Driver = /usr/lib64/libmyodbc5.so
DATABASE = ona_default
DESCRIPTION = MySQL Verbindung zur ona V11 Datenbank auf Christians Notebook
PORT = 3306
SERVER = cwolbert.gsi.de
UID = oreader
PWD = xxxxxx
[ODBC]
TRACEFILE = /tmp/mysql-odbc-ona_nb.trc
TRACE = Yes
ForceTrace = Yes
set LD_LIBRARY_PATH=/usr/lib64:/opt/oracle/product/11.2.0/gtw_odbc/
Listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/11.2.0/dbhome_3)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = gridrep.gsi.de)
(ORACLE_HOME = /opt/oracle/product/11.2.0/dbhome_3)
(SID_NAME = gridrep)
(SID_DESC=
(SID_NAME=ona_nb)
(ORACLE_HOME=/opt/oracle/product/11.2.0/gtw_odbc)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/usr/lib64:/opt/oracle/product/11.2.0/gtw_odbc/lib)
Trying
select * from locations@ona_nb
whre ona_nb is the dblink
CREATE DATABASE LINK "ONA_NB.GSI.DE"
CONNECT TO OREADER
IDENTIFIED BY <PWD>
USING 'ona_nb';
I get the error
ORA-28511: RPC-Verbindung zu heterogenem Remote Agent mit SID=ORA-28511: RPC-Verbindung zu heterogenem Remote Agent mit SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pcora11.gsi.de)(PORT=1521))(CONNECT_DATA=(SID=ona_nb))) abgebrochen abgebrochen
ORA-02063: vorherige line von ONA_NB
and here is the trace file from hs/log. I am unable to create any ODBC trace file, fiddling around with differnt settings
Oracle Corporation --- FRIDAY NOV 23 2012 15:37:21.114
Heterogeneous Agent Release
11.2.0.1.0
Oracle Corporation --- FRIDAY NOV 23 2012 15:37:21.113
Version 11.2.0.1.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "255"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
setting HS_IDLE_TIMEOUT to default of 0
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "AL32UTF8"
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "ona_nb"
Product-Info:
Port Rls/Upd:1/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:ona_nb
Exiting hgogprd, rc=0
hostmstr: 0: HOA After hoagprd
hostmstr: 0: HOA Before hoainit
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=873
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=873
HOCXU_SEM_VER=112000
Entered hgolofn at 2012/11/23-15:37:21
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/libmyodbc5.so"
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLAllocHandle
symbol_peflctx=0xaab3f456
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLBindCol
symbol_peflctx=0xaab44ce3
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLBindParameter
symbol_peflctx=0xaab4342c
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLCancel
symbol_peflctx=0xaab3e6e5
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLDescribeParam
symbol_peflctx=0xaab4346b
.... many similar stuff
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLStatisticsW
symbol_peflctx=0xaab477de
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLTablesW
symbol_peflctx=0xaab47a16
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Exiting hgolofn, rc=0 at 2012/11/23-15:37:21
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
Invalid value of 64 given for HS_FDS_SQLLEN_INTERPRETATION
treat_SQLLEN_as_compiled = 1
Exiting hgoinit, rc=0 at 2012/11/23-15:37:21
hostmstr: 0: HOA After hoainit
hostmstr: 0: HOA Before hoalgon
Entered hgolgon at 2012/11/23-15:37:21
reco:0, name:OREADER, tflag:0
Entered hgosuec at 2012/11/23-15:37:21
Exiting hgosuec, rc=0 at 2012/11/23-15:37:21
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using OREADER as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2012/11/23-15:37:21
HS_FDS_CONNECT_INFO = "ona_nb"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2012/11/23-15:37:21
dsn:ona_nb, name:OREADER
optn:
Entered hgocip at 2012/11/23-15:37:21
dsn:ona_nb
Exiting hgocip, rc=0 at 2012/11/23-15:37:21
##>Connect Parameters (len=33)<##
## DSN=ona_nb;
#! UID=OREADER;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2012/11/23-15:37:21
Entered hgopoer at 2012/11/23-15:37:21
hgopoer, line 233: got native error 0 and sqlstate H; message follows...
Exiting hgopoer, rc=0 at 2012/11/23-15:37:21
hgocont, line 2752: calling SqlDriverConnect got sqlstate H
Using no HS_LANGUAGE or HS_LANGUAGE=AMERICAN_AMERICA.AL32UTF8
I still get the same error meassages and logs.
Can you help please?
Cheers MichaelHi Klaus,
I think the unixODBC driver manager is installed
I have:
oracle@pcora11:/opt/oracle/product/11.2.0/gtw_odbc/hs/log> odbcinst -j
unixODBC 2.2.11
DRIVERS............: /etc/unixODBC/odbcinst.ini
SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini
USER DATA SOURCES..: /home/oracle/.odbc.ini
and
cat /etc/unixODBC/odbcinst.ini
[MySQL ODBC 5.1 Driver]
Driver = /usr/lib64/libmyodbc5.so
UsageCount = 1
but the two file for SYSTEM and USER DSN are empty.
I tried now:
HS_FDS_SHAREABLE_NAME =/usr/lib64/libodbc.so
and
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
and the result is still the same, what I posted in the prevoius answer to Mike,
ORA-28500: Verbindung von ORACLE zu Fremdsystem gab diese Nachricht zur³ck:
[unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user
'OREADER'@'pcora11.gsi.de' (using password: YES) {HY000,NativeErr = 1045}
ORA-02063: vorherige 2 lines von ONA_NB
and in the trace file:
##>Connect Parameters (len=33)<##
## DSN=ona_nb;
#! UID=OREADER;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2012/11/26-13:25:50
Entered hgopoer at 2012/11/26-13:25:50
hgopoer, line 233: got native error 1045 and sqlstate HY000; message follows...
[unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user 'OREADER'@'pcora11.gsi.de' (using password: YES) {HY000,NativeErr = 1045}
Exiting hgopoer, rc=0 at 2012/11/26-13:25:50
hgocont, line 2752: calling SqlDriverConnect got sqlstate HY000
Exiting hgocont, rc=28500 at 2012/11/26-13:25:50 with error ptr FILE:hgocont.c LINE:2772 FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2012/11/26-13:25:50 with error ptr FILE:hgolgon.c LINE:781 FUNCTION:hgolgon() ID:Calling hgocont
hostmstr: 0: HOA After hoalgon
RPC Calling nscontrol(0), rc=0
hostmstr: 0: RPC Before Exit Agent
hostmstr: 0: HOA Before hoaexit
Entered hgoexit at 2012/11/26-13:25:50
Exiting hgoexit, rc=0
hostmstr: 0: HOA After hoaexit
hostmstr: 0: RPC After Exit Agent
Even if I copy the content of ona_nb-odbc.ini file to /etc/unixODBC/obc.ini
I still get the same error.
Any ideas?
Michael -
Need Help Connect to MySQL using dg4odbc
I am looking for some help getting a dblink working from my Oracle 11.1.0.6 Dtabase to a MySQL 5.0.77 Database (Holds Bugzilla).
This is the error I get when I try select * from "bugs"@bugz;
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[MySQL][ODBC 5.1 Driver][mysqld-5.0.77]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"bug_id" FROM "bugs" A1' at line 1
ORA-02063: preceding 2 lines from BUGZ
On Server hosting Oracle DB:
lsb_release -id
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.7 (Tikanga)
rpm -qa|grep mysql
mysql-connector-odbc-5.1.8-1.rhel5
mysql-5.0.77-4.el5_6.6
tnsping BUGZ
TNS Ping Utility for Linux: Version 11.1.0.6.0 - Production on 08-DEC-2011 07:53:52
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SID = BUGZ)) (HS = OK))
OK (0 msec)
tnsnames.ora
BUGZ =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SID = BUGZ)
(HS = OK)
)listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u00/app/oracle/product/11.1.0/db_1)
(SID_NAME = BUGZ)
(PROGRAM = dg4odbc)
(ENVS ="LD_LIBRARY_PATH=/u00/app/oracle/product/11.1.0/db_1/lib:/usr/lib64:/usr/lib")
.../u00/app/oracle/product/11.1.0/db_1/hs/admin/initbugz.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO=bugz
HS_FDS_TRACE_LEVEL=off
HS_FDS_SHAREABLE_NAME=/usr/lib64/libmyodbc5.so
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P15
# ODBC specific environment variables
set ODBCINI=/u00/home/oracle/.odbc.ini
# Environment variables required for the non-Oracle system
set HOME=/u00/home/oracle
~/u00/home/oracle/.odbc.ini
[ODBC Data Sources]
[bugz]
Driver = /usr/lib64/libmyodbc5.so
DATABASE = bugzilla
DESCRIPTION = MySQL ODBC 5.x Connector
PORT = 3306
SERVER = bugzilla
UID = bugquery
PWD = password
CHARSET = latin1
TRACEFILE = /tmp/myodbc-bugzdsn.trc
TRACE = OFFODBC Test
isql -v bugz
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> help bugs
[Bunch of stuff omitted]
SQLRowCount returns 31
31 rows fetched
SQL>I did the delete and reconnected and the rows where created again.
I am testing with two SQL statements right now from TOAD and from SQLPlus.
A. select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to", dump(bugs."short_desc") from "bugs"@BUGZ bugs where "bug_id" = 2;
B. select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to" from "bugs"@BUGZ bugs
When I issue "A" I get good looking results. When I issue "B" I get an error.
SQL> select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to", dump(bugs."short_desc") from "bugs"@BUGZ bugs where "bug_id" = 2;
TICKET
short_desc
STATUS assigned_to
DUMP(BUGS."SHORT_DESC")
2
COMA computer has updates set to auto install please disable and allow me to ch
oose
CLOSED 8
Typ=1 Len=168: 0,67,0,79,0,77,0,65,0,32,0,99,0,111,0,109,0,112,0,117,0,116,0,101
TICKET
short_desc
STATUS assigned_to
DUMP(BUGS."SHORT_DESC")
,0,114,0,32,0,104,0,97,0,115,0,32,0,117,0,112,0,100,0,97,0,116,0,101,0,115,0,32,
0,115,0,101,0,116,0,32,0,116,0,111,0,32,0,97,0,117,0,116,0,111,0,32,0,105,0,110,
0,115,0,116,0,97,0,108,0,108,0,32,0,32,0,112,0,108,0,101,0,97,0,115,0,101,0,32,0
,100,0,105,0,115,0,97,0,98,0,108,0,101,0,32,0,97,0,110,0,100,0,32,0,97,0,108,0,1
08,0,111,0,119,0,32,0,109,0,101,0,32,0,116,0,111,0,32,0,99,0,104,0,111,0,111,0,1
TICKET
short_desc
STATUS assigned_to
DUMP(BUGS."SHORT_DESC")
15,0,101
SQL> select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to" from "bugs"@BUGZ bugs;
ERROR:
ORA-28528: Heterogeneous Services datatype conversion error
ORA-02063: preceding line from BUGZ
no rows selectedThe bugs table looks like this:
CREATE TABLE `bugs` (
`bug_id` mediumint(9) NOT NULL auto_increment,
`assigned_to` mediumint(9) NOT NULL,
`bug_file_loc` mediumtext,
`bug_severity` varchar(64) NOT NULL,
`bug_status` varchar(64) NOT NULL,
`creation_ts` datetime default NULL,
`delta_ts` datetime NOT NULL,
`short_desc` varchar(255) NOT NULL,
`op_sys` varchar(64) NOT NULL,
`priority` varchar(64) NOT NULL,
`product_id` smallint(6) NOT NULL,
`rep_platform` varchar(64) NOT NULL,
`reporter` mediumint(9) NOT NULL,
`version` varchar(64) NOT NULL,
`component_id` smallint(6) NOT NULL,
`resolution` varchar(64) NOT NULL default '',
`target_milestone` varchar(20) NOT NULL default '---',
`qa_contact` mediumint(9) default NULL,
`status_whiteboard` mediumtext NOT NULL,
`votes` mediumint(9) NOT NULL default '0',
`lastdiffed` datetime default NULL,
`everconfirmed` tinyint(4) NOT NULL,
`reporter_accessible` tinyint(4) NOT NULL default '1',
`cclist_accessible` tinyint(4) NOT NULL default '1',
`estimated_time` decimal(7,2) NOT NULL default '0.00',
`remaining_time` decimal(7,2) NOT NULL default '0.00',
`deadline` datetime default NULL,
`alias` varchar(20) default NULL,
`cf_type` varchar(64) NOT NULL default '---',
`cf_notes` mediumtext,
`keywords` mediumtext NOT NULL,
PRIMARY KEY (`bug_id`),
UNIQUE KEY `bugs_alias_idx` (`alias`),
KEY `bugs_assigned_to_idx` (`assigned_to`),
KEY `bugs_creation_ts_idx` (`creation_ts`),
KEY `bugs_delta_ts_idx` (`delta_ts`),
KEY `bugs_bug_severity_idx` (`bug_severity`),
KEY `bugs_bug_status_idx` (`bug_status`),
KEY `bugs_op_sys_idx` (`op_sys`),
KEY `bugs_priority_idx` (`priority`),
KEY `bugs_product_id_idx` (`product_id`),
KEY `bugs_reporter_idx` (`reporter`),
KEY `bugs_version_idx` (`version`),
KEY `bugs_component_id_idx` (`component_id`),
KEY `bugs_resolution_idx` (`resolution`),
KEY `bugs_target_milestone_idx` (`target_milestone`),
KEY `bugs_qa_contact_idx` (`qa_contact`),
KEY `bugs_votes_idx` (`votes`),
CONSTRAINT `fk_bugs_assigned_to_profiles_userid` FOREIGN KEY (`assigned_to`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE,
CONSTRAINT `fk_bugs_component_id_components_id` FOREIGN KEY (`component_id`) REFERENCES `components` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_bugs_product_id_products_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_bugs_qa_contact_profiles_userid` FOREIGN KEY (`qa_contact`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE,
CONSTRAINT `fk_bugs_reporter_profiles_userid` FOREIGN KEY (`reporter`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4570 DEFAULT CHARSET=utf8;Edited by: Sky13 on Dec 22, 2011 1:36 PM -
Access MySQL from Oracle Tnsping problem.
Dears
I am trying to connect to MysqlDB from Oracle.
I have installed Oracle Gateway and ODBC diver on Linux server.
Oracle gateway was installed on same server with Oracle Database but in different home and it has a different listener.
please look at my configuration files which I have created and maintained to established connections to MySqlDB.
I think I did some mistake and seize up in it so I could not find a solution. I am trying to fix it as well but if somebody can help me it will be very nice.
Gateway version is 11.2.0.3.0 and it is on ORAHOME /oracle/11203/GTW and its listener port is 1522.
I am able to tnsping port 1522 (dg4odbc) from gateways home. Gateway configuration files are below.
####/etc/odbc.ini####
[ODBC Data Sources]
MySQL = MySQL ODBC Driver 5.2
[MySQL]
Driver = /usr/lib64/libmyodbc5a.so
DATABASE = veritabani
DESCRIPTION = MySQL ODBC 5.2 Driver
PORT = nnnn
SERVER = x.x.x.x
UID = kullanici
PWD = sifre
CHARSET = latin1
TRACEFILE = /tmp/myodbc-demodsn.trc
TRACE = OFF
####/oracle/11203/GTW/hs/admin/initdg4odbc.ora####
HS_FDS_CONNECT_INFO = MySQL
HS_FDS_TRACE_LEVEL = 0
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc5a.so
set ODBCINI=/etc/odbc.ini
set HOME=/home/oracle
####/oracle/11203/GTW/network/admin/listener.ora####
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1522))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=dg4odbc)
(ORACLE_HOME=/oracle/11203/GTW)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/usr/lib64:/oracle/11203/GTW/lib)
####/oracle/11203/GTW/network/admin/tnsnames.ora####
dg4odbc =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)
(HOST = hostname)
(PORT = 1522)
(CONNECT_DATA =
(SID = dg4odbc)
(HS = OK)
Oracle Database version is 11.2.0.2.0 and Its on ORAHOME /oracle/11202/BDW and its listener port is 1521.
I am not able to tnsping port 1522 (dg4odbc) from Database Home. Database configuration file is below.
####/oracle/11202/BDW/network/admin/tnsnames.ora####
dg4odbc =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1522)))
(CONNECT_DATA = (SID = dg4odbc))
(HS=OK))
Also I have created a DBLINK and tried to get info from MySqlDB but it did not work as usual.
CREATE PUBLIC DATABASE LINK dg4odbc CONNECT TO "kullanici" IDENTIFIED BY "sifre" USING ’dg4odbc’;
SQL> select * from kullanici@dg4odbc;
select * from kullanici@dg4odbc
ERROR at line 1:
ora-12154 tns could not resolve the connect identifier specified
Thank you so much to everybody who reads and writes this...
Best regards,
Eren.
Edited by: BeymenAdmin on Mar 21, 2013 8:52 AMBeymenAdmin wrote:
Dears
I am trying to connect to MysqlDB from Oracle.
I have installed Oracle Gateway and ODBC diver on Linux server.
Oracle gateway was installed on same server with Oracle Database but in different home and it has a different listener.
please look at my configuration files which I have created and maintained to established connections to MySqlDB.
I think I did some mistake and seize up in it so I could not find a solution. I am trying to fix it as well but if somebody can help me it will be very nice.
Gateway version is 11.2.0.3.0 and it is on ORAHOME /oracle/11203/GTW and its listener port is 1522.
I am able to tnsping port 1522 (dg4odbc) from gateways home. Gateway configuration files are below.
####/etc/odbc.ini####
[ODBC Data Sources]
MySQL = MySQL ODBC Driver 5.2
[MySQL]
Driver = /usr/lib64/libmyodbc5a.so
DATABASE = veritabani
DESCRIPTION = MySQL ODBC 5.2 Driver
PORT = nnnn
SERVER = x.x.x.x
UID = kullanici
PWD = sifre
CHARSET = latin1
TRACEFILE = /tmp/myodbc-demodsn.trc
TRACE = OFF
####/oracle/11203/GTW/hs/admin/initdg4odbc.ora####
HS_FDS_CONNECT_INFO = MySQL
HS_FDS_TRACE_LEVEL = 0
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc5a.so
set ODBCINI=/etc/odbc.ini
set HOME=/home/oracle
####/oracle/11203/GTW/network/admin/listener.ora####
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1522))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=dg4odbc)
(ORACLE_HOME=/oracle/11203/GTW)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/usr/lib64:/oracle/11203/GTW/lib)
####/oracle/11203/GTW/network/admin/tnsnames.ora####
dg4odbc =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)
(HOST = hostname)
(PORT = 1522)
(CONNECT_DATA =
(SID = dg4odbc)
(HS = OK)
Oracle Database version is 11.2.0.2.0 and Its on ORAHOME /oracle/11202/BDW and its listener port is 1521.
I am not able to tnsping port 1522 (dg4odbc) from Database Home. Database configuration file is below.
####/oracle/11202/BDW/network/admin/tnsnames.ora####
dg4odbc =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1522)))
(CONNECT_DATA = (SID = dg4odbc))
(HS=OK))
Also I have created a DBLINK and tried to get info from MySqlDB but it did not work as usual.
CREATE PUBLIC DATABASE LINK dg4odbc CONNECT TO "kullanici" IDENTIFIED BY "sifre" USING ’dg4odbc’;
SQL> select * from kullanici@dg4odbc;
select * from kullanici@dg4odbc
ERROR at line 1:
ora-12154 tns could not resolve the connect identifier specified
see: [url http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/] ora-12154 TNS:could not resolve the connect identifier specified
Remember that the database from which you issued the "select * from kullanici@dg4odbc;" is, at that point, acting just like any other client trying to connect to a remote database.
Thank you so much to everybody who reads and writes this...
Best regards,
Eren.
Edited by: BeymenAdmin on Mar 21, 2013 8:52 AM -
Database link Oracle to MySql Error [Microsoft][ODBC Driver Manager]
Dear all:
I need your help, I want to access mysql database from oracle 11g r2. When I try to connect mysql database from oracle database I'm getting the error shown below, kindly help your help will be appreciated, thanks in advance
When I excute:
select * from test1@mysqltest;
[ERROR]
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified {IM002}
ORA-02063: preceding 2 lines from THAONT1.MYSQL
28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
*Cause: The cause is explained in the forwarded message.
*Action: See the non-Oracle system's documentation of the forwarded message.
My config
oracle db:11.2.0.3 enterprise edition
os:win 7 64 bits
mysql connector odbc:64 bit
mysql db:5.1.19
ODBC Config
LISTENER.ORA:
=============
# listener.ora Network Configuration File: D:\app\THAONTSE90151\product\11.2.0\dbhome_3\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\THAONTSE90151\product\11.2.0\dbhome_3)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\THAONTSE90151\product\11.2.0\dbhome_3\bin\oraclr11.dll")
(SID_DESC =
(SID_NAME = tst)
(ORACLE_HOME = D:\app\THAONTSE90151\product\11.2.0\dbhome_3)
(PROGRAM = dg4odbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.1.58)(PORT = 1521))
ADR_BASE_LISTENER = D:\app\THAONTSE90151
TNSNAMES.ORA:
================
TSTLINK =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.1.58)(PORT = 1521))
(CONNECT_DATA =
(SID = tst)
(HS = OK)
inittst.ora($ORACLE_HOME/hs/admin)
========================
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = testmysql
HS_FDS_TRACE_LEVEL = off
# Environment variables required for the non-Oracle system
#set ODBCINI=D:\ODBC.INI
dblink created from oracle to mysql:
==========================
SQL> create public database link mysqltest
connect to thaont identified by abc123 using 'TSTLINK';
SQL>select * from test1@mysqltest;
[ERROR]
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified {IM002}
ORA-02063: preceding 2 lines from THAONT1.MYSQL
28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
*Cause: The cause is explained in the forwarded message.
*Action: See the non-Oracle system's documentation of the forwarded message.
kindly help.
thanks & regards.The error message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified {IM002}" is self explainind - DG4ODBC is not able to find the ODBC DSN you created.
In your gateway init file you configured the DSN: HS_FDS_CONNECT_INFO = testmysql
And according to the Windows ODBC Admin screenshot you created a DSN called testmysql - unfortunately you created it as a USER DSN. But DG4ODBC needs a SYSTEM DSN. The reasin why it needs a system DSN is that by default the Oracle listener is running in the local system account. So when you create an ODBC USER DSN it can be access by the user who created it, but nobody else can use it - also not the local system account which is serving the Oracle listener. So you need to create a system DSN that every user on this machine can use the DSN (including the local system account) .
- Klaus -
Configure HS talk to mysql through ODBC
Hello
Running 10g rel2 on Linux 64bit. Need to dblink to mysql 5.
Configured:
/etc/odbc.ini
[myodbc]
Driver = /usr/lib64/libmyodbc.so
Description = MyODBC 2.50 Driver DSN
SERVER = 209.71.254.40
PORT = 3306
USER = posman
Password = posman
Database = poseidon
OPTION = 0
SOCKET =
Listener.ora
(SID_DESC=
(PROGRAM=hsodbc)
(SID_NAME=myodbc3)
(ORACLE_HOME=/opt/oracle/product/10.2.0/rtbrs3)
(ENVS=LD_LIBRARY_PATH = /opt/oracle/product/10.2.0/rtbrs3/lib32:/lib:/usr/lib64)
Tnsnames.ora
HSODBC =
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = everest.ca)
(PORT = 1521)
(CONNECT_DATA =
(SID= myodbc3)
(HS=OK)
inintmyodbc3.ora
HS_FDS_CONNECT_INFO = myodbc3
HS_FDS_TRACE_LEVEL = off
When I do tnsping HSODBC is works.
I create the DBLINK and that works.
I test the dblink and it fails with
SQL> select * from "emp"@testdb;
select * from "emp"@testdb
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from TESTDB
Please helpwe had problems with the * wildcard and also with aliases and synonyms for table joins.
make them simple like this: select "column_name" from table_name@testdb;
and make a separate view for each query then use a query to join the views in Oracle. -
Listener error with dg4odbc and mysql
Hi all,
First of all, sorry for my English, I'm learning :-)
I'm trying to create a dblink from oracle to mysql, but for now this seems impossible. I have read lots of manuals and post, but no way. I can connect to remote mysql server with "isql my_portal", so, unixodbc and the mysql driver for odbc are working in the server.
The oracle database 10.2 is installed in a Red Hat 64 bits server. Due to hsodbc for 10.2 is only for 32bit i installed the gateway version for 11g without problems (no errors showed, so...) But I have always the same error: "TNS-12541: TNS:no listener dg4odbc" But my configuration seems correct. Can anyone find the error in my config? Thank you
This is the documentation that I have used:
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=561033.1
After apply the modifications to the configuration files, this is what lsnrcntl start says:
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/liste ner.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/srv-bbdd1/listener/alert/lo g.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=1.0.2.42)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cl-oracle.jferrer.es)(PO RT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 16-MAR-2011 10:54:38
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/list ener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/srv-bbdd1/listener/alert/ log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=1.0.2.42)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "SQLServerA3" has 1 instance(s).
Instance "SQLServerA3", status UNKNOWN, has 1 handler(s) for this service...
Service "dbjde" has 1 instance(s).
Instance "dbjde", status UNKNOWN, has 1 handler(s) for this service...
Service "my_portal" has 1 instance(s).
Instance "my_portal", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Then I try tnsping to my_portal:
tnsping:
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 16-MAR-2011 11:36:45
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = my_portal)) (HS=OK))
TNS-12541: TNS:no listener
Some information:
- unixodbc driver is in /usr/lib64 (libodbc.so)
- mysql for odbc driver is in /usr/lib64 (libmyodbc.so)
This is my odbc.ini (/etc/odbc.ini):
[ODBC Data Sources]
odbcname = my_portal
[my_portal]
Description = my_portal
Driver = MySQL
SERVER = 1.0.2.98
PORT = 3306
USER = root
PASSWORD = desarrollo
Database = portal_clientes
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib64/libmyodbc.so
Setup=/usr/lib64/libodbcmyS.so
Added to listener.ora
(SID_DESC =
(SID_NAME = my_portal)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = dg4odbc)
(ENVS = LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/hs/lib:/u01/app/oracle/product/10.2.0/db_1/lib:/usr/lib64)
Added to tnsnames.ora
my_portal =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = localhost)
(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = my_portal))
(HS=OK))
initmy_portal.ora
HS_FDS_CONNECT_INFO=my_portal
HS_FDS_SHAREABLE_NAME=/usr/lib64/libodbc.so
HS_FDS_TRACE_LEVEL=ON
UseCursorLib=0
set ODBCINI=/etc/odbc.iniThank you for the response. The problem was the solved when change the 1.2.0.40 to 42 :-)
Another issue I saw is your ORACLE_HOME - did you install DG4ODBC in your 10.2 OH?Yes, the documentation said that is certified to work with Oracle 10.2.0.4 that is our version, is this a problem? (¿...?) I had no problem to install dg4odbc with the universal installer.
But I have another problems now. I can't remember the exact error, but my first problem was solved adding this line to initmy_portal.ora:
HS_FDS_QUOTE_IDENTIFIER="'"
Now, when I try to make a select oracle returns this:
ORA-00942: la tabla o vista no existe
[MySQL][ODBC 3.51 Driver][mysqld-5.1.41-3ubuntu12.10]Table 'portal_clientes.CLIENTES' doesn't exist {42S02,NativeErr = 1146}[MySQL][ODBC 3.51 Driver][mysqld-5.1.41-3ubuntu12.10]Table 'portal_clientes.CLIENTES' doesn't exist {42S02,NativeErr = 1146}
ORA-02063: 2 lines precediendo a MY_PORTAL_DBLINK
The table exists, I'm sure, and if I change the query to other tables the result is the same: the table doesn't exist. Any idea?
Thank you for the help -
DB Link Error from Oracle to Mysql
Hi ,
I have created the dblink from oralce to mysql using note id 1320645.1
I am getting the below error while connecting to the mysql using the dblink
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user 'user'@'xxxx.xxxx.xxxx'
(using password: YES) {HY000,NativeErr = 1045}
ORA-02063: preceding 2 lines from MYODBC5
Please help me to slove the error
Thanks in Advance
SudheerSudheer,
the error message is self explaining - your user 'user' connecting from the host @'xxxx.xxxx.xxxx' is not allowed to log into the MySQL database. To solve this issue you need to grant permissions to the user so that he can connect from any host (%) or just from that particular host where you installed the gateway.
The command to allow access from everywhere would be:
grant all on *.* TO '<user>'@'%' IDENTIFIED BY '<password>';
or just specify the IP address instead of '%' if you want to restrict it.
More details can be found in the MySQL manual:
MySQL :: MySQL 5.1 Reference Manual :: 6.2.7 Causes of Access-Denied Errors
- Klaus
Maybe you are looking for
-
My Creative Cloud Desktop app closes suddenly when loads palicativos installed. I can not update my apps. Already reinstalled the desktop app CC often using adobe cc cleaner. It does not uninstall the normal way. What do I do? I can not contact anyon
-
iOS 5.1 bugs what happened to apple? im afraid that they're gonna fall the reputation and efforts of Steven Paul Jobs. im using itouch 4g, it came with iOS 4.1 firmware and it worked as the apple device would be, it never showed me loading thing. wha
-
Remove duplicates in "Compilations" folder
I have found a lot of duplicate files in the ~/Music/iTunes/iTunes Music/Compilations folder. Most of the discussions I have found ignore files in the Compilations folder. Are there any utilities to handle this chore, I have over 4,000 songs. Also wh
-
My sound has begun to fail partially?
My iMac began to have no sound in certain areas after installing Sophos Anti-virus software. VLC files don't have sound, the volume adjustor makes no sound, and Youtube videos (and probably all other flash things) have no sound. Certain things like t
-
I've noticed recently that I've got a file on my desktop named ".ds store", and it's a file that I cannot throw away because it keeps replicating itself whenever I move it to the trash. I've also noticed that there is also a ".ds store" file in every