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
Sudheer
Sudheer,
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
Similar Messages
-
Database Link Error: From Oracle to SQL Servre
Hi,
I am trying to create a database link from my Oracle database to SQL Server. Oacle is 11gR2 on windows 2012 64-Bit same is the OS for SQL Server.
When i execute the query using link, this is the error what i get:
*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 PMS2KPI*
When i look for this error in *listener.ora* file, this is what i found
30-OCT-2014 09:51:48 * (CONNECT_DATA=(SID=pms2kpi)(CID=(PROGRAM=)(HOST=GARMCO\GRBHORDB01)(USER=GARMCO\PMS2Admin))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::54d2:d482:edf0:8543%12)(PORT=52016)) * establish * pms2kpi * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
64-bit Windows Error: 2: No such file or directory
30-OCT-2014 09:51:48 * (CONNECT_DATA=(SID=pms2kpi)(CID=(PROGRAM=)(HOST=GARMCO\GRBHORDB01)(USER=GARMCO\PMS2Admin))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.107.145.26)(PORT=52017)) * establish * pms2kpi * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
64-bit Windows Error: 2: No such file or directory
Thu Oct 30 09:52:58 201
When I look for the details in *alert.log* file, i find this
HS: Unable to establish RPC connection to HS Agent...
HS: ... Agent SID = (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=GRBHORDB01.garmco.local)(Port=1521)))(CONNECT_DATA=(SID=pms2kpi))),
NCR error = 65535 Unable to retrieve text of NETWORK/NCR message 65535
Thu Oct 30 09:52:25 2014
My configuration seems to be ok....
*initpms2kpi.ora file*
#HS_FDS_CONNECT_INFO=[GRBHSQDB01.garmco.local]/KPI
HS_FDS_CONNECT_INFO="SERVER=GRBHSQDB01;DATABASE=KPI"
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=HS_RECOVERY
HS_FDS_RECOVERY_PWD=********
HS_FDS_TRANSACTION_LOG=HS_TRANSACTION_LOG
HS_FDS_TRANSACTION_MODEL=COMMIT_CONFIRM
HS_COMMIT_POINT_STRENGTH=0
*Listener.ora file*
(SID_DESC =
(SID_NAME = pms2kpi)
(ORACLE_HOME = C:\App\Oracle\product\11.2.0\dbhome_1)
(program = tg4msql)
*tnsnames.ora file*
pms2kpi =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = TCP)(Host = GRBHORDB01.garmco.local)(Port = 1521))
(CONNECT_DATA =
(SID = pms2kpi)
(HS=OK)
How can I check if some firewall is blocking the connection, or its a port issue... or maybe something wrong in the configuration, but chances are very less for this.
Kindly help if you have gone thru such an error.
Regards, ImranHi,
In the listener.ora you have -
(program = tg4msql)
but with 11g gateways the executable name has been changed and you should change the entry to -
(program = dg4msql)
then stop and start the listener.
If you installed the gateway into an existing ORACLE_HOME then the gateway version must be the same version as the software already installed.
For example, if the existing software was 11.2.0.4 and you installed 11.2.0.1 gateway this will give you problems and most likely the gateway executable will be 0 (zero) in size.
Regards,
Mike -
Create a Database Link from Oracle to MYSQL on windows
Hi
I need to create a database link from oracle to mysql database on windows to fetch some records.Can anyone help me on this?Search for Transparent Gateways, Heterogeneous Services...
The Oracle SQL Developer have drivers to Access, MySQL and SQL Server. -
Tnsping timed out using dg4odbc from Oracle to MYSQL through ODBC
Hi,
I encountered problem when trying to connect from Oracle to MYSQL using dg4odbc, hope you can shed some light
Oracle database is 11.1.0.7 on SUSE Linux 64-bit.
Since the application which runs on MYSQL DB only offers ODBC driver on Windows platform, so I installed the 32-bit ODBC driver (from ServiceNow) on a 32-bit windows server (driver download from http://wiki.service-now.com/index.php?title=ODBC_Driver) .
created system DSN: MYSQLDEV, The DSN connection works fine. I then installed Oracle 11.2.0.1 gateway for ODBC 32-bit on the same windows server, the following configurations were done:
On 32-bit Windows server:
in gatewayHome\hs\admin
initMYSQLDEV.ora:
# HS init parameters
HS_FDS_CONNECT_INFO = MYSQLDEV
HS_FDS_TRACE_LEVEL = DEBUG
in gatewayHome\network\admin:
listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = abcdes.sda.sdva.com)(PORT = 1521))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=MYSQLDEV)
(ORACLE_HOME=C:\product\11.2.0\tg_1)
(PROGRAM=dg4odbc)
ADR_BASE_LISTENER = C:\product\11.2.0\tg_1
stop and started listener on windows server and check listener status
C:\product\11.2.0\tg_1\bin>lsnrctl status listener
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 29-MAR-2012 21:42:08
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abcdes.sda.sdva.com)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date 29-MAR-2012 21:11:36
Uptime 0 days 0 hr. 30 min. 32 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\product\11.2.0\tg_1\network\admin\listener.ora
Listener Log File c:\product\11.2.0\tg_1\diag\tnslsnr\abcdes\list
ener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=abcdes.sda.sdva.com)(PORT=1521)))
Services Summary...
Service "MYSQLDEV" has 1 instance(s).
Instance "MYSQLDEV", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
On Linux server where Oracle DB resides.
Added the following tns entry "jelly" on the Linux server ORACLE_HOME/network/admin:
jelly =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)
(HOST=abcdes.sda.sdva.com)
(PORT=1521))
(CONNECT_DATA=(SID=MYSQLDEV))(HS=OK)
tnsping from Linux server (64-bit) failed with timeout error:
tnsping jelly
TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 29-MAR-2012 21:12:38
Copyright (c) 1997, 2008, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP) (HOST=abcdes.sda.sdva.com) (PORT=1521)) (CONNECT_DATA=(SID=MYSQLDEV))(HS=OK))
TNS-12535: TNS:operation timed out
tnsping from Windows server works fine: (added same tnsnames entry on windows server for testing purpose only)
C:\product\11.2.0\tg_1\bin>tnsping jelly
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 29-MAR-2
012 21:45:20
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\product\11.2.0\tg_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=abcdes.sda.sdva.com)(PORT=1521)) (CONNECT_DATA=(SID=MYSQLDEV)) (HS=OK))
OK (20 msec)
if listener is not listening to the service, then the tnsping on the windows server should fail as well.
I don't know why only the tnsping from Linux failed, is it due to the 32-bit ODBC uncompatibility with 64-bit oracle server? or my configuration problem?
Of course, when I created the DB link from oracle, the connection failed with
create database link mysqldev connect to xxxx identified by "xxxxx" using 'jelly';
Database link created.
select * from tab1;
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 MYSQLDEV
Thanks for your help,Hi Mike,
This is part of the tnsping.trc file which contains the error. IP address is in the tnsnames entry with this tnsping.
nsopen: opening transport...
nttcon: entry
nttcon: toc = 1
nttcnp: entry
nttcnp: creating a socket.
nttcnp: exit
nttcni: entry
nttcni: Tcp conn timeout = 0 (ms)
nttcni: trying to connect to socket 5.
ntt2err: entry
ntt2err: soc 5 error - operation=1, ntresnt[0]=505, ntresnt[1]=110, ntresnt[2]=0
ntt2err: exit
nttcni: exit
nttcon: exit
nserror: entry
nserror: nsres: id=0, op=65, ns=12535, ns2=12560; nt[0]=505, nt[1]=110, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
nsopen: unable to open transport
nsiocancel: entry
nsiofrrg: entry
nsiofrrg: cur = 53b9f8
nsbfr: entry
nsbaddfl: entry
nsbaddfl: normal exit
nsbfr: normal exit
nsiofrrg: exit
nsiocancel: exit
nsvntx_dei: entry
nsvntx_dei: exit
nsopenfree_nsntx: nlhthdel from mplx_ht_nsgbu, ctx=53a7e0 nsntx=53ade0
nsiocancel: entry
nsiofrrg: entry
nsiofrrg: exit
nsiocancel: exit
nsmfr: entry
nsmfr: 2712 bytes at 0x53ade0
nsmfr: normal exit
nsmfr: entry
nsmfr: 1528 bytes at 0x53a7e0
nsmfr: normal exit
nsopen: error exit
nscall: error exit
nscall: entry
nscall: connecting...
nsclose: entry
nsclose: normal exit
nladget: entry
nladget: exit
nsmfr: entry
nsmfr: 264 bytes at 0x528900
nsmfr: normal exit
nladtrm: entry
nladtrm: exit
nscall: error exit
nlse_term_audit: entry
nlse_term_audit: exit
Thanks, -
Syntax to query a MSSQL 2008R2 linked server from Oracle
Hi,
I would know if it's possible to query a MSSQL 2008R2 linked server from Oracle. Actually I can query local MSSQL databases from Oracle using dg4odbc without problem but how can I query the linked servers configured on the MSSQL side ?
From MSSQL, I can query those linked servers using the [linked server name].[catalog].[owner].[table] syntax but using select * from [linked server name].[catalog].[owner].[table]@oracle_dblink_name syntax from the oracle side throw this error:
ERROR at line 1:
ORA-00933: SQL command not properly ended
I tried some syntax variations, e.g. putting double quotes around the object name without luck. After some hours to find a solution I'm out of idea...
So please if someone had a clue on this it would be very helpfull.
Some info:
Oracle 10g 10.2.0.5 Enterprise Edition x64
Oracle Linux 5.9 Enterprise Edition x64
MSSQL 2008R2 Enterprise x64
Windows Server 2008R2 Enterprise x64
Oracle 11gR2 Enterprise x64 for dg4odbc on MSSQL side
SQL Server Natice Client 10.0 used as ODBC driverHi kgronau,
Maybe I'm not clear in my explanations, sorry.
I want, from Oracle, to query a MSSQL linked server.
Basically I want to do that, if possible:
Oracle --> MSSQL --> linked server --> MSSQL
^ ^
| |
---------------->------------------->--------------------
and maybe have a clue about the syntax to be used.
Knowing that querying the linked server directly form MSSQL is working and querying from Oracle to local MSSQL db is working too.
Using the right syntax should lead me to succes, am I right ? Or maybe its something that cannot be done using oracle dblinks ?
Thanks -
Can Hyperion repository be migrated from Oracle to MySQL
Hi Gurus,
I was wondering if Hyperion Repository can be migrated from an existing Oracle database to MySQL database. If yes, then how? Any kind of advice is greatly appreciated.
Regards,
UdayHi,
First question is why you want to move from Oracle to MySQL as in newer versions of Hyperion MySQL is not supported anymore.
There is no direct way of migrating the database you would have to look at using a 3rd party conversion tool or writing some custom code.
Cheers
John
http://john-goodwin.blogspot.com/ -
Migrating Stored procedure from Oracle to Mysql
Dear All,
Please suggest, is ther any tool of stored procedure migration from oracle to mysql.
I tried some tool like
1. Intelligent Converter.
2. Sql way
3. Mysql Migration Toolkit.
But procedure cannot migrate properly.
hb venkiVenki,
I think you are in the wrong place, try finding a MySQL forum ;0) -
Hi , its really amazing to see this error from Oracle site .
ORA-04063: package body "WEB_PROD.SHOW_DESC" has errors ORA-06508: PL/SQL: could not find program unit being called: "WEB_PROD.SHOW_DESC" ORA-06512: at "WEB_PROD.OUGBS_WEBREG_UTILS", line 3 ORA-06512: at "WEB_PROD.OU_BRIDGE_PAGESCSS", line 309 ORA-04063: package body "WEB_PROD.SHOW_DESC" has errors ORA-06508: PL/SQL: could not find program unit being called: "WEB_PROD.SHOW_DESC" Ref:
http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=84&group_id=9
Regards,
Mohammed MehrajIt does happen some times. Not an unusual thing. Even at times , on Asktom too, errors come, very rare though!
Aman.... -
Update/Insert records from Oracle to MySQL
Hi team,
My application will insert/update records into Oracle database, I need to sync all of records into MySQL database. I designed a package to load data from Oracle to MySQL, the Oracle database use OLE DB component and MySQL database use ADO.NET.
How to insert new records into MySQL? If the old record exists, we also need to replace with new record. I did some research, someone suggest to create a stage table to handle this scenario, but I have 14 tables in this case. How to handle this scenario
with high performance?
If there is anything unclear, please let me know.
Thank you in advance.Finally, I created 14 tables as same as in our MySQL database system with prefix "updated" , they are use to store the updated records from Oracle system. All of new records we add a flag, the "1" means insert a new record into the system,
and the "0" means we should updated. So, I can use the conditional split component to split all of new records. The new records insert into the target table and the updated records insert into the "updated_table". Finally, we can add a
SQL Script task to run a update script to sync all of records.
I don't use Lookup Transformation because we must use Cache
Transform transformation in this case, the Cache connection manager to save the data to a cache file (.caw), it will hard to
trace the history data in the future.
In addition, I recommend to use ODBC connection if somebody face the similar scenario with me, there is a bug if we use ADO.NET to
load data from Oracle to MySQL by using SSIS. For more information, please refer the MSDN document: http://blogs.msdn.com/b/mattm/archive/2009/01/07/writing-to-a-mysql-database-from-ssis.aspx
@Arthur, thanks again for your input. Have a nice day! :) -
Database link from Oracle to MySQL
I tried and googled an tried again...but I can't get this to work. So if you can spare a moment, please help me out (or try to ;-) ).
Environment:
The Oracle Developer Days Virtual Box image, so that's 11gR2 EE on OEL. MySQL 5.1.51-community + mysql-connector-odbc-5.1.7-0.i386.rpm
1. Created a database called test in MySQL, with a user "oracle" and a password "123".
2. Created the file /home/oracle/.odbc.ini with as contents:
[ODBC Data Sources]
myodbc5 = MySQL ODBC 5.1.7 Driver DSN
[myodbc5]
DRIVER = /usr/lib/libmyodbc5.so
DESCRIPTION = MySQL ODBC 5.1.7 Driver DSN
SERVER = 127.0.0.1
PORT = 3306
USER = oracle
PASSWORD = 123
DATABASE = test
CHARSET = latin13. Created the file /home/oracle/app/oracle/product/11.2.0/dbhome_1/hs/admin/initmyodbc5.ora
# HS init parameters
HS_FDS_CONNECT_INFO=myodbc5
HS_FDS_TRACE_LEVEL=DEBUG
HS_FDS_SHAREABLE_NAME=/usr/lib/libmyodbc5.so
HS_LANGUAGE=AMERICAN.AMERICA.WE8ISO8859P15
HS_FDS_SUPPORT_STATISTICS=FALSE
# HS_NLS_NCHAR=AL32UTF8
# ODBC specific environment variables
set ODBCINI=/home/oracle/.odbc.ini
set ODBCINSTINI=/home/oracle/.odbc.ini
set LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/hs/lib:/usr/lib
# Environment variables required for the non-Oracle system
set HOME=/home/oracle4. Added to tnsnames.ora :
dg4odbc =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA = (SID=myodbc5))
(HS=OK)
)5. Added to listener.ora (and restarted it) :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = myodbc5)
(PROGRAM = dg4odbc)
(ENVS ="LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/hs/lib:/usr/lib:/lib")
)6. Ran some tests:
a. isql dg4odbc -> Connected!
b. tnsping dg4odbc -> OK
c. lsnrctl status -> Service "myodbc5" has 1 instance(s). Instance "myodbc5", status UNKNOWN, has 1 handler(s) for this service...
d. in SQLPLUS (as system): create public database link mysql connect to "oracle" identified by "123" using 'dg4odbc';
e. select * from test@mysql ("test" is a simple table I created in the MySQL DB) returns
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from MYSQL
When I look in the trace file (in $ORACLE_HOME/hs/log) I see at the bottom of the file:
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib/libmyodbc5.so"
Entered hgolofns at 2010/11/02-14:10:54
hoaerr:28500
Exiting hgolofns at 2010/11/02-14:10:54
Failed to load ODBC library symbol: /usr/lib/libmyodbc5.so(SQLAllocHandle)
Exiting hgolofn, rc=28500 at 2010/11/02-14:10:54
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:337 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:108 FUNCTION:hgoexit() ID:Connection contextAfter Googling around I found out that all files are 32-bit (was on issue somewhere else)...and now I am stuck!
Any ideas, tips etc on how to proceed???
TIA
RoelThe ODBC Trace contains:
[ODBC][3331][1288788738.867244][__handles.c][459]
Exit:[SQL_SUCCESS]
Environment = 0x92b0d08
[ODBC][3331][1288788738.869179][SQLSetEnvAttr.c][189]
Entry:
Environment = 0x92b0d08
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = -6
[ODBC][3331][1288788738.869204][SQLSetEnvAttr.c][356]
Exit:[SQL_SUCCESS]
[ODBC][3331][1288788738.879396][SQLAllocHandle.c][375]
Entry:
Handle Type = 2
Input Handle = 0x92b0d08
[ODBC][3331][1288788738.879422][SQLAllocHandle.c][493]
Exit:[SQL_SUCCESS]
Output Handle = 0x92c2940
[ODBC][3331][1288788738.879449][SQLSetConnectAttrW.c][332]
Entry:
Connection = 0x92c2940
Attribute = SQL_ATTR_AUTOCOMMIT
Value = (nil)
StrLen = -5
[ODBC][3331][1288788738.879467][SQLSetConnectAttrW.c][616]
Exit:[SQL_SUCCESS]
[ODBC][3331][1288788738.879694][SQLDriverConnectW.c][290]
Entry:
Connection = 0x92c2940
Window Hdl = (nil)
Str In = [DNdm;I=eoPDdm][length = 26]
Str Out = 0x92b1cf8
Str Out Max = 1024
Str Out Ptr = 0xbfe66270
Completion = 0
[ODBC][3331][1288788738.879718][SQLDriverConnectW.c][500]Error: IM002
[ODBC][3331][1288788738.879810][SQLGetDiagRecW.c][508]
Entry:
Connection = 0x92c2940
Rec Number = 1
SQLState = 0xbfe65f70
Native = 0xbfe65f90
Message Text = 0xbfe65d38her
Buffer Length = 510
Text Len Ptr = 0xbfe65fa8
[ODBC][3331][1288788738.879835][SQLGetDiagRecW.c][550]
Exit:[SQL_SUCCESS]
SQLState = IM002
Native = 0xbfe65f90 -> 0
Message Text = [[unixODBC][Driver Manager]Data source name not found, and no default driver specified]
[ODBC][3331][1288788738.879865][SQLGetDiagRecW.c][508]
Entry:
Connection = 0x92c2940
Rec Number = 2
SQLState = 0xbfe65f70
Native = 0xbfe65f90
Message Text = 0xbfe65d38
Buffer Length = 510
Text Len Ptr = 0xbfe65fa8
[ODBC][3331][1288788738.879882][SQLGetDiagRecW.c][550]
Exit:[SQL_NO_DATA]
[ODBC][3331][1288788738.879942][SQLDisconnect.c][208]
Entry:
Connection = 0x92c2940
[ODBC][3331][1288788738.879958][SQLDisconnect.c][237]Error: 08003
[ODBC][3331][1288788738.880005][SQLFreeHandle.c][286]
Entry:
Handle Type = 2
Input Handle = 0x92c2940
[ODBC][3331][1288788738.880023][SQLFreeHandle.c][337]
Exit:[SQL_SUCCESS]
[ODBC][3331][1288788738.903716][SQLFreeHandle.c][219]
Entry:
Handle Type = 1
Input Handle = 0x92b0d08So there is an error (IM002) in there, saying it can't find the Data Source Name..
Some addtional tests I ran:
dltest /usr/local/lib/libodbc.so returns SUCCESS: Loaded /usr/local/lib/libodbc.so
ldd /usr/local/lib/libodbc.so returns
linux-gate.so.1 => (0x00a44000)
libdl.so.2 => /lib/libdl.so.2 (0x00a22000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00110000)
libc.so.6 => /lib/libc.so.6 (0x005b1000)
/lib/ld-linux.so.2 (0x00736000)
So it can find and load the necessary libraries (afaik)..
So any ideas left?? -
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. -
ODBC connect from Oracle to MySQL!
Dear All,
I know its not very much related to the subject of this forum but DBA's often have to perform such tasks.
I am in process of developing replication between Oracle and MySQL. For this I have planned to create materialized views in oracle that query MySQL database.
I am using Oracle 11gR1 on Linux for Oracle Server and MySQL is on windows based server version is 5.1.
I am stuck at the very first step that is to create a database link between Oracle and MySQL.
On Oracle's server, I did the following:
Installed unixODBC rpm (Installed successfully)
Installed mysql-connector-odbc (Installed successfully)
when i write this command odbcinst -j it gives the following information
unixODBC 2.2.11
D|RIVER........... : /etc/odbcinst.ini ; (my comments : Files exists)
SYSTEM DATA SOURCE : /etc/odbc.ini (my comments : File exists )
USER DATA SOURCE : /root/.odbc.ini (my comments : File DO NOT exists)
Now i tried to add the following entry in the file /etc/odbc.ini
[bssdata]
Driver = MySQL ODBC 3.51 Driver
DATABASE = bssdata
DESCRIPTION = views_on_bssdata
PWD =
PORT = 3306
SERVER = 192.168.0.68
UID = root
Now when i try to check the connectivity with the command:
isql -v bssdata root
Error: data source name not found, and no default driver specified.
ERROR: Could not SQLConnect
Anyone have tried this before, please help me out of it.
Regards, ImranHope these links help you :
http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/
http://sysinfo.bascomp.org/2008/03/setting-oracle-heterogenous-service-mysql-to-oracle/
http://www.idevelopment.info/data/Oracle/DBA_tips/Heterogeneous_Services/HETERO_2.shtml
http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
Regards
Rajesh -
Error: Databaselink Oracle XE - MySQL
Hi,
I try to set up a database link from my OracelXE to a MySQL server.
I know here are a lot of discussion for this problem, but I read a lot and tried a lot, but it's not working.
So I want to explain you what I did and give you my configuration, maybe you will find the error:
My System properties
Windows 7 64bit
Oracle XE (11.2)
1. I downloaded MySQL ODBC driver and set up a System-DNS in data source administration -> Test OK
2. Following an old instructions I found in www (Making a connection from Oracle XE to MySQL with ODBC - APEX-AT-WORK by Tobias Arnhold and Oracle und MySQL vereinigen, – HS Service und Datenbanklink | hman-projects) I have done the following
create file initMYSQL_DB.ora in C:\oraclexe\app\oracle\product\11.2.0\server\hs\admin:
# This is a sample agent init file that contains the HS parameters that are
# needed for an ODBC Agent.
# HS init parameters
HS_FDS_CONNECT_INFO = MYSQL_DB
HS_FDS_TRACE_LEVEL = OFF
# Environment variables required for the non-Oracle system
#set =
update Listener.ora (found it in path C:\oraclexe\app\oracle\product\11.2.0\server\hs\admin and C:\oraclexe\app\oracle\product\11.2.0\server\network\admin, so I'm not sure which one will be used, I changed the one in network path and copied it to hs path, sone this also for the tnsnames)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
(SID_DESC=
(SID_NAME=MYSQL_DB)
(ORACLE_HOME=C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM=dg4odbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = PC.local)(PORT = 1521))
DEFAULT_SERVICE_LISTENER = (XE)
tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = PC.local)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
MYSQL_DB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(Port = 1521))
(CONNECT_DATA =
(SERVICE_NAME = MYSQL_DB)
(HS = OK)
3. Making a tnsping MYSQL_DB is working
C:\oraclexe\app\oracle\product\11.2.0\server\bin>tnsping MYSQL_DB
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 22-OKT-2
014 13:02:09
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = localhost)(Port = 1521))) (CONNECT_DATA = (SERVICE_NAME = MYSQL_DB)) (HS
= OK))
OK (20 msec)
4. Creating database link in SQL Developer
create database link MYSQL_DB
connect to "mysqluser" identified by "mysqluserpwd"
using 'MYSQL_DB';
is successful, but the testing the link, bringing back the following error:
Bei der Ausführung des angeforderten Vorgangs ist ein Fehler aufgetreten:
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 MYSQL_DB
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.
Herstellercode 28545
Can anybody find the error???
Thanks for your help,
chrissysHi Mike,
sorry for the late answer ...
I have just done what you told me.
After reload of lsnrctl I get the following output.
C:\>lsnrctl services listener
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 10-NOV-2014 08:52
:34
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "MYSQL_DB" has 1 instance(s).
Instance "MYSQL_DB", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: PC, pid: 4652>
(ADDRESS=(PROTOCOL=tcp)(HOST=PC.local)(PORT=65125))
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
C:\>lsnrctl status listener
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 10-NOV-2014 08:53
:08
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Produ
ction
Start Date 22-OKT-2014 10:20:51
Uptime 18 days 23 hr. 32 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\PC\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=PC.local)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=PC.local)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "MYSQL_DB" has 1 instance(s).
Instance "MYSQL_DB", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
Thanks,
chrissy -
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. -
Import error from oracle 10.1.0 to oracle 10. 2.0
Hi
I am importing schema from oracle 10.1.0 to oracle 10.2.0.
my all objects are imported successfully except foreign key constraints.
my error are like
IMP-00003: ORACLE error 20001 encountered
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 5167
ORA-06512: at line 1
IMP-00017: following statement failed with ORACLE error 20001:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := NULL; SREC.MAXVAL :="
" NULL; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.NUMAR"
"RAY(0,0); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_STAT"
"S.SET_COLUMN_STATS(NULL,'"PRODUCT_MASTER"','"PRODUCTID"', NULL ,NULL,NULL,0"
",0,0,srec,0,6); END;"
IMP-00003: ORACLE error 20001 encountered
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 4194
ORA-06512: at line 1
IMP-00017: following statement failed with ORACLE error 20001:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := NULL; SREC.MAXVAL :="
" NULL; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.NUMAR"
"RAY(0,0); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_STAT"
"S.SET_COLUMN_STATS(NULL,'"PRODUCT_MASTER"','"PRODUCT_CODE"', NULL ,NULL,NUL"
"L,0,0,0,srec,0,6); END;"
IMP-00003: ORACLE error 20001 encountered
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 4194
ORA-06512: at line 1
IMP-00017: following statement failed with ORACLE error 20001:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := NULL; SREC.MAXVAL :="
" NULL; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.NUMAR"
"RAY(0,0); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_STAT"
"S.SET_COLUMN_STATS(NULL,'"PRODUCT_MASTER"','"PRODUCT_NAME"', NULL ,NULL,NUL"
"L,0,0,0,srec,0,6); END;"
IMP-00003: ORACLE error 20001 encountered
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 4194
ORA-06512: at line 1
IMP-00017: following statement failed with ORACLE error 20001:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := NULL; SREC.MAXVAL :="
" NULL; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.NUMAR"
"RAY(0,0); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_STAT"
"S.SET_COLUMN_STATS(NULL,'"PRODUCT_MASTER"','"SHORT_DESC"', NULL ,NULL,NULL,"
"0,0,0,srec,0,6); END;"
IMP-00003: ORACLE error 20001 encountered
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 4194
ORA-06512: at line 1
IMP-00017: following statement failed with ORACLE error 20001:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := NULL; SREC.MAXVAL :="
" NULL; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.NUMAR"
"RAY(0,0); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_STAT"
"S.SET_COLUMN_STATS(NULL,'"PRODUCT_MASTER"','"DESCRIPTION"', NULL ,NULL,NULL"
",0,0,0,srec,0,6); END;"
IMP-00003: ORACLE error 20001 encountered
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 4194
ORA-06512: at line 1
IMP-00017: following statement failed with ORACLE error 20001:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := NULL; SREC.MAXVAL :="
" NULL; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.NUMAR"
"RAY(0,0); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_STAT"
"S.SET_COLUMN_STATS(NULL,'"PRODUCT_MASTER"','"PRODUCTLIMG"', NULL ,NULL,NULL"
",0,0,0,srec,0,6); END;"
IMP-00003: ORACLE error 20001 encountered
ORA-20001: Invalid or inconsistent input values
ORA-06512: at "SYS.DBMS_STATS", line 4194
ORA-06512: at line 1
IMP-00017: following statement failed with ORACLE error 20001:
"DECLARE SREC DBMS_STATS.STATREC; BEGIN SREC.MINVAL := NULL; SREC.MAXVAL :="
" NULL; SREC.EAVS := 0; SREC.CHVALS := NULL; SREC.NOVALS := DBMS_STATS.NUMAR"
"RAY(0,0); SREC.BKVALS := DBMS_STATS.NUMARRAY(0,1); SREC.EPC := 2; DBMS_STAT"
"S.SET_COLUMN_STATS(NULL,'"PRODUCT_MASTER"','"PRODUCTMIMG"', NULL ,NULL,NULL"
",0,0,0,srec,0,6); END;"
IMP-00003: ORACLE error 20001 encounteredthanksyou can import the stats with importing objects , you can pass parameter STATISTICS =none ( do not import the stats).
STATISTICS -- import precomputed statistics (always)
Try this.
--Girish
Maybe you are looking for
-
How to force open apps to close on auto logoff?
Can anyone help me? Several family members use my iMac under a single profile, the ADMIN profile (I know - misteak!). Well, now I want change this. I plan to create an account for each user. Then, because everyone is used to leaving apps open and wal
-
I purchased all the devices in my name. When I set up iCloud, though everyone has a different email account, everyone is getting my mail because iCloud is under my name. My wife has a different email account with ".me" she can see my email and hers w
-
How can I use a POJO as a resource
I'm trying to figure out how I can use a simple class I have written with methods and properties in Sutdio Creator. I have been looking around, but I've only found how to use an EJB directly from Creator. We would like to use a bean that handles all
-
How to extract a ddl from a dump database.
Hi I'm new to Oracle. I got a dump file from a Oracle database. I need to get from it the ddl to recreate the database on another Oracle server. How do i do it? Please show me details steps how to do it. Thanks.
-
LabVIEW Engineer Direct Hire 75k
LabVIEW Engineer, Full Time, FargoND Purpose Lead the development of automated test, data acquisition, and control systems using LabVIEW. Involves direct customer contact some travel. Requirements - BS in Science or Engineering. - 5+ years of experie