We help IT Professionals succeed at work.
Get Started

identify the correct shell i need to use for writing scripts for monitoring oracle database

sk0227 asked
Last Modified: 2013-05-30
Hello Experts,

i am trying to write some automation scripts for monitoring my oracle database. i have a question on which type of shell i need to use to write scripts.

here the problem is,

oracle user is using different shell on different servers. for example, for few servers they are using ksh , for few servers they are using bash.

is there any way to way to write script in a generalized shell and use for ksh and bash?

another problem is,

i wrote a script for a backup. it is working fine when i ran from command like as "/bin/bash -x rman_backup.sh <parameter>
when i schedule the job via cron, it got failed to identify the parameter values.
here is the error message from /var/mail/oracle log

Your "cron" job on kiran
/u01/app/oracle/backup/rman/rman_backup_modified_new.sh 0 /dev/null 2> /dev/null

produced the following output:

Usage: rman_full_backup.sh: <parameter1>
Usage: rman_full_backup.sh  -- 0 For Full 1 For Incr Backup

please advice
Watch Question
Most Valuable Expert 2012
Distinguished Expert 2020
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE