connecting to remote MSSQL server from DBI

connecting to remote MSSQL server from DBI

am 11.06.2007 15:34:38 von jordanmueller

------=_Part_36531_26160641.1181568878941
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello,

I have a general question and wonder if anyone here may have some advice on
where to start before I try putting together a solution.

Here is the situation:

Webserver: MAC OS X server running Apache 1.x
DB: On a remote server running MS SQL server


How do I set up a connection to this data base using DBI? When I have been
writing perl scripts on win32 web servers, I set up a DSN (Data source name)
on the web server that is an ODBC connection to the database server and then
connect using DBI::ODBC.

Is there a corollary to this on a MAC OS X server? Or should I go about
connecting in a different way.

Sorry for the general nature of this question. I tried looking aroun don
the net first and I really could find anything for this specific situation.


Thanks,

Jordan

------=_Part_36531_26160641.1181568878941--

Re: connecting to remote MSSQL server from DBI

am 11.06.2007 15:49:41 von gonzales

I would look to see if there is a direct - and I think there is - MS SQL
driver for DBI, which means you can bypass the ODBC piece all together.

Within your perl programs, after calling DBI, you should be able to
directly run your SQL commands(including the initial connection call) to
the MS SQL server.

Apache 1.x is kind of old, if it works for what you're doing great, but
would look to use 2.+ .

On Mon, 11 Jun 2007, Jordan Mueller wrote:

> Hello,
>
> I have a general question and wonder if anyone here may have some advice on
> where to start before I try putting together a solution.
>
> Here is the situation:
>
> Webserver: MAC OS X server running Apache 1.x
> DB: On a remote server running MS SQL server
>
>
> How do I set up a connection to this data base using DBI? When I have been
> writing perl scripts on win32 web servers, I set up a DSN (Data source name)
> on the web server that is an ODBC connection to the database server and then
> connect using DBI::ODBC.
>
> Is there a corollary to this on a MAC OS X server? Or should I go about
> connecting in a different way.
>
> Sorry for the general nature of this question. I tried looking aroun don
> the net first and I really could find anything for this specific situation.
>
>
> Thanks,
>
> Jordan
>

--
Louis Gonzales
louis.gonzales@linuxlouis.net
http://www.linuxlouis.net

Re: connecting to remote MSSQL server from DBI

am 11.06.2007 16:11:52 von Alex

Remote connections are done with Gofer:

http://search.cpan.org/~timb/DBI-1.56/lib/DBD/Gofer.pm

The MacOSX box uses DBD::Gofer to talk to the DBI process over http on the
win32 box, which is accessing the MS SQL using the DBD::ODBC.

I never used this, but thats my understanding. See the docs.

Personally, just for speed alone I would only do this as a last resort. If
your DB can be migrated to SQLite you may have a much easier time of things
since SQLite runs on most platforms and is bundled in the DBD.

Alex

On Mon, 11 Jun 2007 09:34:38 -0400, Jordan Mueller wrote
> Hello,
>
> I have a general question and wonder if anyone here may have some
> advice on where to start before I try putting together a solution.
>
> Here is the situation:
>
> Webserver: MAC OS X server running Apache 1.x
> DB: On a remote server running MS SQL server
>
> How do I set up a connection to this data base using DBI? When I
> have been writing perl scripts on win32 web servers, I set up a DSN
> (Data source name) on the web server that is an ODBC connection to
> the database server and then connect using DBI::ODBC.
>
> Is there a corollary to this on a MAC OS X server? Or should I go about
> connecting in a different way.
>
> Sorry for the general nature of this question. I tried looking
> aroun don the net first and I really could find anything for this
> specific situation.
>
> Thanks,
>
> Jordan

Re: connecting to remote MSSQL server from DBI

am 13.06.2007 23:18:56 von Tim.Bunce

On Mon, Jun 11, 2007 at 07:11:52AM -0700, Alex Teslik wrote:
> Remote connections are done with Gofer:
>
> http://search.cpan.org/~timb/DBI-1.56/lib/DBD/Gofer.pm

Just to completeness I should add that if you need transactions
or are handling very large result sets (relative to available memory)
then DBD::Proxy is a better fit.

> The MacOSX box uses DBD::Gofer to talk to the DBI process over http on the
> win32 box, which is accessing the MS SQL using the DBD::ODBC.
>
> I never used this, but thats my understanding. See the docs.
>
> Personally, just for speed alone I would only do this as a last resort. If
> your DB can be migrated to SQLite you may have a much easier time of things
> since SQLite runs on most platforms and is bundled in the DBD.

Since Jordan is familar with using DBD::ODBC I'd suggest that,
or DBD::Sybase+FreeTDS, are worth exploring on the Mac.
(Though I've no experience with either on the Mac.)

The

Tim.

> Alex
>
> On Mon, 11 Jun 2007 09:34:38 -0400, Jordan Mueller wrote
> > Hello,
> >
> > I have a general question and wonder if anyone here may have some
> > advice on where to start before I try putting together a solution.
> >
> > Here is the situation:
> >
> > Webserver: MAC OS X server running Apache 1.x
> > DB: On a remote server running MS SQL server
> >
> > How do I set up a connection to this data base using DBI? When I
> > have been writing perl scripts on win32 web servers, I set up a DSN
> > (Data source name) on the web server that is an ODBC connection to
> > the database server and then connect using DBI::ODBC.
> >
> > Is there a corollary to this on a MAC OS X server? Or should I go about
> > connecting in a different way.
> >
> > Sorry for the general nature of this question. I tried looking
> > aroun don the net first and I really could find anything for this
> > specific situation.
> >
> > Thanks,
> >
> > Jordan