Yo DBAs, I am write a script – III

Scripting: Which language which OS which interpreter ?

No alt text provided for this image

When it comes to the playground, there are many languages, many operating systems and many types of interpreters/compilers. This question will be raised only by a new learner who has not hit a need yet, but want to learn because one wants to be ready for nicely paying job. True, I was also thinking the same way, a few times at least. There is nothing wrong in this question.

For too eager scholars : language - shell scripting os - RHEL and interpreter BASH/KSH.

However, when I first heard that Chinese throw their toddler into a pond to force learning swimming, I was shocked, but when time came to me, I started to respect that tradition. You learn only when you need it, in other words when you get stuck. Such situation happened to me also about 4 times if i remember correctly. Basic requirement is your mental preparedness for being ready to learn NOW, not to put it off till tomorrow. Tomorrow never comes.

As far as DBA's requirement, (Windows) I strongly suggest to learn VBScript, Windows Batch or Powershell. Powershell is bit overkill, but once you get familiar, it is the most rewarding language. (*NIX) you should learn shell-scripting, perl and/or python. Shell is most useful and really handy but when it comes to volume processing, you will realize benefit of perl. Many would like to learn Java or C but those are more on programming side, but this works also if you are comfortable writing console applications. You will enjoy extensive variable and array space for your convenience where there is input of long or indefinite space requirement.

As long we understand scripting is very useful for small customizable tasks, we will enjoy it. In practice I have written over a few thousand scripts, obviously for DBA tasks. most astonishing scripts were health-check and SQL running scripts. I made my principal to write a script when I need to repeat any DBA command more than two times in a week. This enables me to pick up speed in doing my regular tasks 10 times easier, hence the speed thereby.

It is very important, if you can, write a script considering variations at os level. For example if you are writing a quick script to list databases on AIX, you can easily write the logic in one or two sentences in the script header, and it is also easy to consider the need in Solaris or RHEL. Once you use it on current role(AIX), I am sure you will forget it before you need it on next role (RHEL).

In next issue of this series I will give you a quick idea how to make your script adaptable to various environments. Trust me, it is very rewarding in term of mental satisfaction and also financially.

要查看或添加评论,请登录

SARBJIT GILL的更多文章

  • Can Pakistan still survive? The answer is YES

    Can Pakistan still survive? The answer is YES

    Rather any failed state can still survive. We will have a specific look at a failed state ‘Pakistan’.

  • Are you a hard worker? Good to know!!

    Are you a hard worker? Good to know!!

    A common thought across the horizon, hard worker are the winners. Since my childhood (rather the babyhood) I have been…

    1 条评论
  • DB2 LUW Field story - shell scripting - I

    DB2 LUW Field story - shell scripting - I

    When we talk about shell scripting, a broader scene pops up in my mind. There are may shells, there are many platforms,…

  • DB2 Index Monitoring - taming the tiger

    DB2 Index Monitoring - taming the tiger

    DB2 Index Monitoring Most DBAs would agree with the point that in most DBMS perform very well initially when a new…

  • Yo DBAs, I am write a script – II

    Yo DBAs, I am write a script – II

    Scripting: how is it different than programming? Basically, all scripting languages are programming languages. The…

  • Yo DBAs, I am write a script

    Yo DBAs, I am write a script

    Scripting: What is it, by the way! Basically, let me start writing. What if I say “let me start scripting”.

  • Hadoop - is it OLAP or OLTP

    Hadoop - is it OLAP or OLTP

    OLAP & OLTP are the techniques used in digital information retrieval and processing. OLTP which is Online Transaction…

    1 条评论
  • DBA – Transactional Replication - How it works

    DBA – Transactional Replication - How it works

    In relational database model, replication refers to a process that stores local database changes and sends these…

  • DBA Career – Canada and Overseas - hurdles and remedies -2

    DBA Career – Canada and Overseas - hurdles and remedies -2

    All career tracks have hardships, especially when you put yourself in global community. In previous article we had…

  • DBA Career – Canada and Overseas - hurdles and remedies

    DBA Career – Canada and Overseas - hurdles and remedies

    All career tracks have hardships, especially when you put yourself in global community. To understand it easily, let us…

社区洞察