Skip to Content.
Sympa Menu

freetds - Re: [freetds] emerge unixODBC freetds

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: rasiel payumo <leonhart_ras AT yahoo.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] emerge unixODBC freetds
  • Date: Wed, 4 Feb 2009 13:07:03 +0800 (SGT)

this is my odbcinst.ini

[TDS]
Description = v0.61 with protocol v4.2 and v7
Driver = /usr/lib/libtdsodbc.so
Setup = /usr/lib/libtdsS.so
FileUsage = 1

when i executed an osql command to cmd prompt osql -S alpha -U sa -P
<password> i've got an error message:
[DBNETLIB]SQL Server does not exist or access denied
[DBNETLIB]Connection Open (Connect()).

when i executed that osql command in my putty the putty won't stop loading
when i executed it again there was a bash error:
command not found


was osql command can only be executed from windows' cmd prompt and not on
linux?
i have a server running (mssql 2005) and i have configured it on Data Sources
(ODBC) --> both on User DSN and System DSN


--newKiD


________________________________
From: James K. Lowden <jklowden AT freetds.org>
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Sent: Tuesday, February 3, 2009 7:21:47 PM
Subject: Re: [freetds] emerge unixODBC freetds

rasiel payumo wrote:
> my odbc.ini is at /etc/unixODBC/odbc.ini
> i had a feeling that my odbc.ini is not correct also here's what i've
> wrote:
>
> [alpha]
^^^^^
This is the name you should be trying to connect to.

> Driver = TDS
^^^
There should be a section called [TDS] in your odbcinst.ini that points to
libtdsodbc.

> Description = puls3 mssql server
> Trace = Yes
> TraceFile = /tmp/unixodbc.trace
> Servername = elk
> Server = 172.30.79.40

You can't have both "server" and "servername". I'm assuming you want an
ODBC-only setup? If so, delete the servername line.

http://www.freetds.org/userguide/odbcconnattr.htm

> Port = 1433
> Database = myTestDB
> UID = sa
^^^ ignored, not a valid odbc.ini attribute. See the user guide.
> Language = us_english

You should add:

TDS_Version = 7.0


> i don't have osql

Well, I did give you links to download the file in an earlier message. I
don't know why I should repeat them, but here goes:

http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/doc/osql.txt?revision=1.4&view=markup

http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/src/apps/osql?revision=1.7&view=markup

You'll see "download" links on both pages. You know what to do.

For instructions on using osql, please see read osql.txt. Since you're
new at this, a couple of hints:

1. The file doesn't need to be "installed". It's just a shell script,
not very different from (but much better than!) a .BAT file in Windows, if
you're familiar with them.

2. Unlike Windows, the current directory is not in the PATH; when you
say:

$ osql -S alpha -U sa -P passwd

the system looks for "osql" in each directory mentioned in the PATH
environment variable, but *not* in the current directory. So, to run a
script that's in the current directory, you do this instead:

$ ./osql -S alpha -U sa -P passwd

HTH.

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



Get connected with chat on network profile, blog, or any personal
website! Yahoo! allows you to IM with Pingbox. Check it out!
http://ph.messenger.yahoo.com/pingbox




Archive powered by MHonArc 2.6.24.

Top of Page