Skip to Content.
Sympa Menu

freetds - Re: [freetds] isql configuration error

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Gau, Terry" <tgau AT rand.org>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] isql configuration error
  • Date: Mon, 8 May 2006 20:53:11 -0700

Hello again, Vitaly.
All this did was rebuild my odbc.ini file....., but it worked. Go figure. I
can now connect with isql. Thanks!

I now have to figure out why Oracle's Generic Connectivity isn't working
yet.....

Thanks, again.

Terry

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org]On Behalf Of VZverev AT genesis.spb.ru
Sent: Monday, May 08, 2006 3:05 PM
To: FreeTDS Development Group
Subject: Re: [freetds] isql configuration error


Ok, it looks like on "where is my odbc.ini?" problem.
Hmm... usually, as Solaris man, I suggest to do: truss -f 2>&1
/usr/local/unixODBC/bin/isql dsn
For example:
bash-2.03$ truss -f 2>&1 /usr/local/unixODBC/bin/isql dsn | grep odbc.ini
16187: access("/usr/local/unixODBC/etc/odbc.ini", 0) = 0
16187: stat64("/usr/local/unixODBC/etc/odbc.ini", 0xFFBEF2E8) = 0
16187: open("/export/woland//.odbc.ini", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
16187: open("/export/woland//.odbc.ini", O_RDONLY) = 4
16187: open("/usr/local/unixODBC/etc/odbc.ini", O_RDONLY) = 4
16187: open("/usr/local/unixODBC/etc/odbc.ini", O_RDONLY) = 4
16187: open("/export/woland//.odbc.ini", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
16187: open("/export/woland//.odbc.ini", O_RDONLY) = 4
16187: open("/usr/local/unixODBC/etc/odbc.ini", O_RDONLY) = 4
16187: open("/usr/local/unixODBC/etc/odbc.ini", O_RDONLY) = 4
bash-2.03$
Now, we'll remove all local dsns...
bash-2.03$ echo > /export/woland//.odbc.ini
And try to use one
bash-2.03$ /usr/local/unixODBC/bin/isql -v dsn
[IM002][unixODBC][Driver Manager]Data source name not found, and no default
driver specified
[ISQL]ERROR: Could not SQLConnect
Indeed it's expected, now restore default driver record only (for instance)...
bash-2.03$ echo "[Default]" >> /export/woland//.odbc.ini
bash-2.03$ echo "Driver=/bla/bla/bla/libfoo.so" >> /export/woland//.odbc.ini
bash-2.03$ /usr/local/unixODBC/bin/isql -v dsn
[01000][unixODBC][Driver Manager]Can't open lib '/bla/bla/bla/libfoo.so' :
ld.so.1: /usr/local/unixODBC/bin/isql: fatal: /bla/bla/bla/libfoo.so: open
failed: No such file or directory
[ISQL]ERROR: Could not SQLConnect
bash-2.03$ bingo

Sincerely yours.
-------------------------------------------------------
Vitaly Zverev, OCP DBA 8&8i
Oracle E-Business Suite &
Infiniband Linux Cluster Administrator
Genesis Ltd., St.Petersburg, Russia



> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Gau, Terry
> Sent: Monday, May 08, 2006 7:12 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] isql configuration error
>
> Thanks for the suggestion, Vitaly, but I am still getting the
> same error.
>
> $ isql -v re_data_warehouse
> [IM002][unixODBC][Driver Manager]Data source name not found,
> and no default driver specified
> [ISQL]ERROR: Could not SQLConnect
>
> Any other suggestions??
>
> Terry
>
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org]On Behalf Of
> VZverev AT genesis.spb.ru
> Sent: Saturday, May 06, 2006 1:42 AM
> To: FreeTDS Development Group
> Subject: Re: [freetds] isql configuration error
>
>
> Hello Terry,
> Couldn't you try to replace in odbc.ini: "Server =
> re-navi-test.fakedomainname" on "Servername = re_data_warehouse" ?
>
> Sincerely yours.
> -------------------------------------------------------
> Vitaly Zverev, OCP DBA 8&8i
> Oracle E-Business Suite &
> Infiniband Linux Cluster Administrator
> Genesis Ltd., St.Petersburg, Russia
>
>
>
> > -----Original Message-----
> > From: freetds-bounces AT lists.ibiblio.org
> > [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Gau, Terry
> > Sent: Saturday, May 06, 2006 3:24 AM
> > To: freetds AT lists.ibiblio.org
> > Subject: [freetds] isql configuration error
> >
> > 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=*********][le
> > ngth = 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.
> >
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
> --------------------
>
> 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.
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds

--------------------

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.






Archive powered by MHonArc 2.6.24.

Top of Page