plainblack.com
Username Password
search
Bookmark and Share

    

Database Link to MSSQL?

User Trex
Date 3/23/2012 10:53 am
Views 846
Rating -2    Rate [
|
]
Previous · Next
User Message
Trex

Has anyone successfully created a Database Link to a MSSQL database in WebGUI, to allow for things like SQL Reports from such databases? It sounds like this should be doable, but I'm having troubles on a number of matters:

1. Installing drivers. It looks like either DBD::ODBC or DBD::Sybase should be able to connect to a MSSQL database, but neither are installed with the wre. I've tried installing both within cpan, MCPAN and from source, all of which have failed with errors. I'm not enough of a Linux geek to know how to interpret the errors or figure out where to go from this point.

2. DSN syntax. The Database Link hoverhelp for the DSN entry includes some general examples which include Sybase, but not ODBC. I've had a hard time tracking down the actual syntax rules for either Sybase or ODBC that would help me understand how to create a connection to the MSSQL development server I'd like to connect to. For example, the example code I got from the guy who connects to it using PHP includes a specific port, which I don't see mentioned anywhere in the Perl world. The PHP example I have looks like this:

mssql_connect('mysite.edu:[1433]', 'Username', 'password')

Are the brackets a universal syntax that DBI would use as well? Also, the colon looks like it would screw up the parsing of the DSN, which uses colons to separate terms.

3. Error feedback. When trying to set up a database link in WebGUI, the only feedback you see when you save a link is "error" or "OK". It doesn't look like the "error" result is logged in either the webgui or modperl logs. Is there anywhere else to look? I ended up creating a perl script that attempts to make a DBI connection and spits out the error message upon failure, but it would be nice if the database link interface provided some help as to whether the "error" was the result of bad DSN syntax, lack of needed libraries, wrong credentials or whatever.

--- (Edited on 2012-03-23 10:53 am [GMT-0500] by Trex) ---



Back to Top
Rate [
|
]
 
 
Albert2

Should work. Perhaps this wiki page can help. I wrote it about Oracle, but it might help with MSSQL 

Important pointers: don't forget to 'source' setenvironment.sh:  . /data/wre/sbin/setenvironment.sh  (don't forget the dot at the beginning)

And for Oracle I needed the Oracle client installed, this page indicates that for MSSQL you need an ODBC driver manager. Apparently there are multiple options there

--- (Edited on 5/1/2012 8:37 pm [GMT+0200] by Albert2) ---



Back to Top
Rate [
|
]
 
 
© 2014 Plain Black Corporation | All Rights Reserved