Can someone give me oracle shell scripting material for beginers.
Not all shells are equal.
What works in bash (for example), does not always work in ksh.
And not all requirements can be met the same way. Which means that writing a shell script to perform a weekly adrci cleanup/purge (run via cron) is different than writing a service script in /etc/init.d.
So what type of scripting do you have in mind?
What type of requirements are you planning to meet using shell scripting?
There is no such thing like Oracle shell scripting. Oracle does not have a shell. I think before anyone can give you the right advice or simply guess what your are trying to accomplish, please provide more details what your are trying to accomplish and what you know already. For instance, do you have any programming or scripting experience? Do you intent to script sqlplus from the Linux command line?
I don't have much programming or scripting experience.I wanted to learn How create scripts for oracle database,How to get it run in the database.I want to write the scripts like How to monitor long running query's in the database,top cpu consumed process/sessions and sending emails automatically to app teams when the threshold crosses,Creating the purging of unused trace files script and run it automatically for every one hour .Any links/Books will be really helpful.
Long running running query script:
rem Long Running Statements
rem Helmut Pfau, Oracle Deutschland GmbH
set linesize 120
col opname format a20
col target format a15
col units format a10
col time_remaining format 99990 heading Remaining[s]
col bps format 9990.99 heading [Units/s]
col fertig format 90.99 heading "complete[%]"
where time_remaining > 0
What you are trying to accomplish could be done with a combination of Linux shell scripts and Oracle sqlplus running SQL scripts. Both use completely different languages that have nothing in common. If you have no scripting experience you will very soon realize that learning both is most likely going to be more than you can comprehend at once. Most people will simply use Oracle Enterprise Manager (OMS) to accomplish and automate such tasks - that's why it was exists.
P.S. I would rather recommend to you to study Oracle and how to manage and use the job scheduler.
You can fine plenty of tutorials in Google. For releated questions, this is however not the right forum. The Genral Database forum should be more suitable.