Re: What is required to use Perl on Solaris to connect to MS-SQL?
by andreychek (Parson) on Feb 02, 2002 at 07:47 UTC
|
You don't state what version of SQL Server you're using. In general though -- if SQL Server is configured to listen for connections on a port (as opposed to something like named pipes), you should be able to get it to work.
One method works is to install the latest version of FreeTDS (which is currently 0.53). Then edit /etc/freetds.conf (or where ever the installation put it) and insert the settings that correspond to your database (hostname, username, password, etc).
Then, install DBD::Sybase, and you should be good to go. Just be sure to insert the following code at the top of all your scripts using the database:
BEGIN { $ENV{SYBASE} = '/usr'; }
Substitute /usr for the actual prefix FreeTDS was installed under on your system.
Without this code, or when using incorrect parameters to send to the database, it often just segfaults. The FreeTDS and DBD::Sybase docs should be able to help you get the correct parameters to use though. Good luck!
| [reply] [d/l] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by gellyfish (Monsignor) on Feb 04, 2002 at 12:59 UTC
|
As well as being ability to build DBD::Sybase against FreeTDS there is also DBD::FreeTDS which whilst not as mature as DBD::Sybase should be free of the problem that lachoy mentions.
| [reply] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by jklowden (Initiate) on Feb 20, 2002 at 21:28 UTC
|
The author of DBD::Sybase, Michael Peppler, keeps it current.
He coordinates his work with us on FreeTDS, and is very helpful in guiding the FreeTDS CT-lib implementation.
DBD::Sybase + FreeTDS is the most mature open-source platform you'll find for connecting unixy clients to MS SQL Server.
There were some niggles with the latest releases (DBD::Sybase 93 and FreeTDS 53), but that's all solved now.
Far from using older versions, I'd advise taking the nightly snapshot from http://www.freetds.org>www.freetds.org.
If you want to use ODBC, have a look at the FreeTDS User Guide first, to see what's what. | [reply] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by lachoy (Parson) on Feb 02, 2002 at 17:02 UTC
|
In addition to what andreychek said, be sure to read the FAQ for FreeTDS. Newer versions of DBD::Sybase are said to be more reliant on functions only in the Sybase Open Client libraries so you need to use a slightly older one. | [reply] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by mpeppler (Vicar) on Feb 21, 2002 at 19:17 UTC
|
Friend lachoy is correct - DBD::Sybase does use a wider range of Client Library API calls in recent versions.
However, FreeTDS is progressing nicely so that all versions of DBD::Sybase build with the current release (AFAIK), even though some of the functionality won't work, or won't work correctly.
I try to keep an eye on the FreeTDS developpment (even though I don't actually do any of the coding myself) to keep track of the most important issues.
Michael | [reply] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by Anonymous Monk on Jul 21, 2003 at 18:53 UTC
|
I successfully connect to MS-SQL 2000 from a Solaris box. Here is a list of what I used and in the order in which I compiled and installed the packages:
- freetds-0.61
- DBD-Sybase-0.91
# Here's my connection string
my $dbh = DBI->connect("dbi:Sybase:server=DDSql;database=toto", 'sa',
+'pass', { RaiseError => 1, AutoCommit => 0 });
where DDSql is a DNS established in the freetds.conf file. It looks something like:
[DDSql]
host = 10.10.1.44
port = 1433
tds version = 8.0
emulate little endian = yes
| [reply] [d/l] [select] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by anexiole (Novice) on May 12, 2006 at 00:34 UTC
|
| [reply] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by mpeppler (Vicar) on Feb 21, 2002 at 19:12 UTC
|
Friend lachoy is correct - DBD::Sybase does use a wider range of Client Library API calls in recent versions.
However, FreeTDS is progressing nicely so that all versions of DBD::Sybase build with the current release (AFAIK), even though some of the functionality won't work, or won't work correctly.
I try to keep an eye on the FreeTDS developpment (even though I don't actually do any of the coding myself) to keep track of the most important issues.
Michael
Originally posted as a Categorized Answer. | [reply] |
Re: What is required to use Perl on Solaris to connect to MS-SQL?
by mpeppler (Vicar) on Feb 21, 2002 at 19:14 UTC
|
Friend lachoy is correct - DBD::Sybase does use a wider range of Client Library API calls in recent versions.
However, FreeTDS is progressing nicely so that all versions of DBD::Sybase build with the current release (AFAIK), even though some of the functionality won't work, or won't work correctly.
I try to keep an eye on the FreeTDS developpment (even though I don't actually do any of the coding myself) to keep track of the most important issues.
Michael
Originally posted as a Categorized Answer. | [reply] |