SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Connecting With Perl Using Win32 : ODBC


Connecting With Perl Using Win32 : ODBC

Author
Message
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (13K reputation)

Group: Moderators
Points: 13618 Visits: 1917
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/bkelley/connectingtosqlserverusingperlwin32odbc.asp

K. Brian Kelley
@‌kbriankelley
Terry Grignon
Terry Grignon
SSC-Enthusiastic
SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)SSC-Enthusiastic (180 reputation)

Group: General Forum Members
Points: 180 Visits: 115
I enjoyed your article very much. Can you tell me the name of the book you mention which is "out for those researchers in the biological sciences who want to use Perl to help process some of their data." Thanks.



K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (13K reputation)

Group: Moderators
Points: 13618 Visits: 1917
Sure. The book is called Beginning Perl for Bioinformatics and its available from O'Reilly. Here's the O'Reilly page on it:

http://www.oreilly.com/catalog/begperlbio/

The first sentence of the description reads:

quote:
This book shows biologists with little or no programming experience how to use Perl, the ideal language for biological data analysis.


K. Brian Kelley
@‌kbriankelley
Klaas-Jan
Klaas-Jan
SSC Veteran
SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)SSC Veteran (291 reputation)

Group: General Forum Members
Points: 291 Visits: 1
great article it gives me a good start on using perl. I have one question is it also posible to create a dsn less connection. This makes it easier to move the script to an other server. maybe for pearl this is less needed because perl is more a server then a client language.



K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (13K reputation)

Group: Moderators
Points: 13618 Visits: 1917
Yes. The next couple of articles should talk about doing just that.



Most of the scripts I have written where I work use Win32:LE which gives me access to standard COM objects like ADO. Since, from a supportability perspective most of the developers are familiar with ADO even if they're not familiar with Perl, I've used Win32:LE and ADO to make database connections, although DBI is more "Perl." In those cases I specify a standard ADO ConnectionString, to include specifying provider, server, initial catalog, etc.



I'll be focusing on using Win32:LE and ADO in my next article in the series.

K. Brian Kelley
@‌kbriankelley
gundapaneni
gundapaneni
SSC-Enthusiastic
SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)

Group: General Forum Members
Points: 105 Visits: 1
Hi,
I dont know anything about PERL when I was reading your article. It has given very good idea about PERL, thanks for writting this article. Could U suggest a good book that covers all info about PERL. I would greatful to U.

Regards,
Madhu.

madhusudannaidugundapaneni


Madhu
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (13K reputation)

Group: Moderators
Points: 13618 Visits: 1917
I have a Getting Started page on Perl. I've also listed some of the books you'll want to look at to get started. The Learning Perl in Win32 Systems is where you should start in the literature.

http://www.truthsolutions.com/perl/getting_started.htm

K. Brian Kelley
@‌kbriankelley
Raymond Chew
Raymond Chew
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 1
I couldn't thank you more !
I am new to Perl-ODBC and this article really get me started !
Thank you once again.
colin.Leversuch-Roberts
colin.Leversuch-Roberts
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6381 Visits: 715

Well written article and an interesting read, I still don't see what advantage I might gain from it however, and as far as users are concerned the last thing I'd ever want is any form of ad-hoc query or access to database tables.

That said I only use SQL Server, it's years since I was using unix, so maybe for a windows only person like me it has less value and has more value working in multiple platforms.



The GrumpyOldDBA
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (13K reputation)

Group: Moderators
Points: 13618 Visits: 1917
With respect to scripting languages on the Windows platform, Perl gives a person more options than VBScript and JScript (even with WScript). For administrators and DBAs, there's a lot of flexibility with going with Perl. As for ad hoc access, I agree, this doesn't tend to be something we allow the normal person to do. However, when we want a quick script to pull something out of a database or insert some info, we may not go through the trouble of building out the full security model because the risk is relatively small.

Also, Win32-ODBC (replaced the :: with a - to avoid the smily) is kind of the "entry point" into database access with Perl. There are better options available, I just haven't gotten around to writing about them. One example is the following from SQL Server MVP Erland Sommarskog:

Win32::SqlServer

Also, check out the book Real World SQL Server Administration with Perl

SQL Server MVP Linchi Shea gives a whole book of uses for Perl with SQL Server.

K. Brian Kelley
@‌kbriankelley
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search