Re: Scripting language for DBAs
Date: Tue, 10 Apr 2012 09:02:00 -0700 (PDT)
Message-ID: <75e886d1-9628-4d50-add8-e05235aa7c3e_at_k4g2000yqa.googlegroups.com>
On Apr 9, 2:42 pm, Mladen Gogala <gogala.REMOVETHISmla..._at_google.com> wrote:
> For a very, very long time indeed, Perl ruled supreme among the languages
> to interface with a DB, be it Oracle, MySQL, Postgres or MS SQL. DBI was
> (and still is) a polished and useful interface which can do practically
> anything, from extracting query result and producing a quick little report
> using formats to complex things like copying Oracle to MySQL and doing it
> fast. Convenient things with Perl were:
>
> 1) Easy handling of piping and the ability to open commands by using
> stuff like open(LPR,"|lpr")
> 2) Multitude of modules available on CPAN
> 3) Regular expressions, still unsurpassed in their versatility
> 4) Availability of tools like perltidy or perlcritic and Perl
> syntax being well understood by both editors like Vim and operating
> systems like Emacs.
> 5) The fact that everybody knew it.
>
> I am now working for a company where everybody keeps telling that Perl is
> "old", Perl doesn't have an object model, it has a zoo instead, and that I
> should learn Python. I tried. God and Larry Ellison know that I have tried
> and gave it my best. The problem is, however, that I don't need a fully OO
> language to extract result of a query and mail it to my PHB. I need the
> "format" command and MIME::Lite. I was able to write the script both in
> Perl and Python and lo and behold, Perl was shorter and more elegant.
>
> So, at risk that I am called a dinosaur, I am asking the respected
> colleagues from this group what do you you use? Is there anything even
> remotely akin to Perl "format" command in Python? Why is that guy van
> Rossum not on the FBI's most wanted list?
>
> --http://mgogala.freehos tia.com
Neither, although I've intended to become conversant in Perl since the last century. I do most stuff in the sillly 4GL that the ERP system I deal with is written in, and the rest in ksh and SQL, unless Oracle makes me debug their Perl code.
Yesterday I was poking about on the tubes in a fog, and somewhere someone blogged about Perl 6, and how it was so different than 5 that it would lose all the institutional memory 5 and 5.10 has accumulated, so everyone should go to bash. Everyone has their shibboleths, I guess. (And looking the term up in Wikipedia, I learned something new: 'The term originates from the Hebrew word "shibbólet" (שִׁבֹּלֶת), which literally means the part of a plant containing grains, such as an ear of corn or a stalk of grain[3] or, in different contexts, "stream, torrent".' Streams and BitTorent from the ancients, who knew?)
jg
-- _at_home.com is bogus. “did not realize what he was doing was in violation of the law.” http://www.nytimes.com/2012/04/08/technology/text-message-spam-difficult-to-stop-is-a-growing-menace.htmlReceived on Tue Apr 10 2012 - 11:02:00 CDT