Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sybase ODBC driver - numeric or decimal datatype problem

648678Jul 7 2008 — edited Jul 8 2008
Hello!
I have Sybase Adaptive Server Enterprise 15.0.2 and Oracle 10.2.0 ("show release" in SQL*plus prints 1002000100) on the same machine (OS = Windows XP, name = Workstation). I wanna load correct information from the table in Sybase via Oracle database link.
Well, I've edited tnsnames.ora, listener.ora. Also I've created initmysybase.ora in hs\admin directory. And, of course, set up DSN (using Sybase ODBC driver) via odbcad32.exe - and named it "mysybase".
Table ("test", user = guest) definition in Sybase is:
column "id" - int, column "data_num" - numeric(10, 5), column "data_dec" - decimal(10, 5). And it's content is: (1, 1.12345, 5.54321). I've set up a database link.

My problem is that whenever I do the SELECT statement (SELECT * FROM "guest.test"@mysybase) I get 0 (zero) for both data_num and data_dec columns.

Status of investigation:

The "describe" command in SQL*plus returns:
id NOT NULL NUMBER(10)
data_num NUMBER(10,5)
data_dec NUMBER(10,5)


UPDATE statement works perfectly.

I've downloaded a trial version of ODBC drivers from www.datadirect.com and all works fine.

So, I believe that maybe there are some bugs in ODBC driver from Sybase, or maybe I should configure smth.

My initmysybase.ora:
HS_FDS_CONNECT_INFO = mysybase
# HS_FDS_TRACE_LEVEL = DEBUG
HS_FDS_TRACE_LEVEL = ON
HS_NLS_NUMERIC_CHARACTER = ",."
HS_LANGUAGE = American

tnsnames.ora:
mysybase =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
)
(CONNECT_DATA =
(SID = mysybase)
)
(HS = OK)
)

listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
)
)

SID_LIST_LISTENER =
(SID_LIST =
...
(SID_DESC =
(GLOBAL_DBNAME = mysybase)
(SID_NAME = mysybase)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = hsodbc)
)
)

So, maybe anybody know how to solve this problem?

Thanks,
Yury
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2008
Added on Jul 7 2008
7 comments
3,823 views