Re: Scripting language for DBAs

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Sun, 15 Apr 2012 13:56:44 +0200
Message-ID: <9uvrbsFkhuU1_at_mid.individual.net>



On 04/11/2012 01:52 AM, Mladen Gogala wrote:
> On Tue, 10 Apr 2012 16:01:36 -0700, onedbguru wrote:
>
>> QUIT THINKING YOU KNOW WHAT IS THE BEST TOOL AND TEST TO MAKE SURE YOU
>> ARE USING THE BEST TOOL FOR THE JOB - REGARDLESS OF WHAT IS "COOL".
>
> OK, I got it, no need for capital letters. So, how would you rate
> scripting languages for a DBA? What would be the criteria to determine
> the best tool for the job?

My criteria would be how difficult it is to get a simple program working which establishes a connection to the database in question and feed data back and forth.

I usually use Ruby for my day to day scripting so I would turn to Ruby's DB support as a first choice. One very nice thing is the CSV lib which comes as part of the standard library. You also have a lot of useful tools for interacting with processes (IO.popen, Open3.popen3). Unfortunately I haven't done serious DB work in a while so I cannot tell you off hand about the current state of affairs with regard to Oracle connection support; but I am pretty sure that it exists: http://ruby-oci8.rubyforge.org/en/

You should be able to get it with

$ gem install ruby-oci8

Apparently you need an Oracle client on the machine so you have oci lib installed.

Kind regards

        robert Received on Sun Apr 15 2012 - 06:56:44 CDT

Original text of this message