Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Answer: What is required to use Perl on Solaris to connect to MS-SQL?

( #142898=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > What is required to use Perl on Solaris to connect to MS-SQL? contributed by andreychek

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!

Comment on Answer: What is required to use Perl on Solaris to connect to MS-SQL?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (15)
As of 2014-07-22 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (113 votes), past polls