Home » Other » Training & Certification » New skill to learn (Scripting Languages)
New skill to learn [message #593544] Sun, 18 August 2013 08:25 Go to next message
aboodlardy
Messages: 80
Registered: November 2006
Location: India
Member
Hi,

Kindly suggest what scripting language a DBA should master in windows environment.
As we know a DBA automating its task is smarter than who does not do.

Should a DBA master compltete scripting language for each platform.

Please suggest.
Re: New skill to learn [message #593545 is a reply to message #593544] Sun, 18 August 2013 08:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL, PL/SQL through SQL*Plus and/or Perl run in all platforms.

Regards
Michel

[Updated on: Sun, 18 August 2013 08:45]

Report message to a moderator

Re: New skill to learn [message #593546 is a reply to message #593545] Sun, 18 August 2013 08:53 Go to previous messageGo to next message
aboodlardy
Messages: 80
Registered: November 2006
Location: India
Member
Thanks Michael,

I was keen in reading your reply and i noticed you said and/OR for perl.

is that means, it is optional?
what about shell scripting?

I am APPS dba, since very long i have not learn any extra skill.
Yes, i do write small shell scripts and windows dos scripts time to time.
But i want to master a scripting language which will help me in my career.

Please suggest.
Re: New skill to learn [message #593548 is a reply to message #593546] Sun, 18 August 2013 09:39 Go to previous messageGo to next message
matthewmorris68
Messages: 258
Registered: May 2012
Location: Orlando, FL
Senior Member

SQL and PL/SQL run inside the database and allow you to automate many tasks. Any DBA should be able to write SQL commands of moderate complexity and at least be able to write simple PL/SQL blocks. A DBA that does development work or a developer who does DBA work (I consider myself in the second category) should be able to write complex SQL statements and PL/SQL blocks.

Perl runs outside the database and allows you to automate OS-level tasks. I'm pretty sure Michel meant this one was optional. I certainly hope so as I consider myself a fairly good DBA and I couldn't write a Perl script if you held a gun to my head. Well... unless I had access to Google or a reference book.

Shell scripts also run outside the DB and could be used to automate OS tasks (or call SQL scripts) in lieu of Perl. However, they are going to be OS dependent. A Windows batch file won't be running in Linux, nor a Linux bash script in Windows. I have used Linux shell scripts on multiple occasions to automate various database tasks.

I had a colleague that swore by Python (and detested Perl). He used this scripting language to automate database tasks at the OS level. There are many ways to do this. Knowing more languages is almost always a positive thing. Sooner or later you'll find it useful in your career.
Re: New skill to learn [message #593550 is a reply to message #593548] Sun, 18 August 2013 09:56 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Perl runs outside the database and allows you to automate OS-level tasks.
PERL using DBD/DBI modules can directly issue SQL statements against some, many, most RDBMS;
and as such can concurrently inter-operate against Oracle and MYSQL or SQL Server.

BTW, JAVA has similar capabilities.
Re: New skill to learn [message #593551 is a reply to message #593548] Sun, 18 August 2013 09:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I mentioned Perl because it is helpful to retrieve information about many databases when PL/SQL does it for a single one, the one you are connected to.
If you have hundreds databases spread on dozen servers, it is boring to consolidate yourself the information your SQL-PL/SQL scripts retrieve in each database then a Perl script (or any scripting language running on all OS) is very helpful and useful.

I have worked in a company with more than 2000 Oracle databases (and Sybase and SQL Server ones) with a referential of all databases (in a Sybase one). I used a Perl script which connects to the referential and loop on all Oracle databases to search for items that don't comply with our policies (in matter of security or configuration or anything you can imagine) or retrieve audit trail and build a html or text report.

I said Perl because it was the oldest one and you are sure it is installed in your platform as soon as you have Oracle and there is a very large library of modules on CPAN but it could be Python (as Matthew said) or Ruby.

Regards
Michel

[Updated on: Sun, 18 August 2013 09:58]

Report message to a moderator

Re: New skill to learn [message #593552 is a reply to message #593550] Sun, 18 August 2013 10:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
BTW, JAVA has similar capabilities.


Yes but use Java for scripting is a waste of energy and Java is far more complex to learn than Perl.

Regards
Michel
Re: New skill to learn [message #593553 is a reply to message #593552] Sun, 18 August 2013 10:04 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Michel Cadot wrote on Sun, 18 August 2013 08:02
Quote:
BTW, JAVA has similar capabilities.


Yes but use Java for scripting is a waste of energy and Java is far more complex to learn than Perl.

Regards
Michel


JAVA is like using a shotgun to terminate a house fly!
Re: New skill to learn [message #593563 is a reply to message #593553] Sun, 18 August 2013 11:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Indeed. Laughing

Re: New skill to learn [message #593566 is a reply to message #593550] Sun, 18 August 2013 11:39 Go to previous messageGo to next message
matthewmorris68
Messages: 258
Registered: May 2012
Location: Orlando, FL
Senior Member

Quote:
PERL using DBD/DBI modules can directly issue SQL statements against some, many, most RDBMS


Yep -- about all I know about the language is that it exists and my 'Python' friend thought it was dreck because it was so hard to read. Tried to Google his favorite Perl joke. This likely isn't it, but is similar.

"Perl is the only language whose code looks the same before and after RSA encryption"

If I recall correctly, he issued SQL directly from Python as well. For that matter, I've embedded SQL statements directly in shell scripts.
Re: New skill to learn [message #593569 is a reply to message #593566] Sun, 18 August 2013 11:55 Go to previous messageGo to next message
aboodlardy
Messages: 80
Registered: November 2006
Location: India
Member
May i conclude this discussion as:

A DBA should master SQL and PL-SQL.
Plus, he should have atleast one OS scripting language handy.

Isn't it?
Re: New skill to learn [message #593571 is a reply to message #593569] Sun, 18 August 2013 12:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, I'd say "at least one cross-OS scripting language handy".

Regards
Michel
Re: New skill to learn [message #593572 is a reply to message #593571] Sun, 18 August 2013 12:15 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>For that matter, I've embedded SQL statements directly in shell scripts.
I'll split hairs & say shell scripts can not issue SQL "directly".
SQL statements need to be issued by some flavor or SQL client.
Shell script can invoke SQL client software like sqlplus which can then process SQL statements;
but it is NOT the shell doing anything with SQL statements directly.
Yes, I am well aware of here scripts where SQL statements appear in the same script file;
but the SQL statements are NOT processed by the shell command line interpreter.
Re: New skill to learn [message #593573 is a reply to message #593571] Sun, 18 August 2013 12:20 Go to previous messageGo to next message
matthewmorris68
Messages: 258
Registered: May 2012
Location: Orlando, FL
Senior Member

Certainly learning one scripting language is a minimum. You need to be able to perform automation at the OS level. However, keep in mind that you are unlikely to stay at one job your entire career. Let's say that you become a master with Perl and write all the scripts you need with that. When you move to your next job, you may well find that they have a huge number of existing Linux shell scripts written in bash that you will be expected to maintain.

That said, I have never seen something like that be a requirement in a job posting. DBA job requirements are generally written around Oracle knowledge, with things like 'Experience with Perl scripting' (or Python or bash or whatever) listed as 'Nice to have' skills. If asked in an interview whether you read bash scripts, if you can say that you normally use Perl for your scripting -- no one is going to ding you for being unskilled.
Re: New skill to learn [message #593574 is a reply to message #593572] Sun, 18 August 2013 12:34 Go to previous message
matthewmorris68
Messages: 258
Registered: May 2012
Location: Orlando, FL
Senior Member

Quote:
I'll split hairs & say shell scripts can not issue SQL "directly".


Dang it. Here I went and got a special shampoo to deal with my split ends and now my hair is all splitty again. Smile

I'll grant what you are saying is true. But what you said that is true doesn't make what I said false. I didn't say the shell script 'processed' the SQL statements, just that I have embedded SQL statements in shell scripts.

If I were to get all hair-splitty myself, I'd note that Perl won't be 'processing' SQL statements either -- that would still be the Oracle SQL Engine. I haven't used Perl, but at best, it would be passing the SQL directly to the Oracle SQL engine for execution and then accepting the results back. Peral uses an API to interface with Oracle and a shell script would be using SQL*Plus as intermediary. I don't doubt that the API is cleaner, but the end result is pretty much the same.
Previous Topic: Oracle Training Institute in Hyderabad
Next Topic: OCP query
Goto Forum:
  


Current Time: Thu Mar 28 14:47:24 CDT 2024