[freetds] isql configuration error
Gau, Terry
tgau at rand.org
Fri May 5 19:23:34 EDT 2006
Hi,
I am new to FreeTDS and unixODBC, so please excuse my likely naive posting. I find lots of similar postings on google, but can't seem to find the solution for me.
My ultimate goal is to connect to SQLServer from Oracle using Generic Connectivity.
Facts:
------------------------
Solaris 5.8
freetds-0.63
unixODBC-2.2.11
Oracle 8.1.7.4
SQLServer 2000 (domain login) (located in Europe)
Configuration Files:
---------------------------
$ odbcinst -j
unixODBC 2.2.11
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
USER DATA SOURCES..: /usr/local/lib/libodbc.so
$ cat odbcinst.ini
[FreeTDS]
Description = v0.63 with protocol v8.0
Driver = /usr/local/lib/libodbc.so
UsageCount = 1
[ODBC]
Tracefile = /tmp/odbc.log
Trace = Yes
This freetds.conf file has been cleaned up considerable in an attempt to simplify things for me.
$ cat freetds.conf
[global]
# TDS protocol version
tds version = 8.0
[re_data_warehouse]
host = re-navi-test.fakedomainname
database = re_data_warehouse
port = 1433
$ cat .odbc.ini
[ODBC Data Sources]
FreeTDS
ODBC
re_data_warehouse
[FreeTDS]
Description = v0.63 with protocol v8.0
Driver = /usr/local/lib/libodbc.so
UsageCount = 1
[ODBC]
Tracefile = /tmp/odbc.log
Trace = Yes
[re_data_warehouse]
Description = MS SQLServer
Server = re-navi-test.fakedomainname
Database = re_data_warehouse
Port = 1433
TDS_Version = 8.0
Behavior:
----------------------------------
I am able to connect to SQLServer and run sql queries using both methods of tsql (-H and -S).
isql fails with...
$ isql -v re_data_warehouse
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
I get the isql errors regardless of if Driver is set to /usr/local/lib/libtdsodbc.so (as installed) or set to /usr/local/lib/libodbc.so.
I now get the same messages when attempting to connect from Oracle through a database link after changing init.ora variable HS_FDS_SHAREABLE_NAME from /usr/local/lib/libtdsodbc.so to /usr/local/lib/libodbc.so. I get library errors when using libtdsodbc.so. I suspect that once I fix isql, Oracle Generic Connectivity should work.
ODBC Trace Output:
------------------------------
$ cat odbc.log
[ODBC][28232][__handles.c][444]
Exit:[SQL_SUCCESS]
Environment = 1dc8d0
[ODBC][28232][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 1dc8d0
[ODBC][28232][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 1dce68
[ODBC][28232][SQLDriverConnect.c][678]
Entry:
Connection = 1dce68
Window Hdl = 0
Str In = [DSN=re_data_warehouse;UID=FAKEDOMAIN\bcamgr;PWD=*********][length = 51 (SQL_NTS)]
Str Out = ffbed7bc
Str Out Max = 1020
Str Out Ptr = ffbed7ba
Completion = 0
[ODBC][28232][SQLDriverConnect.c][1085]Error: IM002
[ODBC][28232][SQLError.c][424]
Entry:
Connection = 1dce68
SQLState = ffbed72c
Native = ffbed120
Message Text = ffbed528
Buffer Length = 511
Text Len Ptr = ffbed526
[ODBC][28232][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = IM002
Native = ffbed120 -> 0
Message Text = [[unixODBC][Driver Manager]Data source name not found, and no default driver specified]
Naive Summary:
------------------------
It looks to me like the driver/library file isn't looking for odbc.ini or freetds.ini files. My intention is to use the ODBC only configuration, but I honestly can't determine how to force that.
TIA for any and all feedback.
Terry
--------------------
This email message is for the sole use of the intended recipient(s) and
may contain privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.
More information about the FreeTDS
mailing list