Create database link from oracle DB to MySql database using dg4odbc
Hi All
we need to fetch a data of MySQL database from oracle database using dg4odbc connection.
we are getting the below erros when we query select * from dual@myodbc;
ORA-28546: connection initialization failed, probable Net8 admin error
ORA-02063: preceding line from BUGZILLA
OS and database details as follow
1. OS - OEL 5.9 32 bit
2. Database - 11.2.0.1 XE
3. MySQL - 5.5.32
4. ODBC - dg4odbc
5. unixODBC - 2.2.14
6.MySQL Connector - 5.1
kindly help me to get out of this issue.
Thanks in Advance
Regards
Venkatesh V
Hi All
we need to fetch a data of MySQL database from oracle database using dg4odbc connection.
we are getting the below erros when we query select * from dual@myodbc;
ORA-28546: connection initialization failed, probable Net8 admin error
ORA-02063: preceding line from BUGZILLA
OS and database details as follow
1. OS - OEL 5.9 32 bit
2. Database - 11.2.0.1 XE
3. MySQL - 5.5.32
4. ODBC - dg4odbc
5. unixODBC - 2.2.14
6.MySQL Connector - 5.1
kindly help me to get out of this issue.
Thanks in Advance
Regards
Venkatesh V
Similar Messages
-
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. -
Creating Database Link from Oracle to SQL Server
I am trying to create a database link from Oracle to SQL Server, and the documentation is about as clear as mud to me. Can anyone send me clear instructions on exactly what I need to do? What needs to be in tnsnames.ora and listener.ora files? Is there anything other than those two files that needs to be set up? Do I set up an ODBC connection? Anything else? I want to execute queries against a SQL Server database and load data into Oracle database.
Thanks so much,
SusanThese are the instructions from an old document I created. The steps are same for SQL Server and Sybase. Hope it helps.
The 9i Transparent Gateway Software is in Oracle Software CD -> oracle9i database -> Custom -> Oracle Transparent Gateways
The gateway can be installed on the same machine as the Oracle database or
on the Sybase server or on a third machine as a stand-alone.
We have installed the gateway software in one of oracle database
servers in a separate oracle home.
These are the steps involved in configuring a gateway to a Sybase database
1. Install Sybase client and Gateway software on the Gateway Server
2. Configure <initsidfile> in the Gateway Server's <gatewayhome>
/u00/app/oracle/product/9.2.0/tg4sybs/admin/init<gatewaysid>.ora
Sybase server and database information is required for this step.
eg: HS_FDS_CONNECT_INFO=USTRUD01.uwd
3. Add an entry in listener.ora in <listnenerhome>
(/u00/app/oracle/product/9.0.1/network/admin/listener.ora) for the <gatewaysid>
4. Edit the tnsnames file (/u00/app/oracle/product/9.0.1/network/admin/tnsnames.ora)
to add an entry <tnsalias> for the <gatewaysid>
5. Create a database link to the Sybase database in the oracle database.
The steps for creating the database link are
a. create a login oracle_tgw in the sybase server
b. add the user to the sybase database with the necessary privilege on the tables
c. create the database link in the required oracle database using the command
"create public database link <dblinkname> connect to oracle_tgw identified by password using 'tnsalias'; "
6. Restart the gateway listener. -
To create a database link from oracle to sqlserver with NT authentication
Hi ,
I need to create a database link from oracle 9i to sql server database with windows authentication.I dont have the database username and password instead the access is given to my NT ID and password.So can anyone provide me the information about creating a dblink to sql server with windows authentication.
ThanksOracle is attempting to log in to SQL Server using NT authentication.
The Oracle process, however, is running presumably with a local admin account (normal for a Windows service). SQL Server has no idea what this local account is, so it denies the login.
You could change the Oracle service to run as a known user (presumably not as your Windows ID but some other Windows ID you create explicitly for Oracle) and then grant that Windows ID in SQL Server appropriate privileges. That would mean, though, that when you queried tables over the database link, you'd be using that new Windows ID's privileges on SQL Server, not your Windows ID's privileges.
As I've said, though, this is a general architectural limitation for a multi-tier architecture. The end system (SQL Server) generally has no idea who the end user (your Windows ID) is when that user is coming through a middle tier (Oracle). So it cannot apply end-user permissions to connections created by the middle tier.
Justin -
How to create database link from oracle to sql server
Please help with how to create database link from oracle to sql server
Best regards,
VishalPlease help with how to create database link from oracle to sql server
Best regards,
Vishal
Hi Vishal,
I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
Regards,
Elvis Long
TechNet Community Support -
Problem with using database link from oracle 7 to oracle 9i
Hi To Every One
I have two oracle database oracle 7.3.4.0.1 and oracle 9i 9.2.0.1.0.
and the tns alias to connect to oracle 9i database is oracle9i and tns
alias to oracle 7 database is oracle7.I have no problem in connect to
these database using these tns aliases from either database.The tns
alias for oracle 7 is available in tnsnames.ora file of oracle9i and
tns alias for oracle 9i is available in tnsnames.ora file of oracle 7.
So there is no connection problem from each other.Connection is
working fine for each other but the problem with database links is
like this
Problem:
when i create database link from oracle9i user or public database link
from oracle9i for oracle7 user like this
SQL ORACLE9I >CREATE DATABASE LINK ORACLE7 CONNECT TO <ORACLE7USER>
IDENTIFIED BY <PASSWORD> USING 'ORACLE7';
OR
SQL ORACLE9I >CREATE PUBLIC DATABASE LINK ORACLE7 CONNECT TO <ORACLE7USER>
IDENTIFIED BY <PASSWORD> USING 'ORACLE7';
The links get created sucessfully but when i write command like
SQL ORACLE9I> DESC <ORACLE7USER_NAME>.<ORACLE7USER_TABLENAME>@ORACLE7
I RECEIVE A ORACLE ERROR LIKE
ORA-12663 SERVICE REQUIRED BY CLIENT IS NOT AVAILABLE ON THE SERVER.
OR IF MY COMMAND IS LIKE
SQL ORACLE9I> SELECT <FEILD_NAME> FROM
<ORACLE7USER_NAME>.<ORACLE7USER_TABLENAME>@ORACLE7;
I RECEIVE AN ORACLE ERROR LIKE
ORA-01002 FETCH OUT OF SEQUENCE.
ORA-02063: preceding line from ORACLE7
BUT IF I CREATE A LINK FROM ORACLE7 USER FOR ORACLE9I USER
IT WORKS FINE.
PLZ HELP ME WHAT IS THE PROBLEM THAT THE LINK FOR ORACLE 7 IS NOT WORKING WHEN
IT IS BEING CREATED FROM ORACLE9I.
Thank u.Oracle 9.2.0 does not support connectivity to Oracle 7. The newest version that will support this is 9.0.1.
-
Database link from oracle to db2
Can any help me to create a database link from oracle to db2. It would be greatful if you can provide me detail steps
<p>You don't give us much information to go on. What version of Oracle? What platform is DB2 running on? You might want to take a look at <b>this</b>. You might also look <b>here</b> and <b>here</b>.</p>
Tom -
Creation of database link from oracle to sql server 2000
Hi
I need to create a database link from oracle to sql server 2000.Assuming your Oracle database is running on Windows, you can set up a database link using ODBC using Heterogeneous Services and Generic Connectivity, but there are some functional limitations (i.e. no two-phase commits). If you can live with those limitations but aren't on Windows, you can generally purchase an ODBC driver for your operating system that will connect to SQL Server through someone like DataDirect and still use Generic Connectivity. If you cannot live with those limitations, you can purchase one of Oracle's Transparent Gateway products (though this can get somewhat pricey).
What version of Oracle are you on?
What operating system(s) are you using?
What are you going to use the database link for?
Justin -
Database link from Oracle to MySQL with the use of unixODBC
Hi,
I have 2 servers.
Server A:
- CentOS_5.1 x386
- MySQL 5.1
- unixODBC
- mysql-connector-odbc
Server B:
- CentOS_5.1 x86_64
- Oracle 11g
- unixODBC
- mysql-connector-odbc
I've configured ODBC, so I am able to do "isql <DSN> oracle oracle -v" sucessfully with "root" and "oracle" user on Oracle server. I've configured listener.ora and tnsnames.ora
I added below lines to listener.ora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=mysqlware)
(ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/u01/app/oracle/product/11.1.0/db_1/hs/lib:/usr/lib64/:$ORACLE_HOME/lib)
and lines below to tnsnames.ora
mysqlware=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=<server's FQDN>)
(PORT=1521)
(CONNECT_DATA=
(SID=mysqlware))
(HS=OK))
The content of $ORACLE_HOME/hs/admin/initmysqlware.ora is
# 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 = mysqlware
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc3.so
# ODBC specific environment variables
set ODBCINI=/home/oracle/.odbc.ini
# Environment variables required for the non-Oracle system
set <envvar>=<value>
tnsping mysqlware returns.....
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=<server's FQDN>)) (PORT=1521)) (CONNECT_DATA= (SID=mysqlware)) (HS=OK))
OK (10 msec)
when I login to oracle and create PUBLIC DATABASE LINK with command....
create public database link link2mysqlware connect to
2 "oracle" identified by "oracle" using 'mysqlware';
Database link created.
THIS IS WHAT I GET.....
SQL> select * from "emp"@link2mysqlware;
select * from "emp"@link2mysqlware
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 LINK2MYSQLWARE
There is "emp" table in MySQL, from where I can even select with the use of isql command and from this Oracle server.
I would really appreciate some help here.
Thanks in advance.
Tomaz BracicEvening Ed,
I changed to debug and repeated the select ....... The output below is for one select that I did. (select * from "emp"@link1)
Oracle Corporation --- WEDNESDAY MAR 19 2008 21:50:51.371
Version 11.1.0.6.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "DEBUG"
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_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "AL32UTF8"
setting HS_FDS_TIMESTAMP_AS_DATE to default of "TRUE"
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_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"
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics"
Exiting hgosdip, rc=0
ORACLE_SID is "mysqlware"
Product-Info:
Port Rls/Upd:6/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.1.0.6.0_0006, Instance:mysqlware
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=873
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=873
HOCXU_SEM_VER=110000
Entered hgolofn at 2008/03/19-21:50:51
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/libodbc.so"
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2082a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a208330
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a208af0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a209d60
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2117d0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a211c70
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a214480
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a215930
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a216130
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a217b50
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a217b70
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a219270
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21c410
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21c7b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21e250
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21eea0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21f1a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a220fd0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2213a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a222ee0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a222d30
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a227dc0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2295b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a229be0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22b030
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22b8f0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22d550
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22daa0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22e2f0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a230c30
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a231770
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a232190
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a232c20
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233110
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233a10
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233f20
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2344c0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a234b10
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2350a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a236640
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a236380
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2374e0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2380b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Exiting hgolofn, rc=0 at 2008/03/19-21:50:51
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 ".,"
Exiting hgoinit, rc=0 at 2008/03/19-21:50:51
Entered hgolgon at 2008/03/19-21:50:51
reco:0, name:oracle, tflag:0
Entered hgosuec at 2008/03/19-21:50:51
Exiting hgosuec, rc=0 at 2008/03/19-21:50:51
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using oracle as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2008/03/19-21:50:51
HS_FDS_CONNECT_INFO = "mysqlware"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2008/03/19-21:50:51
dsn:mysqlware, name:oracle
optn:
##>Connect Parameters (len=35)<##
## DSN=mysqlware;
#! UID=oracle;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2008/03/19-21:50:51
Entered hgopoer at 2008/03/19-21:50:51
hgopoer, line 159: got native error 0 and sqlstate I; message follows...
Exiting hgopoer, rc=0 at 2008/03/19-21:50:51
hgocont, line 1903: calling SqlDriverConnect got sqlstate I
Exiting hgocont, rc=28500 at 2008/03/19-21:50:51 with error ptr FILE:hgocont.c LINE:1923 FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2008/03/19-21:50:51 with error ptr FILE:hgolgon.c LINE:612 FUNCTION:hgolgon() ID:Calling hgocont
Entered hgoexit at 2008/03/19-21:50:51
Kind regards,
Tomaz -
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?? -
Database link from Oracle 11g (64 bit) to MySQL over UnixODBC with dg4odbc
Hello,
I want to connect to a MySQL Database from Oracle over a database link, but i get always the Error Message ORA-28528: Heterogeneous Services datatype conversion error .
In the forum or internet I can't find a solution for my problem, so I try now to post this problem.
Here a detailed description of the problem:
I use a Oracle 11.1.0.7.0 64bit database which is running on a redhat linux 5.3 64bit.
I want to connect to a MySql Database 5.0, which is running on a redhat linux 5.2 32bit over unixODBC.
The configuration from the ODBC seems to be good, because with isql on the ora server I can connect and query all data correct from the MySQL database.
Also the tsnnames.ora and listener.ora should be configured correctly. The tnsping works also fine.
But when i try to catch the data over SQLPlus with the database link I always get the error ORA-28528.
If I try to select just one column it works, but the returned data are incomplete or truncated.
the version of my libs:
between mysql and odbc I use libmyodbc3.so version 3.51.12-2.2 (I also tried the version 5, but with them I get a segmentation fault error on isql).
between odbc and dg4odbc I use libodbc.so version 2.2.11-7.1
Has anybody a solution or hint for me?
Many Thanks in advance,
best regards from Austria
Manuel
Edited by: user11243186 on 09.06.2009 02:59kdgmanu wrote:
Hello,
I always get the error ORA-28528.
If I try to select just one column it works, but the returned data are incomplete or truncated.
maybe you are facing bug 6772397, so do a search on metalink for bug 6772397
>
Has anybody a solution or hint for me?you could also see the following notes 554409.1 and 603801.1
Many Thanks in advance,
best regards from Austriacheers from Zagreb -
Database link from Oracle DBMS 1g to MS SQL Server
Hi,
I would need to know, if there is some out of the box functionality from the Oracle DBMS 11g where I can connect to MS SQL Server (2005/2008)? If there is good tutorial on how to do it, I would very much appreciate it.
Thanks!
DejanHi,
I have created following:
1. Oracle DBMS 11g Enterprise installe (guessing that also the ODBC drivers for Oracle should)
2. Using MS SQL 2009 Native Client for ODBC connectivity
3. global_names set to false by
alter system set global_names=false;
4. Configures Oracle Heterogeneous services in initHS_ORCL.ora under \hs\admin to
HS_FDS_CONNECT_INFO = HS_ORCL
HS_FDS_TRACE_LEVEL = off
5. Modified listerner.ora to
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = C:\oracle\product\11.1.0\db_1) (SID_NAME = ORCL) ) )
LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = nt-topobase)(PORT = 1521)) )
# Connecting to MS SQL Server via ODBC
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = HS_ORCL) (ORACLE_HOME = C:\oracle\product\11.1.0\db_1) (PROGRAM = hsodbc) ) )
6. Modified TNSnames.ora to
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = nt-topobase.cgs-lj.si)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL) ) )
# Connecting to MS SQL Server via ODBC (added newly)
HS_ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS= (PROTOCOL = TCP) (HOST = nt-topobase) (PORT = 1521)) (CONNECT_DATA = (SID=HS_ORCL)) (HS=OK))
7.Restarted Oracle service
8. Created Database link for an existing user sz that is sysdba in the ORCL instance:
create database link hs_orcl connect to sz identified by admin using 'HS_ORCL';
Database link created.
9. Tried logging:
C:\>sqlplus sz/admin@hs_orcl
SQL*Plus: Release 11.1.0.7.0 - Production on Pon Mar 1 14:58:40 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
11. Tried logging (successful)
C:\>sqlplus sz/admin@orcl
SQL*Plus: Release 11.1.0.7.0 - Production on Pon Mar 1 14:58:52 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from ges@hs_orcl;
select * from ges@hs_orcl
ERROR at line 1:
ORA-02019: connection description for remote database not found
SQL> select * from ges@hs_orcl;
select * from ges@hs_orcl
ERROR at line 1:
ORA-02019: connection description for remote database not found
Cannot get the select from the MS SQL Server 2005 on the table 'GES'. -
How to create a DBlink from oracle database on unix to sqlserver
Hi
I need to create a database link from oracle database on solaris machine to sqlserver database.I found that the database link cannot be created from oracledatabase 10g to microsoft sqlserver.So i am planning to go for another windows server where i can pull this data from sqlserver to oracle 10g database on windows and then from windows to unix.
Can you explain me how can i create a database link from orace 10g on windows to sqlserver.HI
Thanks for your response.
But the thing is i am looking whether if u can create a database link from oracle to sqlserver from unix.If that's the case what is the driver i require and if not how can i do it ?
I am ready to create a intermediate windows server where i can pull the table temporarily and then from there to unix box.
If i can do it windows how can i achieve that.
Thanks -
How to create database link between oracle and SQL Server
Hello Everyone,
Here i have Oracle Database 9i and SQL Server 2005 databases.
I have some tables in sql server db and i want to access from Oracle.
How to create a database link between these two servers
Thanks,Thanks for Everyone,
I was struggle with this almost 10 days....
I created Database link from Oracle to SQL Server
Now it is fine.........
Here i am giving my servers configuration and proceedure how i created the db link...@
Using Generic Connectivity (HSODBC) we can create db link between Oracle and SQL server.
Machine (1)
DB Version : Oracle 9.2.0.7.0
Operating System : HP-UX Itanuim 64 11.23
IP : 192.168.0.31
Host : abcdbt
Machine (2)
Version : SQL Server 2005
Operating System : Windows server 2003 x86
IP : 192.168.0.175
Host : SQLDEV1
User/PW : sa/abc@123! (Connect to database)
Database : SQLTEST (exsisting)
Table : T (“ T “ is the table existing in SQLTEST database with 10 rows)
Prerequisites in Machine (2):
a) Oracle 10g software
b) User account to access SQL Server database (sa/abc@123!)
c) Existing SQL Server Database (SQLTEST)
d) Tables (testing purpose) (T)
Steps:
1) Install Oracle 10.2.0.1 (Only SW,No need of database) *(Machine 2)*
2) Create a DSN where your windows Oracle 10g SW resides *(Machine 2)*
Control panel >> Administrative Tools >> Data Source (ODBC) >> System DSN ADD
You can follow this link also.....
http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
I created DSN as
DSN name : SQLTEST
User : SA/abc@123! (Existing user account)
Host : 192.168.0.175 (machine 2)
Already I have 1 database in SQL Server with the name SQLTEST
You can create DSN with different name also (not same as db name also)
3) Create a hsodbc init file in $ORACLE_HOME\hs\admin *(Machine 2)*
Create init<DSN NAME> file
Ex: initSQLTEST
Copy inithsodbc to initSQLTEST
And edit
initSQLTEST file
HS_FDS_CONNECT_INFO = SQLTEST <DSN NAME>*
HS_FDS_TRACE_LEVEL = OFF*
save the file....@
4) Configure Listener.ora *(Machine 2)*
LISTENER_NEW =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
SID_LIST_LISTENER_NEW =
(SID_LIST =
(SID_DESC =
(SID_NAME = SQLTEST) *+< Here SQLTEST is DSN NAME >+*
(ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
(PROGRAM = hsodbc))
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
(PROGRAM = extproc) )
:> lsnrctl start LISTENER_NEW
5) Configure tnsname.ora *(Machine 2)*
SQLTEST11 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SQLTEST))
(HS=OK)
:> tnsping SQLTEST11
If No errors then conti….
6) Configure a file *(Machine 1)*
Cd $TNS_ADMIN ($ORACLE_HOME/network/admin)
Create a file
$ vi TEST_abcdbt_ifile.ora
something=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST =192.168.0.175) (PORT=1525))
(CONNECT_DATA=
(SID=SQLTEST))
(HS=OK)
$ tnsping something
$ sqlplus system/manager
Your connected to Oracle database *(machine 1)*
create database link xyz connect to “sa” identified by “abc@123!” using ‘SOMETHING’;
select * from t@xyz;10 rows selected.
Thanks,
Edited by: ram5424 on Feb 10, 2010 7:24 PM -
Database link between Oracle 11g and MS Sql Server 2005 EE
Hi everybody,
I trying to create database link from Oracle 11g to MS Sql and I'm not succesful.
I found tutorial for Oracle 10g, but it does't work.
I created odbc data source, then I modified tnsnames.ora and listener.ora, then I created initkw.ora in HS directory and then I created dabase link, but it does't work.
Can you help me please? Thanks for help ... ondra
Tnsnames.ora:
KW =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp)(HOST = oracle_ip)(PORT = 1521))
(CONNECT_DATA =
(SID = KW)
(HS = OK)
listener.ora:
(SID_DESC =
(SID_NAME = KW)
(ORACLE_HOME = C:\oracle\product\11.1.0\db_1)
(PROGRAM = hsodbc)
initkw.ora
HS_FDS_CONNECT_INFO = kw
HS_FDS_TRACE_LEVEL = 0
HS_FDS_TRACE_FILE_NAME = kw.trc
create public database link KW connect to "user" identified by "pass" using 'KW';
Message was edited by:
user598176Hi, I get two errors.
ORA-28545 - NET8 mistake Unable to restrieve textof NEWTWORK/NCR message 65535
and then ORA-02063
zenda
I resolved one of error, I have wrong ip.
But now I have another error:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC][Microsoft][ODBC Driver Manager] Data source name
not found and no default driver specified (SQL State: IM002; SQL Code: 0)
I have ODBC data source in system DSN
PS: Our Oracle 11g database is 64 bit version
Message was edited by:
user598176
Maybe you are looking for
-
Premiere Pro CS4. Green video all of a sudden 'application not responding'?
I was playing something in the timeline or whatever its called, and all of a sudden I get a green screen so I stop the video. I move to another part of the video to try playing there but I cant press play, there is only the square stop button in its
-
Deploy EAR to weblogic 10.3.4
I get a war file which works fine on Tomcat. I create a jdev project based on this war and deploy it as an EAR. I create weblogic-application.xml for an EAR file and deploy it to weblogic 10.3.4 with EM extension. But I get errors as follow. If I dep
-
Access to trunk port clarification
Hello- I am looking to clarify a point of confusion for myself regrading connecting an access port to a trunk port. Consider the following switchport config on switch1: Switch#1 interface GigabitEthernet0/5 switchport switchport access vlan 6 ....a
-
How to load folder with images php with oracle
Hi i want to upload from my php form folder with images what should i fix in my php code for 1 image? <?php define("ORA_CON_UN", "obrazy"); define("ORA_CON_PW", "miksas1"); define("ORA_CON_DB", "//localhost/orcl"); if (!isset($_FILES['lob_upload']))
-
Border on selected rectangle?
I have a document that will have allot of rectangles in it. I would like to only select one, and put a border on that. I can get the script to work the border/stroke. but I can't figure out how to get it to use the rectangleI have selected. I've trie