> 
> I tried the below on the RedHat box I am on and got a different error:
> 
> DBI connect('driver={SQL 
> Server};Server=ipaddress 
> ;database=databasename','userid',...) failed: 
> [unixODBC][Driver Manager] Data source name not found, and no 
> default driver specified (SQL-IM002)(DBD: db_login/SQLConnect 
> err=-1) at 
> dump1.pl line 12
> 
> Now I am really lost.

That message is because unixODBC can't find a DSN or a "SQL Server" driver
or a DSN.

Here's what I would suggest (you may have done some of this already):

        1) Test that freeTDS itself (without the ODBC layer) can connect to
the server.  I suggest you download the tarball and look at the
documentation, as I don't know what documentation comes with the RPMS.
There is a .freetds (or something similar) that I've had to use to get
connectivity. 

        2) When you get freeTDS working, then test that freeTDS's ODBC part
is working.  I believe there are some ODBC tests in the freeTDS distro, but
it's been a while (you may need to setup a DSN for this).

        3) Then -- use unixODBC to setup a DSN and test with isql, which
comes with UnixODBC.

        4) From there, you should be able to connect to your DSN with
DBD::ODBC.

*** NOTE: You *may* have an easier time with DBD::Sybase when using FreeTDS.
***  The ODBC layer on top of FreeTDS is constantly evolving, so your
mileage may vary.


> 
> I am using:
> 
> Perl 5.8.0
> DBD::ODBC 1.09
> libiodbc-3.51.2-1

Be careful here.  Iodbc and unixODBC are two different beasts that,
generally do the same thing [provide an ODBC driver manager].

> unixODBC-2.2.8-5
> libiodbc-admin-3.51.2-1
> libiodbc-devel-3.51.2-1
> freetds-0.62.1-1
> freetds-devel-0.62.1-1
> freetds-unixodbc-0.62.1-1
> 
> 
> my odbc.ini is:
> 
> [ODBC Data Sources]
> MSSQL Server = SQLServer

Note, in connect above, you indicated SQL Server with a space and in this
document, no space...

Jeff

> 
> [SQLServer]
> Driver          = /usr/lib/libtdsodbc.so
> Description     = MSSQL Server
> Host            = 192.168.100.2
> ServerType      = MS SQL 7
> FetchBufferSize = 99
> UserName        = ss_userid
> Password        = ss_userid
> Database        = UCP_SUB
> ServerOptions   =
> ConnectOptions  =
> Options         =
> ReadOnly        = no
> 
> [Default]
> Driver = /usr/lib/libtdsodbc.so
> 
> 
> my odbcinst.ini is:
> 
> [SQLServer]
> Description     = ODBC for MS SQL Server
> Driver          = /usr/lib/libtdsodbc.so
> Setup           = /usr/lib/libtdsS.so.1
> FileUsage       =1
> 
> # Included in the unixODBC package
> #[PostgreSQL]
> #Description    = ODBC for PostgreSQL
> #Driver         = /usr/lib/libodbcpsql.so
> #Setup          = /usr/lib/libodbcpsqlS.so
> #FileUsage      = 1
> 
> 
> # Driver from the MyODBC package
> # Setup from the unixODBC package
> #[MySQL]
> #Description    = ODBC for MySQL
> #Driver         = /usr/lib/libmyodbc.so
> #Setup          = /usr/lib/libodbcmyS.so
> #FileUsage      = 1
> 
> 
> I am still horribly lost.
> 
> 
> 
> 
> On Wed, 18 Aug 2004, amonotod wrote:
> 
> >> From: Joel West <[EMAIL PROTECTED]>
> >> Date: 2004/08/18 Wed PM 05:33:54 GMT
> >>
> >> my $dsn = "DBI:ODBC:databasename:ipaddress";
> >
> > (Assuming you're on Windows...)
> > my $dsn = "DBI:ODBC:driver={SQL 
> > Server};Server=ipaddress;database=databasename;";
> >
> >> Joel (Yossel) West
> >
> > HTH,
> > amonotod
> >
> >
> > --
> >
> >    `\|||/         amonotod@    | sun|perl|windows
> >      (@@)         charter.net  | sysadmin|dba
> >  ooO_(_)_Ooo____________________________________
> >  _____|_____|_____|_____|_____|_____|_____|_____|
> >
> 

Reply via email to