64bit環境でROWID型にODBC接続すると例外が発生する
環境
アプリケーションサーバー
OS:Windows 2008 Server R2(64bit)
Oracle: Oracle Client 11gR2(64bit) - 11.2.0.3
データベースサーバー
OS:Windows 2008 Server R2(64bit)
Oracle: Oracle Database 11gR2(64bit) - 11.2.0.1
開発言語:C#
ODBC接続でテーブル、カラム情報を取得するアプリケーションを作成しています。
ROWID型を含むテーブル情報を取得する下記の箇所で例外が発生してしまいます。
OdbcConnection.GetSchema("Columns", new string[] { null, ”任意のスキーマ名”, ”任意のテーブル名”, null});
イベントログには以下の記述がありました。
障害が発生しているアプリケーション名: xxxxxx.exe、バージョン: 1.0.2012.7、タイム スタンプ: 0x5099b35b
障害が発生しているモジュール名: oracore11.dll、バージョン: 11.2.0.1、タイム スタンプ: 0x4e8b9b1e
例外コード: 0xc0000409
障害オフセット: 0x00000000000bf877
障害が発生しているプロセス ID: 0x7bc
障害が発生しているアプリケーションの開始時刻: 0x01cdd14a5528b714
障害が発生しているアプリケーション パス: C:\Program Files\xxxxxx.exe
障害が発生しているモジュール パス: C:\xxxxx\product\11.2.0\client_1\BIN\oracore11.dll
レポート ID: a0c08e39-3d3d-11e2-acff-00155d043048
ROWID型を除いたテーブルを用意してアクセスすると例外は発生しませんでした。
また、32bit環境(データベース、アプリケーション共に)で同じテーブルを用意してアクセスした場合は例外は発生しませんでした。
この問題のヒント、回避策など教えて頂ければ幸いです。
hamadeguchiさん
ALL_TAB_COLUMNSを試してみたところ、期待通りの動作をすることが出来ました。
Frameworkを使用するよりも早く情報を取得できるようになり良かったです。
本当にありがとうございました。
アプリケーションはOracle以外にもSQL ServerやDB2などにも対応しているため
共通の処理が行えるようにODBCを使用していますが、細かいところはどうしても
DBを意識しなければいけない部分が出てきてしまうので難しいですね。
Similar Messages
-
Hello,
Please help. I developed an interface between a CAD and Oracle 10g 32bit on Windows Server 2003. I have no problems with the using of the ODBC driver (Instant Client Package - ODBC (instantclient-odbc-win-x86-64-10.2.0.3.0.zip) on Windows XP 32bit and Windows XP 64bit.
If I try to use 64bit ODBC driver (Instant Client Package - ODBC (instantclient-odbc-win-x86-64-11.2.0.1.0.zip) on Windows 7 64bit with the Oracle DB 10g 32bit on Windows Server 2003, I receive the following message after the line with OraRead = OraComm.ExecuteReader:
Exception: System.OverflowException: Die arithmetische Operation hat einen Überlauf verursacht.
bei System.Data.Odbc.OdbcStatementHandle.RowCount(SQLLEN& rowCount)
bei System.Data.Odbc.OdbcDataReader.GetRowCount()
bei System.Data.Odbc.OdbcDataReader.FirstResult()
bei System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
bei System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
bei System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
The code I use is very simple:
Dim sConnection = "DRIVER=Oracle in instantclient_11_2;UID=xx;DBQ=xx;SERVER=xx;Pwd=xx"
Dim strSQL As String
Dim OraConn As New System.Data.Odbc.OdbcConnection
Dim OraComm As New System.Data.Odbc.OdbcCommand
Dim OraRead As System.Data.Odbc.OdbcDataReader
Try
OraConn.ConnectionString = sConnection
OraConn.Open()
strSQL = "SELECT * FROM TAB"
OraComm.CommandText = strSQL
OraComm.Connection = OraConn
OraRead = OraComm.ExecuteReader
If OraRead.HasRows Then
OraRead.Read()
The test connection from the ODBC admin tool return ok.
Any help will be apricable.
Regards,
HristoI'm having the same problem. Did you ever find a solution for this?
For reference, my question is located over here: OverFlowException on Oracle ODBC RowCount -
I've been trying to create a database link from a MySQL database to Oracle using the Oracle dg4odbc gateway. I downloaded and installed DataDirect's ODBC package which includes mysql ODBC library (ddmysql24.so) and a generic ODBC libary (libodbc.so). After creating the DSN in odbc.ini, I tested it and it can connect to the mysql database. Then I created the init{SID}.ora file in hs/admin directory, added dg4odbc lines in the listener.ora, and added lines in tnsnames.ora. Then I tnspinged the new SID with success. Finally, I created the database link. However, when I tried to access the database, I got the ORA-28500 error. In the trace log, I found the following:
Entered hgolofns at 2009/11/01-06:27:20
libname=/export/home/odbc/ODBC60/lib/libodbc.so, funcname=SQLAllocHandle
hoaerr:28500
Exiting hgolofns at 2009/11/01-06:27:20
Failed to load ODBC library symbol: /export/home/odbc/ODBC60/lib/libodbc.so(SQLAllocHandle)
Exiting hgolofn, rc=28500 at 2009/11/01-06:27:20
Exiting hgoinit, rc=28500 at 2009/11/01-06:27:20 with error ptr FILE:hgoinit.c LINE:282 ID:Loading ODBC aray of function ptrs
Entered hgoexit at 2009/11/01-06:27:20
I searched the functions within libodbc.so and found all the SQLAlloc* functions in this library. Why do I still get the error?
Thanks for your help. Jeffrey
Here's the entire trace log:
Oracle Corporation --- SUNDAY NOV 01 2009 06:27:20.637
Version 11.1.0.6.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "4"
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"
HOSGIP returned value of "FALSE" for HS_FDS_SUPPORT_STATISTICS
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStat
istics"
Exiting hgosdip, rc=0
ORACLE_SID is "MOODLE"
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:MOODLE
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=10
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=873
HOCXU_SEM_VER=102000
Entered hgolofn at 2009/11/01-06:27:20
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/export/home/odbc/ODBC60/lib/libodbc.so"
Entered hgolofns at 2009/11/01-06:27:20
libname=/export/home/odbc/ODBC60/lib/libodbc.so, funcname=SQLAllocHandle
hoaerr:28500
Exiting hgolofns at 2009/11/01-06:27:20
Failed to load ODBC library symbol: /export/home/odbc/ODBC60/lib/libodbc.so(SQLAllocHandle)
Exiting hgolofn, rc=28500 at 2009/11/01-06:27:20
Exiting hgoinit, rc=28500 at 2009/11/01-06:27:20 with error ptr FILE:hgoinit.c LINE:282 ID:Loading ODBC aray of function ptrs
Entered hgoexit at 2009/11/01-06:27:20on which platform did you install DG4ODBC? On a 64bit? In this case did you install the 64bit DD ODBC driver?
What is the output of: file dg4odbc
and: file /export/home/odbc/ODBC60/lib/libodbc.so
can you also please clarify your statement: .. and a generic ODBC libary (libodbc.so). Datadirect ODBC drivers come with their own driver manager ... and you have to use their driver manager with their drivers. -
MySQL ODBC driver (32 bit) linked server, architecture mismatch
Hello,
I am trying to create a linked server in SQL 2012 Management Studio with a MySQL external server. I have used the 32bit ODBC driver as instructed by the developer, following this rule:
To manage a data source that connects to a 32-bit driver under 64-bit platform, use c:\windows\sysWOW64\odbcad32.exe.
My connection is fine using the ODBC connector, but when I try to create the linked server I get an architecture mismatch error: The specified DSN contains an architecture mismatch between the Driver and Application Error 7303.
Can someone help?
Best regards
Kostas
Kostas Backas-Systemgraph TechnologiesHello,
What's the bit verison of the SQL Server ?
Based on your description, you create a DSN connect to MySQL database with 32 bit MySQL ODBC driver under 32bit ODBC Administrator tool (sysWOW64\odbcad32.exe).
When you create linked server on SQL Server instance, it will use 64 bit Microsoft OLE DB Provider for ODBC Drivers if the bit version of SQL Server is 64 bit. That may cause the error you received. In that case, please download 64bit MySQL ODBC driver and
create a DSN with 64 bit ODBC Administrator tool.
Reference: http://dev.mysql.com/downloads/connector/odbc/
If I have any misunderstanding, please correct me.
Regards,
Fanny Liu
If you have any feedback on our support, please click here.
Fanny Liu
TechNet Community Support -
Hi,
I'm working BI4 SP2 Patch 7 in WindowsServer 2008 64bit in a migration project from BOXIR2.
I need to connection Teradata 13 with universe (UNV).
Now, I define 32bit Teradata ODBC driver but I receive this error:
Database error[ODBC Driver Manager]The specified DSN contains an architecture mismatch between the driver and Application(IES 10901)(WIS 10901).
Do I need to install 64bit Teradata ODBC driver?
Thanks in advanced
ViviHi,
You have to go to directory windows/sysWOW64 and run the ODBC manager from this location.
There you have to define your connection in "DSN".
You have to have user account with grant "SELECT" on your Teradata Database.
Regards,
Zbysek Martuszc -
TNS Timeout Error with both 32bit and 64bit drivers installed
I have a server running WIndows 2008 64bit and SQL Server 2012 64bit. I have both the 32bit and 64bit Oracle ODBC drivers installed. 32bit is for SSIS and SSRS uses 64bit. I have an ODBC connection setup for both the 32bit and 64bit. I have the datasources setup for the 64bit and when I test it it works. When I go to run a query I get TNS timeout errors. Any ideas?
Thank you very much, Curt!
It's right: When the 64bit version is running, then the PSDs will be opened by this.
But the configuration under "Bridge Edit/preferences/file type assoiciatons" has the same result as under the "Windows/Systemcontrol/Standardprograms": Never they show the name "Adobe Photoshop.exe (64bit)" - only "Adobe Photoshop.exe" In both cases (Bridge and systemcontrol) I have the possibility to choose the "right" Photoshop.exe by going to the right file (32bit OR 64bit), but the name of the .exe is ever the same: Only "Adobe Photoshop.exe". There is no difference.
And so even if the 64bit version is preferred (in Bridge), the PSD-files will be opened in the 32bit-version, when no one of both versions is running.
But - so or so - you have given me a way to solve my basic-problem!
And when I find the time for experiments, I will show what happens, when I rename the 64bit-exe to "Adobe Photoshop64.exe" to get two different filenames for Photoshop in the Windows-System. (I'm not shure if this will function: When in the Photoshop-System are intrinsic lnks/references to "Photoshop.exe", then I will have no success! Therefore I have to make a HDD-Clone with the whole Windows-System, all Apps and my Working-data before I try to rename. Perhaps there is "no way back to the activation" after renaming the .exe ...
Thank you and kind regards,
Oh-Mann -
お世話になっております。
下記にて、ODBCの設定を行おうとすると、エラーが発生します。
ODBC データソース アドミニストレーターを起動し、
ドライバタブにOracleClientがあるのは確認しました。
どのように解消すればよいでしょうか?
宜しくお願い致します。
手順>
1.Oracle Instant Client Version 11.2.0.2.0(32bit)をダウンロード
2.環境変数を設定
3.ODBCの設定
エラー>
MicrosoftODBCアドミストレーター
システムエラーコード14001:このアプリケーションのサイドバイサイド構成が正しくないため、アプリケーションを開始できませんでした。
(c:\instantclient_11_2\SQORA32.dll)のために、Oracle in instantclient_11_2ODBCドライバーのセットアッププログラムを読み込むことができません。
環境>
Windows7(64bit)
Access2010具体的にODBCドライバは何をダウンロードして、どのように設定を行われたのか提示されてみては如何でしょうか。
-
Database Link to Mysql Database.
Hi Guys.
I need to Create a Database Link a Mysql database that is running over a Red Hat server to my Oracle 10g Database that is running over SUSE. I Have an Application server where the user runs forms and Report. The user access the Application Server that allow them to connect to Oracle Database because is a web Environtment. I would like to access MYSQL database to pull our some data to create a couple of Views for my Users.
Thanks in Advance.
Emmanuel
PD: do I need to configure some ODBC or just modify my tnsname.ora file???add a space to each line in the SID section of your listener - only GTW_LISTENER and SID_LIST_GTW_LISTENER are valid commands to start at the first position in the file.
In addition please remove that line from your gateway init file: HS_FDS_SHAREABLE_NAME=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5w.dll
HS_FDS_SHAREABLE_NAME is used on Unix to specify the ODBC Driver Manager - as you're on Windows where Windoes ships a valid ODBC Driver Manager you don't need to specify that parameter.manager. In addition please remove the set ODBCINI parameter as the Windows ODBC Driver Manager uses the registry. So make sure you have created a 64bit ODBC system DSN using the 64bit MySQL ODBC driver (it has to be the 64bit ODBC driver as you're on a 64bit Windows using a 64bit DG4ODBC)
- Klaus -
How to get data from PostgresSQL to Oracle 11g
I have a general idea on the topic but need more information on the procedure to get data from Postgres (version 8.2 on Linux) database to Oracle 11g (on AIX Unix). Thanks very much in advance!
You need to configure DG4ODBC (=Database Gateway for ODBC). When you install it on a 64bit OS (for example on the same machine as your Oracle database), then it requires a 64bit Postgres ODBC driver. If you install it on a 32bit machine (for example on a 32bit Linux), then you need a 32bit Postgres ODBC driver. Commonly on Unix you also need to install a matching ODBC Dreiver Manager (for example you can get it from www.unixodbc.org) when Postgres doesn't ship one with their driver.
A note describing the DG4ODBC configuration can be found on My Oracle Support:
How to Setup DG4ODBC on Linux x86 32bit (Doc ID 466228.1)
and
How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) (Doc ID 561033.1) -
Help:character misstake when connect mysql by DG4ODBC
platform:redhat linux as 4.0,64bit
oracle database:10.2.0.4 64bit
oracle gateway:11.2.0.1.0 64bit
unix odbc config:
[ODBC Data Sources]
pay0 = MySQL ODBC Driver 5.1
[pay0]
Driver = /home/oracle/odg/myodbc/lib/libmyodbc5.so
DATABASE = pay0
DESCRIPTION = MySQL ODBC 5.1.5 Connector Sample
PORT = 3306
SERVER = xxx.xxx.xxx.xxx
CHARSET = utf8
TRACEFILE = /tmp/myodbc-demodsn.trc
TRACE = OFF
oracle HS config:
HS_FDS_CONNECT_INFO = pay0
HS_FDS_TRACE_LEVEL = 0
HS_FDS_SHAREABLE_NAME = /home/oracle/odg/myodbc/lib/libmyodbc5.so
HS_LANGUAGE=AMERICAN_AMERICA.ZHS16GBK
oracle database
NLS_CHARACTERSET:ZHS16GBK
local character setting
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
After apply setting,isql can fetch correct data,but I get incorrect character by DG4ODBC
SQL> select dump("lbs",17) from "pay_account"@pay0;
DUMP("LBS",17)
Typ=1 Len=20: e5,b9,bf,e4,b8,9c,`,e5,b9,bf,e5,b7,9e,`,e5,a4,a9,e6,b2,b3
Please help me!
Edited by: user6135632 on 2010-4-21 下午7:56I set NLS_CHARACTERSET:AL32UTF8,and HS_LANGUAGE=AMERICAN_AMERICA.AL32UTF8
dg4odbc display error:
ORA-02068: following severe error from PAY0
ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=15211))(CONNECT_DA
TA=(SID=pay0)))
I think maybe DG4ODBC don't supprt "HS_LANGUAGE=AMERICAN_AMERICA.AL32UTF8(UTF8) "
last message from tracefile :
Entered hgocont at 2010/04/22-18:41:47
HS_FDS_CONNECT_INFO = "pay0"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2010/04/22-18:41:47
dsn:pay0, name:dba
optn:
Entered hgocip at 2010/04/22-18:41:47
dsn:pay0
Exiting hgocip, rc=0 at 2010/04/22-18:41:47
Exiting hgogenconstr, rc=0 at 2010/04/22-18:41:47
Entered hgopoer at 2010/04/22-18:41:47
hgopoer, line 233: got native error 0 and sqlstate H; message follows...
Exiting hgopoer, rc=0 at 2010/04/22-18:41:47
hgocont, line 2752: calling SqlDriverConnect got sqlstate H -
Load SQL into Essbase in Unix env
Hi All,
What is the difference between "[Oracle Wire Protocol]" and "[Oracle]" ?
Which one is better ? I installed Oracle client in Essbase server.
I am so confused on parameter setting in odbc.ini. any expert can tell me which parameter should be config or requried ?
HostName=test
LogonID=<required?>
Password=<required?>
PortNumber=1521
ServerName=<required?>
ServiceName=XE
SID=XE
TNSNamesFile=<what is it?>
Thanks a lot...Hi All,
I figure out the problem now.
Following paramter should be filled
HostName=<required>
LogonID=<not required>
Password=<not required>
PortNumber=<required>
ServerName=<not required>
ServiceName=<not required>
SID=<required>
TNSNamesFile=<not required>
And, if the platform is 64bit, the ODBC driver folder should be as follow
/hyperion/common/ODBC-64/Merant/5.2/odbc.ini
Cheers,
TKC -
Oracle 11g and iSeries ODBC 32/64bit version???
Hi folks,
I've some questions....
I need setup a new server with Oracle db 11g and from this db i need setup a DBLINK to an IBM iSeries (AS/400) server. I've some doubts about the 32/64 bit version to use.
My idea is:
Oracle Linux 64bit
Oracle Database 11g 64bit
Oracle Gateway 11g 64bit
IBM i Access ODBC driver 64bit ( maybe 7.1 version?!?!?!)
Do you think I'll be able to achieve my goal with this configuration?
Else where can you suggest me a valid and wonrking configuration?
Thank you very much!!!!
bye byeEmilio,
That combination of products should work, as long as the ODBC driver is 64-bit and satisfies the ODBC driver criteria listed in the documentation.
If you have access to My Oracle Support have a look at this note -
Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX)
Regards,
Mike -
DG4ODBC (11.2 g) on LINUX 64bit using FreeTDS ODBC Driver Manager
Hi,
I got a problem to connect via dg4odbc using usind database link. Below I've listed all my configuration files + dg4odbc trace output.
This is what I've already done:
1. Configured FreeTDS with odbc (see below)
2. I did some test using odbc.ini using isql,tsql and all were succeed :)
3. Configured three files initMSSQL.ora, listener and tnsnames
4. tnsping tns_entry also was succeed (HS=OK)
But when I created public dblink (CREATE PUBLIC DATABASE LINK hslink CONNECT TO "dbuser" IDENTIFIED BY "dbpassword" using 'my_tns entry') i cannot use it becouse it shows me errors listed in dg4odbc file.
Please see my configuration and help me tu figure out what I could done wrong or missmatch something !!!!!!!!!!!!
DATABASE INFO:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
Heterogeneous Agent Release 11.2.0.1.0 - 64bit Production Built with
Oracle Database Gateway for ODBC
**********typical freetds.conf, odbc.ini, odbcinst.ini configuration*********
/etc/freetds/freetds.conf
# Microsoft server
[SQLSERVER]
host = my_host_ip
port = 593377
tds version = 7.0
/etc# cat odbc.ini
[MSSQL]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
Trace = No
Servername = SQLSERVER
Language =
Database = mydb_name
User = mydb_user
Password = mydb_passwd
Logging = 0
LogFile =
QuotedId = Yes
AnsiNPW = Yes
/etc# cat odbcinst.ini
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so
CPTimeout =
CPReuse =
FileUsage = 1
*****Configuration init[SID].ora, listener.ora, tnsnames.ora*****
/u01/app/oracle/product/11.2.0/dbhome_1/hs/admin$ cat initMSSQL.ora
# is a sample agent init file containing the HS parameters that
# are needed for an ODBC Agent.
# HS init parameters
HS_FDS_CONNECT_INFO = MSSQL
HS_FDS_SHAREABLE_NAME = /usr/lib/odbc/libtdsodbc.so
set ODBCINI=/etc/odbc.ini
set ODBCINSTINI=/etc/odbcinst.ini
HS_FDS_TRACE_LEVEL = Debug
#HS_FDS_SUPPORT_STATISTICS = FALSE
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ADR_BASE_LISTENER = /u01/app/oracle
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC=
(SID_NAME=MSSQL)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH = /usr/lib:/usr/lib/odbc)
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
MSSQLCONN=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))
(CONNECT_DATA= (SID=MSSQL))
(HS=OK)
*******dg4odbc trace output***********
:/u01/app/oracle/product/11.2.0/dbhome_1/hs/log$ cat MSSQL_agt_12650.trc
Oracle Corporation --- MONDAY MAY 09 2011 16:22:44.248
Heterogeneous Agent Release
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"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "MSSQL"
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:MSSQL
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 2011/05/09-16:22:44
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib/odbc/libtdsodbc.so"
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff65b50
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff63720
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff62f30
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff638f0
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
hoaerr:28500
Exiting hgolofns at 2011/05/09-16:22:44
Failed to load ODBC library symbol: /usr/lib/odbc/libtdsodbc.so(SQLDescribeParam)
Exiting hgolofn, rc=28500 at 2011/05/09-16:22:44
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 context
Could somebody help me please to figure out what is wrong with??????Hi,
Thanks for very quick response Kgronau!!!
I applied the changes which you suggest and this is what I achived - "Invalid value of 64 given for HS_FDS_SQLLEN_INTERPRETATION" but when I changed HS_FDS_SQLLEN_INTERPRETATION to 32 it disapered and appeared new one :).
I won't pase all trace couse it silly long:
*************trace*******************
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
HOSGIP returned value of "32" for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys
;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "MSSQL"
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:MSSQL
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 2011/05/10-09:25:57
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/local/unixODBC/lib/libodbc.so"
Entered hgolofns at 2011/05/10-09:25:57
symbol_peflctx=0x9bf405f0
hoaerr:0
Exiting hgolofns at 2011/05/10-09:25:57
Entered hgolofns at 2011/05/10-09:25:57
symbol_peflctx=0x9bf40750
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"
treat_SQLLEN_as_compiled = 0
Exiting hgoinit, rc=0 at 2011/05/10-09:25:57
Entered hgolgon at 2011/05/10-09:25:57
reco:0, name:monitoringdb, tflag:0
Entered hgosuec at 2011/05/10-09:25:57
Exiting hgosuec, rc=0 at 2011/05/10-09:25:57
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 monitoringdb as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2011/05/10-09:25:57
HS_FDS_CONNECT_INFO = "MSSQL"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2011/05/10-09:25:57
dsn:MSSQL, name:monitoringdb
optn:
Entered hgocip at 2011/05/10-09:25:57
dsn:MSSQL
Exiting hgocip, rc=0 at 2011/05/10-09:25:57
Exiting hgogenconstr, rc=0 at 2011/05/10-09:25:57
Entered hgopoer at 2011/05/10-09:25:57
hgopoer, line 233: got native error 0 and sqlstate I; message follows...
Exiting hgopoer, rc=0 at 2011/05/10-09:25:57
hgocont, line 2752: calling SqlDriverConnect got sqlstate I
Exiting hgocont, rc=28500 at 2011/05/10-09:25:57 with error ptr FILE:hgocont.c LINE:2772 FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2011/05/10-09:25:57 with error ptr FILE:hgolgon.c LINE:781 FUNCTION:hgolgon() ID:Calling hgocont
Entered hgoexit at 2011/05/10-09:25:57
Exiting hgoexit, rc=0
So I've no idea why it's doesen't work :( . Does somebody know if there is any patch to solve it ??? I did not install any patch on database 11.2.
Thanks a lot -
What is the correct way to connect to a 32bit System DSN (Excel) on a Windows 7 64bit system?
I've recently switched from Windows XP Pro x32 to Windows 7 x64. Now, one of my scripts that uses an ODBC connection will no longer work. After a bit of searching, I discovered that Windows 7 x64 does not currently have 64bit Excel drivers. However, you can set up 32-bit connections by running "C:\Windows\SysWOW64\odbcad32.exe". Unfortunately, my script still won't work even though I set up the System DSN exactly like I did on my old computer. When I run my script, I get the following error:
Quote:
Script: X\XML_Check.vbs
Line: 212
Char: 3
Error: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.
Code: 80004005
Source: Microsoft OLE DB Provider for ODBC Drivers
Line 212 contains:
objConnection.Open "DSN=charge_codes_XLS;"
It seemed to me that wscript.exe will only communicate properly with an identical environment (x32 to x32 or x64 to x64, but not x64 to x32 or x32 to x64). With that in mind, I found a way around the error by running my script via the 32bit version of Windows Script Host. I changed the shortcut path from "X:\XML_CHECK.vbs" to "C:\Windows\SysWOW64\wscript.exe X:\XML_CHECK.vbs" and the script appears to function ok.
What I really want to know is if there is a way to run my script via the 64bit version of wscript.exe yet have it connect to the 32bit ODBC subsystem? Is there a specific connection string I can use or am I just out of luck until Microsoft puts out 64bit Excel drivers?I faced the same issue recently. There was a 32bit MSOffice installed on the 64bit server and the same visual basic code worked from MS Office script debugger, and did not in the cscript/wscript.
It seems that
- the cscript/wscript used 64bit ODBC driver
- the office used 32bit ODBC driver
Excel drivers are installed for 32bit ODBC (because of 32 bit office the ODBC manager 32bit was a full hand of drivers).
Excel drivers are NOT installed for 64bit ODBC manager (because of 32 bit OFFICE) and can not be installed while the 32bit MS OFFICE is installed.
The SQL drivers are installed for 64bit ODBC (so that is why the SQL connection was established well)
The solution would be to run .js .vbs scripts in 32 bit environment:
\windows\SysWOW64\cscript.exe or \windows\SysWOW64\wscript.exe
Search for more with: how do i run a vbscript in 32 bit mode on a 64 bit machine -
Oracle 10gR2 64bit odbc from oracle to sql server Win 2008 EE 64bits
Hi, I am having trouble with a 10gR2 64bits creation of odbc from oracle to sql server, I have follow several instruction with no luck at all. My OS is windows 2008 EE 64bits on the oracle and sql server server.
This is what I have done
1. in the $oracle_home/hs/admin directory
inithsodbc.ora
# HS init parameters
HS_FDS_CONNECT_INFO = hsodbc
HS_FDS_TRACE_LEVEL = off
2. in the $oracle_home/network/admin
# listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
(SID_DESC=
(SID_NAME=hsodbc)
(ORACLE_HOME=C:\oracle\product\10.2.0\db_1)
(PROGRAM=C:\oracle\product\10.2.0\db_1\hs\hsodbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
And the tnsname.ora
# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
PRUEBA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = prueba)
hsodbc =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=1521))
(CONNECT_DATA=(SID=hsodbc))
(HS=OK)
I create the odbc connection an test it , the result is TEST PASSED
4. The i create a database link on my database
CREATE PUBLIC DATABASE LINK XYZ
CONNECT TO "sysdba" IDENTIFIED BY "masterkey"
USING 'hsodbc';
5 execute a select
SQL> select * from dual@XYZ;
select * from dual@XYZ
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 XYZ
6. When I check the listener log i'm getting this error
25-MAR-2011 11:48:40 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169870592)) * status * 0
25-MAR-2011 11:48:47 * (CONNECT_DATA=(SID=hsodbc)(CID=(PROGRAM=)(HOST=PRO)(USER=PRO\Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=49329)) * establish * hsodbc * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
Edited by: user626125 on Mar 26, 2011 11:39 AM
Edited by: user626125 on Apr 12, 2011 2:49 PMHeterogeneous Connectivity
Maybe you are looking for
-
Error: Upgrade von CS5 Design Premium auf CS6 Design und web Premium
Hi, ich möchte ein Upgrade CS6 Design&Web Premium auf meinen iMac(Macosx 10.6.8) installieren. Habe aktuell noch CS5 Design Premium auf dem Rechner. Starte installation von CD, muss die Seriennumer von CS6 eingeben. Es folgt die Meldung" Die angegeb
-
Hi, I want build this scenary. I review the blog's and appear that the correct form to invoke the ws in XI is: <a href="http://host:port/XISOAPAdapter/MessageServlet?channel=<party>:<service>:<channel>">http://host:port/XISOAPAdapter/MessageServlet?c
-
Dear All, While recording results by running QE01 (QM Module) transaction I want to capture the values of <b>result field</b> and <b>valuation field / accept field / reject field.</b>So I want to have an userexit for the transaction. I have found EXI
-
I have a new PC on the way with <sigh> Vista Ultimate 64-bit. I know that iTunes and the iPhone don't currently support this operating system. I'm wondering if anyone has had any success running iTunes in a 32-bit virtual PC under VU64. Anyone? Buell
-
Gifting a CD in the iTunes Store! Can I exchange it?
I gave my Mom a CD off of the iTunes store for Christmas, I gifted it to her, but it turns out she already has it. Is there someway that she or I can exchange it for a different CD? Thanks...