Explain how to run any oracle script file through shell script in UNIX


Oracle - how to run any oracle script file through shell script

Next>>         Oracle Tutorial
Oracle - How to run any oracle script file through shell script - April 30, 2009 at 20:00 PM by Amit Satpute

Explain how to run any oracle script file through shell script in UNIX.

A shell script is simply a text file containing a sequence of commands. When a file or script is run, it executes the commands contained in the file

Scripts written to interact with Oracle Database sometimes require the entry of sensitive information such as a database password.

The stty –echo command turns off the screen echo. After the sensitive information has been read and stored in a variable, the display can be turned on again with stty echo.

Here are a few script commands:

  • get_inv_location.sh
    To determine inventory location
  • list_oracle_homes.sh
    To determine the ORACLE_HOME for a given database
  • search_log.sh
    A variety of logs are generated by Oracle products like the database alert log, installation de-installation logs. The following script iterates over a file passed to it as an argument.

cat $1 | grep ORA- > alert.err

if [ ‘cat alert.err|wc -l‘ -gt 0 ]
          mail -s "$0 $1 Errors" admin@careerride.com < alert.err


Also read

Oracle processes

User process – User process is used in invocation of application software, Data writing process - A database writer process is used to write buffer content into a datafile. They are specifically used to write “dirty block” to data files from the buffer...............

Oracle replication

Read only replication creates local copy of table data originating from one or more remote master tables. An application can query the data in a read-only table snapshot..............

Oracle Security

Explain the security features in Oracle, What are roles? How can we implement roles?, What is user Account in Oracle database?, What is a trace file and how is it created?, What are Tablespace Quota and default tablespace?............ 

Oracle union, intersect and minus

UNION: The UNION operator is used to combine the result-set of two or more SELECT statements Tables of both the select statement must have the same number of columns with similar data types. It eliminates duplicates..........

Write your comment - Share Knowledge and Experience


Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring