ODBC gateway in windows connecting local oracle to local mysql
I have setup a test system in my local Vista pc with oracle 11g and mysql. Just installed ODBC gateway and follow the instruction. The listener sid for ODBC started OK. But when I tried tnsping <sid>, it failed with tns-03505 failed to resolve name.
Any suggestions?
Thanks,
Lawrence
[email protected] wrote:
Here is the listener.ora for the gateway:# listener.ora Network Configuration File: C:\oracle\Gateway\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENERMYSQLSERVERDSN =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 2522))
SID_LIST_LISTENERMYSQLSERVERDSN=
(SID_LIST=
(SID_DESC=
(SID_NAME=MYSQLSERVERDSN)
(ORACLE_HOME=C:\oracle\Gateway)
(PROGRAM=dg4odbc)
ADR_BASE_LISTENER = C:\oracle\Gateway
TRACE_LEVEL_LISTENER=16
TRACE_FILE_LISTENER=listener.trc
TRACE_DIRECTORY_LISTENER=$ORACLE_HOME/network/trace
#CONNECT_TIMEOUT_LISTENER = 0
Here is the tnsnames for the database:
# tnsnames.ora Network Configuration File: C:\oracle\db\product\11.2.0\dbhome_2\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.myhost.COM)
MYSQLSERVERDSN =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=2522))
(CONNECT_DATA=(SID=MYSQLSERVERDSN))
(HS=OK)
Here is the output from listener:
C:\>lsnrctl start listenermysqlserverdsn
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-JUL-2010 15:11
:37
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
System parameter file is C:\oracle\Gateway\network\admin\listener.ora
Log messages written to c:\oracle\gateway\log\diag\tnslsnr\myhost\listener
mysqlserverdsn\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.64)(PORT=2522)
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.64)(PORT=2522)
STATUS of the LISTENER
Alias listenermysqlserverdsn
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date 23-JUL-2010 15:11:40
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oracle\Gateway\network\admin\listener.ora
Listener Log File c:\oracle\gateway\log\diag\tnslsnr\myhost\listen
ermysqlserverdsn\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.64)(PORT=2522)))
Services Summary...
Service "MYSQLSERVERDSN" has 1 instance(s).
Instance "MYSQLSERVERDSN", status UNKNOWN, has 1 handler(s) for this service..
The command completed successfully
C:\>once again:
03505, 00000, "Failed to resolve name"
// *Cause: The service name you provided could not be found in TNSNAMES.ORA,
// an Oracle Names server, or a native naming service.If the entry could not be found in tnsnames, the process never got far enough for the listener to come into play. Looking at the listener, the listener status, listener configuration, or listener logs is a waste of time for this error.
You couldn't find the number you were looking for in the telephone directory. You don't solve that by looking to the telephone exchange switchboard.
Similar Messages
-
Dear Fellas:
I received "database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2)" on mac os x 10.9.2.
mysql info:
ps -ef | grep mysql
0 66 1 0 11:06AM ?? 0:00.04 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
74 225 66 0 11:06AM ?? 0:02.50 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.err --pid-file=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.pid --socket=/var/run/mysqld/mysqld.sock
501 952 947 0 3:52PM ttys000 0:00.00 grep mysql
Please help!!Fascinated and guessing:
Something related to sock(2) because that's not part of your copied info. I'm thinking you've doubled up on sockets and the second socket doesn't exist, meaning you should be connecting to the first socket "mysqld.sock" whether automatic or not.
I've only used GUI tools on purpose, so does this mean you've already got MySQL running and you tried to launch it again manually? Perhaps you already have one instance of a db and you're trying to launch a second instance, and the two can't coexist with a single user local db?
Assuming this is all local, I'd shut down the db service and restart it, out of hand. I've seen similar messages when I set the db to start up on boot, and it didn't finish shutting down when I tried to restart it manually. Usually the GUI won't let me turn it on because it reports it's already running, but in that case it hadn't finished performing what the GUI was reporting.
Just speculating. -
Odbc driver error while connecting with Oracle BI in Linux
I have Oracle BI Server, Presentation Service and Oracle 11g Client installed in RHEL 5. Oracle BI client is installed in Windows so that I can use Admin tool.
I have created a repository in Windows for sh schema(by creating ODBC). After that I transferred this repository to the ..server/repository in the linux server.
I have installed Oracle ODBC Driver from EASYSOFT and added one odbc data source for sh schema in the ../setup/odbc.ini.
My ODBC setting is as follows.
[ODBC Data Sources]
sh=Oracle in OraDb11g_home1
[sh]
Driver=/usr/local/easysoft/oracle/libesoracle.so
Database=//ipaddress_of_ORACLE_SERVER:port/database_service_name
UID=sh
PWD=sh
When I am trying to query through Oracle Answers I am getting the following error.
Odbc driver returned an error (SQLExecDirectW).
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16023] The ODBC function has returned an error. The database may not be available, or the network may be down. (HY000)
SQL Issued: SELECT Customers."Cust First Name" saw_0 FROM SH ORDER BY saw_0
I have enabled tracing, but I am not getting any clue from trace output.
Can anybody please help.
If it is because of wrong driver, can anybody suggest a proper ODBC Driver for Oracle and how to configure it. If the driver is OK and configuration is wrong, can anybody tell me how to create system dsn in linux?
Thanking you in advance.don't use ODBC for Oracle, use OCI
search on the forum, there's plenty of information about it. -
NET8 timeout with ODBC Gateway
Local:
Database: Oracle XE 11gR2
Oracle ODBC Gateway 11g
Windows 7
Sybase SQL Anyhwere 12 client
Remote:
Database: Sybase SQL Anywhere 10
Windows Server 2008 R2
====================
SQL:
select * from mytable@dblink:
Error returned:
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 dblink
Files:
initdlink.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 = dblink
#HS_FDS_TRACE_LEVEL = 255
HS_LANGUAGE=american_america.we8iso8859p1
HS_NLS_NCHAR=UTF-8
listener.ora
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 = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(SID_DESC =
(SID_NAME = dblink)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\gtw)
(PROGRAM = dg4odbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
DEFAULT_SERVICE_LISTENER = (XE)
tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
dblink =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = localhost)
(PORT = 1521)
(CONNECT_DATA =
(SID = dblink))
(HS=OK))
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)
==========================
(1) Similar setup works ok on Linux connecting to remote Sybase on Windows. But get error below when running on Windows 7.
(2) Similar setup from Windows7 to Windows 2008 R2 works fine when ODBC Gateway on remote Windows 2008 server.
(3) ODBC connectivity has been verified as ok to remote Sybase database on Windows 2008 server.
(4) tnsping dblink verified ok.
Problems started when moving ODBC Gateway to local system where Oracle target database resides.
Please advise.
Added to initdblink.ora the following (no change in results):
HS_KEEP_REMOTE_COLUMN_SIZE = ALL
HS_NLS_LENGTH_SEMANTICS = CHAR
Edited by: user601798 on Dec 4, 2012 11:59 AMYou're mixing different OH's in your listener. The gateway is located in C:\oraclexe\app\oracle\product\11.2.0\gtw, but the database and the listener in: C:\oraclexe\app\oracle\product\11.2.0\server
When you're using DG4ODBC you can use the gateway which is automatically installed in the database home -> you'll find there as well a HS directory and the dg4odbc executable. The other option is to use separate listeners for both installations. For example using the Oracle database listener on port 1521 for the database connections and 1522 for the gateway.
If you really want to use one listener (which is not the preferred solution), then you need also to specify the location to the executable, similar to:
<space>(SID_DESC =
<space><space>(SID_NAME = dblink)
<space><space>(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\gtw)
<space><space>(PROGRAM = C:\oraclexe\app\oracle\product\11.2.0\gtw\dg4odbc)
<space>)
After changing the listener.ora file, please STOP and STAT the listener using lsnrctl utility and provide its output. Also provide the output of tnsping dblink.
- Klaus -
Connection between Oracle 9i and MS Sql Server 2005
Hey Guys,
I am hoping to create materialized view of data on a small sql server box using our oralce 9i cluster. Anyway, i have done this with mysql using the standard odbc dirvers and a dblink, but i am having trouble finding an odbc driver for the connection from oracle to sql server. So, i was wondering if you guys know of a free, or cheap odbc driver, or have a suggestion of an alternative connection method.
PS: i have see: Heterogeneous Services Agents and Transparent gateways floating around, so are these options that don't need the odbc drivers and are free?
Thanks in advanceSome links
http://www.google.lv/search?hl=lv&q=oracle+sql+server+difference&meta=
http://asktom.oracle.com/pls/asktom/f?p=100:1:487512552646613::NO:RP::
http://www.mssqlcity.com/Articles/Compare/sql_server_vs_oracle.htm
http://www.wisdomforce.com/dweb/resources/docs/MSSQL2005_ORACLE10g_compare.pdf
But you have to remember one big thing - I've not seen yet one compare that was completely indifferent to any of the included DB's. So you can be sure that every doc that you get on MS website will say that SQL server is better, every doc on Oracle website will say that Oracle is better. Every doc on other websites will say that better DB either is:
1) DB that has payed for the reserach paper
2) DB that was mostly used by the researchers
So of course you should be very cautious about each paper you get.
Gints Plivna
http://www.gplivna.eu -
Using Oracle ODBC Gateway connecting to a remote Oracle database
Oracle 11gR2
RHEL 6.4
Has anyone use the Oracle ODBC Gateway to connect to another Oracle database? Any issues with that configuration? Where do I get the ODBC drivers for Linux?
(I know, "why not use a dblink?" -- well that would be against company security policies)Hi,
From the Oracle point of view we support using DG4ODBC for Oracle to Oracle connections. However, we have not actually tested it as DG4ODBC is primarily designed for access to non-Oracle databases.
How DG4ODBC will work between Oracle databases depends on the ODBC driver and what that supports. You will need an ODBC Oracle driver which you can get from various suppliers including Oracle but also vendors such as DataDirect, Easysoft etc. You could try a Google search.
You say you do not want to use database links but that is how DG4ODBC is used, You cannot do -
sqlplus user/password@dg4odbc_oracle
Once Dg4ODBC is setup and configured as in this note - if you are using Linux 64-bit -
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install (Doc ID 561033.1)
then in the Oracle database you create a database link and select from tables in the other Oracle database -
select * from table@dg4odbc_db_link ;
Regards,
Mike -
Oracle 10g ODBC driver with Windows 7 32 bit connecting to Excel
Hi Everyone,
I'm having an issue connecting to our oracle 10g database (64 bit system) from a 32 bit windows 7 installation running excel 2010/2007 using odbc drivers. Our excel spreadsheets worked without issue in windows xp.
In windows 7 I have been able to install the odbc driver via the following method:
1. Download the oracle 'basic' client and oracle 'odbc' client from www.oracle.com and extract the contents:
instantclient-basic-win32-10.2.0.3-20061115
instantclient-odbc-win32-10.2.0.3-20061115
2. Create a folder 'oracle' and place the instantclient_10_2 folder inside.
3. Ensure all the basic and odbc files reside in this folder.
4. Create a 'network' folder within instantclient_10_2
5. Create an 'admin' folder within 'network'
6. Create sqlnet.ora and tnsnames.ora files within the 'admin' folder:
7. Run 'obdc_install' within the instantclient_10_2 folder
8. Download and run the oracle odbc driver exe file from www.oracle.com (ORA10203.exe)
9. Go to Control Panel -> Administrative Tools -> Data Sources and create a new System DN
This allows excel spreadsheets connecting ONLY to oracle to function.
Unfortunately some of our spreadsheets connect to both a MySQL database as well as oracle. Spreadsheets connecting only to MySQL also function correctly, however, as soon as the vb associated with a spreadsheet includes a mysql call followed by an oracle call the spreadsheets fail. In Excel 2007 excel crashes completely everytime. In Excel 2010 the mysql data is generated, then when the script hits to oracle odbc connection there is a long pause, the oracle ODBC driver connect pops up requesting a username/password (this didn't happen in xp), then the data source selection pops up, then the username/password connect screen pops up again, and finally it fails with a runtime error '1004' General ODBC error.
If you look at the VB script it's failing at the Refresh BackgroundQuery statement in the ODBC connection block:
With Worksheets("Oracle1").QueryTables.Add(Connection:= _
"ODBC;DSN=Oracle_ODBC;UID=user;PWD=password;SERVER=ORACLE_LINUX;", _
Destination:=Worksheets("Oracle1").Range("A1"))
.CommandText = strSql
.Name = "Oracle1_data"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
Does anyone know how to get around this? It's very important!!
Also if you try to edit the oracle ODBC connections in Control Panels -> Administrative Tools -> Data Sources, ODBC crashes 95% of the time.
Advice greatly appreciated!!Well, here's what I'd check anyway..
1) get Process Explorer from http://sysinternals.com
2) make a mysql connection, get a list of dll's loaded (include the location and version columns in the lower pane output)
3) close that, then make an ora odbc connection, get a list of dlls.
4) close that, then make a mysql connection followed by an ora odbc connection, get a list of dlls
5) compare the lists of loaded dlls. In particular, the difference between #3 and #4, is there a dll dependency that gets loaded by oracle's odbc that comes from a different location when you've opened a mysql connection first?
May or may not help, but might turn up a difference to help point you in a direction.
Greg -
ORA-12154 Windows 7 32bit ORACLE 11g ODBC Driver CONNECT
Hi All,
I'm having problems connecting to extenal database using Oracle ODBC driver for Windows 7 32bit .
I have downloaded the instantclient odbc nt 11.2.0.4zip drivers for 32-bit and unpacked it
and run the installer and choose the default location ie c:\app\product\11.2.0\client_1
2.I done all the necessary setting ie set the Path and creating new user variable for tns admin
in the system environment and modified the hostfile on etc sys32 and copied both tsnamesn and sqlnet
to Network\Admin file
3.I then started the Data Sources (ODBC) manager, configured the driver and tested the
configuration then I got a testing connection error SQLstate= 08004... ORA-12154 TNS couldn't connect.
could you please help. Thanks in advance.I couldn't understand why you need two different tnsnames files. Are they resides in two different directories with filename "tnsnames.ora"? In that case, you need to set the TNS_ADMIN appropriately.
If you haven't named tnsnames files as "tnsnames.ora", then Oracle ODBC driver may not able to access it.
Also if TNS_ADMIN env variable is not pointed to the correct directory where tnsnames.ora file resides, then Oracle ODBC driver won't be able to access it.
In any case, if Oracle ODBC driver unable to access the tnsnames.ora and there is no connection string value stored in the Windows registry, then it throws ORA-12154 error.
Thanks,
Senthil -
ODBC connectivity between Oracle 11G and MSSQL Server on Solaris 10
When we were running in 10G, I was able to successfully configure hsodbc using unixODBC and freeTDS to allow for an ODBC connection between Oracle and MSSQL Server.
A few weeks ago we upgraded to 11G and I've been struggling to get the connectivity (dg4odbc) working.
In our 10g environment unixODBC and freeTDS were compiled as 32-bit. I have recompiled them as 64-bit and switched over to an 11G listener and I am getting the following error:
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
here are my configuration files:
/usr/local/unixODBC/etc[PPRD]> more odbc.ini
[ODBC Data Sources]
identipass = MS SQL Server
[identipass]
Driver = /usr/local/freetds/lib/libtdsodbc.so
Setup = /usr/local/freetds/lib/libtdsodbc.so
Description = MS SQL Server
Trace = 1
TraceFile = /export/home/oracle/ODBC/odbc.trace
Server = stormwind
QuoteID = Yes
AnsiNPW = No
Database = identipass
Port = 1433
TDS_Version = 8.0
[Default]
Driver = /usr/local/freetds/lib/libtdsodbc.so
/usr/local/unixODBC/etc[PPRD]> more odbcinst.ini
[TDS]
Description=FreeTDS driver
Driver=/usr/local/freetds/lib/libtdsodbc.so
Setup=/usr/local/freetds/lib/libtdsodbc.so
Trace=Yes
TraceFile=/tmp/freetds.log
FileUsage=1
UsageCount=2
tnsnames.ora
identipass =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = localhost)(PORT = 1522))
(CONNECT_DATA =
(SID = identipass)
(HS = OK)
listener.ora
LISTENERODBC =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_LISTENERODBC=
(SID_LIST=
(SID_DESC=
(SID_NAME=identipass)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1)
(ENV="LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/db_1/lib:/u01/app/oracle/product/11.2.0/db_1/hs/lib")
(PROGRAM=dg4odbc)
And finally, output from the trace file:
/u01/app/oracle/product/11.2.0/db_1/hs/log[PPRD]> more identipass_agt_1381.trc
Oracle Corporation --- THURSDAY NOV 18 2010 16:00:16.010
Heterogeneous Agent Release
11.2.0.1.0
Oracle Corporation --- THURSDAY NOV 18 2010 16:00:16.008
Version 11.2.0.1.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_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"
HOSGIP returned value of "FALSE" for HS_FDS_SUPPORT_STATISTICS
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$:SQLSt
atistics;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 "identipass"
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:identipass
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=112000
Entered hgolofn at 2010/11/18-16:00:16
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/local/unixODBC/lib/libodbc.so"
Entered hgolofns at 2010/11/18-16:00:16
symbol_peflctx=0x7a715450
hoaerr:0
Exiting hgolofns at 2010/11/18-16:00:16
Exiting hgolofn, rc=0 at 2010/11/18-16:00:16
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 2010/11/18-16:00:16
Entered hgolgon at 2010/11/18-16:00:16
reco:0, name:identipass, tflag:0
Entered hgosuec at 2010/11/18-16:00:16
Exiting hgosuec, rc=0 at 2010/11/18-16:00:16
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 identipass as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2010/11/18-16:00:16
HS_FDS_CONNECT_INFO = "identipass"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2010/11/18-16:00:16
dsn:identipass, name:identipass
optn:
Entered hgocip at 2010/11/18-16:00:16
dsn:identipass
Exiting hgocip, rc=0 at 2010/11/18-16:00:16
Exiting hgogenconstr, rc=0 at 2010/11/18-16:00:16
Entered hgopoer at 2010/11/18-16:00:16
hgopoer, line 233: got native error 0 and sqlstate ; message follows...
Exiting hgopoer, rc=0 at 2010/11/18-16:00:16
hgocont, line 2753: calling SqlDriverConnect got sqlstate
Exiting hgocont, rc=28500 at 2010/11/18-16:00:16 with error ptr FILE:hgocont.c LINE:2772 ID:Something other than invalid authoriza
tion
Exiting hgolgon, rc=28500 at 2010/11/18-16:00:16 with error ptr FILE:hgolgon.c LINE:781 ID:Calling hgocont
Entered hgoexit at 2010/11/18-16:00:16
Exiting hgoexit, rc=0
Can anyone help me see what I'm missing?Thank you for your response.
I modified the envs LD_LIBRARY_PATH parameter in my SID_LIST_LISTENERODBC to be:
(ENV="LD_LIBRARY_PATH=/usr/local/freetds/lib:/usr/local/unixODBC/lib:/u01/app/oracle/product/11.2.0/db_1/lib:/
u01/app/oracle/product/11.2.0/db_1/hs/lib")
and bounced the listener, but I'm still getting the same error.
I do not have a lib64 directory in my Freetds installation, but all the files in the lib directory are 64-bit.
Here is a listing of my DG4ODBC init file:
/u01/app/oracle/product/11.2.0/db_1/hs/admin[PPRD]> more initidentipass.ora
# 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 = identipass
#HS_FDS_TRACE_LEVEL = 0
HS_FDS_TRACE_LEVEL = Debug
HS_FDS_SHAREABLE_NAME = /usr/local/unixODBC/lib/libodbc.so
HS_FDS_SUPPORT_STATISTICS=FALSE
HS_LANGUAGE=AMERICAN.AMERICA.WE8ISO8859P15
# ODBC specific environment variables
set ODBCINI=/usr/local/unixODBC/etc/odbc.ini
# Environment variables required for the non-Oracle system
#set <envvar>=<value>
Thanks for your help with this!
Catina -
Connecting from oracle on windows 2008 64 bit to sql server.
Hi,
Oracle Server name: oraxyz
Database: 11.2.0.4 on windows 64 Bit.
Database home: d:\app\product\11.2.0\db_1
SQL server: sqlabc
I have a oracle database 11.2.0.4 on widows 2008 64 Bit on host oraxyz. I have to connect to SQL server sqlabc from this oracle database.
So I installed gateway for windows on oraxyz server in location d:\app\product\11.2.0\gateway.
My initdg4msql in Gaeway oracle home dg4msql\admin looks like this.
# This is a customized agent init file that contains the HS parameters
# that are needed for the Database Gateway for Microsoft SQL Server
# HS init parameters
HS_FDS_CONNECT_INFO=[sqlabc]:1433//prodsql
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
Then I created a listener in gateway oracle home as follows.
DG4MSQL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
SID_LIST_DG4MSQL =
(SID_LIST =
(SID_DESC =
(SID_NAME = dg4msql)
(ORACLE_HOME = D:\app\product\11.2.0\Gateway)
(PROGRAM = dg4msql)
Then in Oracle db home I created a tns alias as follows.
dg4msql =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
(CONNECT_DATA =
(SID = dg4msql)
(HS = OK)
Then created a database link as follows
SQL>CREATE PUBLIC DATABASE LINK tosql connect to abc identified by 123 using 'DG4MSQL';
SQL> DESC sqlservertable@tosql gives me error
ERROR:
ORA-28546: connection initialization failed, probable Net8 admin error
ORA-02063: preceding line from tosql
Could any one please help.
Do I have to create any ODBC connection for that?
BRNot part of your problem (yet) but I always get heartburn when I see someone naming their listener as if it has a relationship to something when it doesn't. There really is no point to naming a listener as anything but its default name of LISTENER.
So, in your listener.ora, instead of
DG4MSQL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
SID_LIST_DG4MSQL =
(SID_LIST =
(SID_DESC =
(SID_NAME = dg4msql)
(ORACLE_HOME = D:\app\product\11.2.0\Gateway)
(PROGRAM = dg4msql)
Just use
LISTENER=
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = dg4msql)
(ORACLE_HOME = D:\app\product\11.2.0\Gateway)
(PROGRAM = dg4msql) -
Oracle gateways 11g to connect sybase
Dear Gurus,
Is there any document/tutorial related to oracle gateways 11g.
I want to use oracle gateway and odbc to connect sybase.
How to connect sybase from oracle database?is possible using dblink?
Thank you
JOEHi Joe,
yes it is possible. All you need is a suitable ODBC driver and the Database Gateway for ODBC.
There are documents available within the Oracle Support knowledge base (htp://support.oracle.com). As you didn't specify your preferred platform here a list of possible notes:
How to Configure DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit to Connect to Non-Oracle Databases Post Install [Document 466225.1]
How to Configure DG4ODBC (Oracle Database Gateway for ODBC) on 64bit Windows Operating Systems to Connect to Non-Oracle Databases Post Install [Document 1266572.1]
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install [Document 561033.1]
How to Configure DG4ODBC on Linux x86 32bit or on HP-UX RISC (DG4ODBC 11.1 only) to Connect to Non-Oracle Databases post install [Document 466228.1]
- Klaus -
Not connecting to Oracle Database from Oracle BIEE 10g on Windows 7 machine
Hi friends,
I succesfully installed OBIEE 10g on my Windows 7 (Ultimate) machine using the assistance from one of your threads.
Now I am not able to connect to Oracle 11g database. When I tried to configure through START->Control Panel --> Administrative Tools --> DATA SOURCES (ODBC) ---> ....I am seeing Oracle 11g in System DSN but I am unable to see OBIEE driver in system DSN. After setting manually, I am now seeing OBIEE driver in user DSN. So is all other 32 bitapplications like MS Acess, Excel, etc., are all in user dsn.
When I open OBIEE Administration tool, I can only see ONLY Analytics Web and nothing else. How do I connect to Oracle database. Please assist me.
Thanks in advance.
DinHi,
Your window os 32bit or 64bit -- Please conform?
Your Os 64 bit -- http://www.mycabi.net/?p=19 please read this link.
Your windows os 32 bit :
Go--> Run--> odbcad32 follow the below step
In ODBC Administration, on the System DSN tab add a new connection
1. step : Data Source: "Oracle BI Server" -->"Next"-->Name: "AnalyticsWeb"-->Server: "local"-->(everything else unchecked)-->"Next"-->Give the username for the BI Server-->"Administrator" -->(I think the password can main blanc),Port: "9703 -->(everything else unchecked)-->"Next"-->(everything unchecked)-->"Finish"
When I tried to configure through START->Control Panel --> Administrative Tools --> DATA SOURCES (ODBC) ---> ....I am seeing Oracle 11g in System DSN but I am unable to see OBIEE driver in system DSN
A. I don't no why your creating ODBC connection.
Note: Open your rpd with AnalyticsWeb and give me useranme and password --> go to physical layer select connection pool and give all credntails here.
http://gerardnico.com/wiki/dat/obiee/ociv -- please refer this link
Datasource : Your dbname (ORCL,)
username: your schema name
Password: your schema password.
Hope it help's
Thanks,
Satya -
Excel-2007 cannot connect to Oracle ODBC data source, Control Panel can.
<p>
I cannot make an ODBC connection from Exce-2007 to Oracle work. I am an expert Excel and VBA user (since 1994) and I have frequently used Excel to access ODBC databases, including Oracle (I have done this with Excel-2003 both with worksheet queries and have written VBA ADO-connection routines). And even though in Excel-2007 a worksheet ODBC query is supposed to be easier to create than in previous version of Excel, my connection fails. Any suggestions and all help are welcome and much appreciated.
DETAILS
</p>
<p>
1) <strong>What is my system?</strong> I am using Excel-2007 on Windows Vista x64 and Oracle server v.11g on my computer (all this is on my computer, no network issues).
2)<strong> Why use Excel with Oracle at all?</strong> I use Excel-2007 to access Oracle rather than Access-2007 (or any other application like TOAD, etc.) because I do engineering calculations with the data stored in Oracle. These calculations are easier done in Excel (I suppose that one alternative to this could be to use some sql or Access to get the data from the database, then store it as plain vanilla CSV file, then open this file in Excel, then do the math (the math involves complex optimisation algorithms), then save the results as CSV, then use some sql or Access to put the data back into the database. Howwever this does not strike me as a quick or neat solution. And after all Excel has been designed to access ODBC databases, so why not use it?)
3) <strong>What do I do in Excel-2007 that won't work?</strong> I create an ODBC link to Oracle that does not work. In Excel-2007 this is straightforward:
</p>
<ul>
<li>define an ODBC connection (Data tab --> From other sources --> From data connection wizard);</li>
<li>define a query on the worksheet -- that's it, this is all!</li>
</ul>
<p>
I start with creating an ODBC connection:
a) I choose an ODBC data source type: <strong><em>ODBC DSN</em></strong>
b) Excel-2007 displays the list of the available ODBC data sources. I see in it <strong><em>my Oracle database name</em></strong> and I select it.
c) Excel-2007 displays the Data Link Properties:
- the "Provider" has a list of the OLE DB drivers with preselected "<strong><em>Microsoft OLE DB Provider for ODBC Drivers</em></strong>". I keep this default selection.
- the "Connection" tab has a connection string "<strong><em>DSN=<my database name></em></strong>" which I keep, it also has fields for the <strong><em>user name</em></strong> and the <strong><em>password</em></strong>, which I fill with the correct credentials.
- Finally there is a button "Test Connection", which when I click produces the following error message:
<strong><font color="#ff0000">"Test connection failed because of an error in initializing provider.</font></strong><strong><br />
</strong><strong><font color="#ff0000">Unespecified error"</font></strong><strong>
</strong>
4) <strong>Additional food for thought:</strong>
a) In the above walk-through the only data, which I type, are the user name and password, everything else is selected from lists offered by Excel-2007, hence any possibility of typos being the cause of the problem can safely be discarded.
b) I can test the ODBC driver in the Control Panel and it shows that it can connect to the Oracle database:
- in <strong><em>Control Panel --> Admin Tools --> Data Sources (ODBC)</em></strong> on the "User DSN" tab I can see the list of the available ODBC data sources (same list as in Excel-2007, point 3b above) with the name of my database in it;
- selecting the name of my database from the list of the sources and clicking "Configure" button opens a tab with <strong><em>Data Source Name</em></strong> (same as in Excel-2007), TNS Service Name and User ID. I enter <strong><em><user name>/<password></em></strong> and click "Test Connection" button. A message "<strong><em>Connection successful</em></strong>" appears (just for a test I enter <u>incorrect user credentials</u> and "<strong><em>Unable to connect</em></strong>" message appears)
BOTTOM LINE
</p>
<p>
The procedure for using an ODBC connection from Excel is very simple, in the past I have created and used such connections numerous times with Excel-2003 and earlier on Win-XP and earlier. But now on Excel-2007 and Vista-x64 I cannot make it work.
Also, testing an ODBC connection driver is really easy and simple to be done in the Control Panel. There testing the same ODBC connection, which fails in Excel-2007, results in success.
I am frustrated by the simplicity of the problem and yet the persistant error. I have lost now two full days in failed attempts to make the simple procedure work and in searching the internet for answers.
All help is highly appreciated <img class="emoticon" src="images/emoticons/happy.gif" border="0" alt="" width="16" height="16" />,
Plamen
</p>Did you find the solution to your problem?
If not, I think I may know.
Excel 2007 is a 32-bit application.
When installing 32-bit applications in a 64-bit environment, the "default" location is:
C:\Program files (x86)\...
Excel then launches from this location.
However, when it connects to Oracle and passes the name of the calling program, Oracle attempts to "interpret" the value of (x86) as if
the value within the parenthesis are being passed as a reference. Of course, iOracle doesn't find anything, so the result is (),
and then it cannot return the connection info back to the calling application.
I corrected it by installing Excel in C:\Program Files\, and once launched from that location, it works the same as on the 32-bit machines.
However, at my location, they are FORCING Excel to be installed in the(x86) location.
What I'm trying to discover now is:
Is it possible to flag Oracle to NOT process the embedded variables?
Or, is it possible to assign a variable in Oracle such that x86 = "(x86)", so that the end result is viable?
Have you had any luck with your installation?
thanks,
Paul -
Problem with Oracle ODBC Driver on Windows 7
Hi,
Please help with this problem I have with a Windows 7 machine. I have installed Oracle Client 11g on my Windows 7 machine but when I want to create an ODBC Data Source, I cant find any driver for oracle. How can I resolve this issue? I need the data source for an application to work and I cant figure out what is happening. Someone please help!There's a dedicated Oracle ODBC forum:
ODBC
As this forum deals with connections from Oracle to foreign data stores it would be better to close this thread and post it again in the ODBC forum. -
Unable to connect to Oracle database running on Windows machine from linux.
Hi,
I'm not able to connect to oracle database running on Windows machine from Linux machine. I'm geting the below mentioned error. I have given below the code I used to connect to database and database propertes.Do I need to use any specific driver?
Please help me.
Thanks,
Sunjyoti
Code :
import oracle.jdbc.pool.OracleDataSource;
import java.sql.Connection;
import java.util.*;
import java.sql.*;
import java.io.*;
class try2{
public static void main(String args[]) {
try {
System.out.println("hi");
// Load the properties file to get the connection information
Properties prop = new Properties();
prop.load(new FileInputStream("/home/sreejith/EDIReader/Connection.properties"));
// Create a OracleDataSource instance
OracleDataSource ods = new OracleDataSource();
System.out.println("prop is "+prop);
configureDataSource(ods, prop);
Connection conn=null;
// Create a connection object
conn = ods.getConnection();
System.out.println("Connection is"+conn);
// Sets the auto-commit property for the connection to be false.
conn.setAutoCommit(false);
} catch (SQLException sqlEx){ // Handle SQL Errors
System.out.println("In exception "+sqlEx);
} catch(Exception excep) { // Handle other errors
System.out.println(" Exception "+ excep.toString());
private static void configureDataSource(OracleDataSource ods, Properties prop) {
// Database Host Name
ods.setServerName(prop.getProperty("HostName"));
// Set the database SID
ods.setDatabaseName(prop.getProperty("SID"));
// Set database port
ods.setPortNumber( new Integer( prop.getProperty("Port") ).intValue());
// Set the driver type
ods.setDriverType ("thin");
// Sets the user name
ods.setUser(prop.getProperty("UserName"));
// Sets the password
ods.setPassword(prop.getProperty("Password"));
Connection properties :
# Your Database Connection details
HostName = 10.20.3.19
SID = EDIREAD
Port = 1521
UserName = dbuser
Password = dbuser
Error I'm getting is
error while trying to connect with odbc datasource
[root@iflexpau2217 EDIReader]# java try2
hi
prop is {HostName=10.20.3.19, Password=dbuser, UserName=dbuser, SID=EDIREAD, Port=1521}
In exception java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
Also I tried to connect with weblogic JDBC driver
Code is here:
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
//import com.entrust.toolkit.util.ByteArray;
public class trial{
public static void main(String args[]) throws IOException{
System.out.println("hi");
Connection p_conn = null;
PreparedStatement xml_insert = null;
try {
// Load the JDBC driver
System.out.println("hi2");
// String driverName = "oracle.jdbc.driver.OracleDriver";
String driverName = "weblogic.jdbc.oracle.OracleDriver";
System.out.println("hi2");
Class.forName(driverName);
// Create a connection to the database
String serverName = "10.20.3.19";
String portNumber = "1521";
String sid = "EDIREAD";
//String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
String url = "jdbc:bea:oracle://10.20.3.19:1521";
String username = "dbuser";
String password = "dbuser";
System.out.println("connection is:"+p_conn+"user name is"+username+"password is"+password);
p_conn = DriverManager.getConnection(url, username, password);
System.out.println("connection is:"+p_conn+"user name is"+username+"password is"+password);
xml_insert=p_conn.prepareStatement("insert into PRTB_SUBUNIT (SUBUNT_ID,SUBUNT_SUB_UNIT,SUBUNT_PHYUNT_ID) values (?,?,?)");
//InputStream in=null;
File l_file=new File("/home/sreejith/EDIReader/propertyfiles/inputfile/BUG_10802_ES_CSB19_68.txt");
BufferedReader input =null;
input=new BufferedReader(new FileReader(l_file));
String line = null;
StringBuffer trial=new StringBuffer();
while (( line = input.readLine()) != null){
trial.append(line);
trial.append(System.getProperty("line.separator"));
//InputStream is = new BufferedInputStream(new FileInputStream(l_file));
System.out.println(trial.toString());
//Blob b ;
//byte[] bytes=trial.toString().getBytes();
//System.out.println("Size-->"+bytes.length);
xml_insert.setString(1,new String("SpecailChar"));
//xml_insert.setBinaryStream(2,new ByteArrayInputStream(bytes),15920);
xml_insert.setString(3,"SpecailChar");
xml_insert.executeUpdate();
p_conn.commit();
} catch (ClassNotFoundException e) {
System.out.println("ClassNotFoundException:"+e.getMessage());
// Could not find the database driver
} catch (SQLException e) {
System.out.println("SQEXCEPTIN:"+e.getMessage());
// Could not connect to the database
}catch (FileNotFoundException e) {
System.out.println("filenot found:"+e.getMessage());
// Could not connect to the database
Error I'm getting is
error while trying with jdbc:
SQEXCEPTIN:[BEA][Oracle JDBC Driver]Error establishing socket to host and port: 10.20.3.19:1521. Reason: Connection refusedIs the Windows firewall active? Have you enabled the port on the firewall, if it is?
Maybe you are looking for
-
Contabilização Subcontratação para Pedido de Compra
Boa tarde Temos o processo de Subcontratação Standard do SAP para Pedido de Compra. Feito o envio pela ME2O. Retorno com Pedido de Compra tipo L para Pedido de Compra, MIGO com baixa de Componentes e MIRO (processo normal). Porém minha duvida está co
-
PDFMaker Server could not be loaded
When I try to create an Acrobat Pro 8 file from within Word, I get an "Acrobat PDFMaker" dialog saying "The Acrobat PDFMaker Server could not be loaded. Do you want to run the installer in repair mode?" Cannot find this error in the KB. I have alread
-
IPhoto created 156GB hidden temp file??
I just found 156 GB big hidden file on my hard drive. It seems to be somehow related to iPhoto Library, my guesstimate from the file name: Users/"usernamexx"/.OTMSW/203F366E-B0EB-3099-8AC3-E15F118B53E8/~/Pictures/iPhoto Library/Library6.temp *Does an
-
Required Vahicle wise Transport Cost
Dear Experts, We have required to per trip transport cost. presently we have making multiple Invoices for one vehicle. How to update the same in system. please guide. we are not use logistic module. Regards BK GAIKWAD
-
Could someone provide the link to where the SQL test can be taken online ?
Good morning, Apologies for the lame question. I did search! I read in another thread in this forum the following: > The SQL test you can take online, which should allow you to take it as soon as you're ready. > After some googling and looking around